internal override ADSessionSettings FromTenantPartitionHint(TenantPartitionHint partitionHint) { if (partitionHint == null) { throw new ArgumentNullException("partitionHint"); } ExTraceGlobals.GetConnectionTracer.TraceDebug <string>(0L, "FromTenantPartitionHint(): Building session settings from partition hint '{0}'", partitionHint.ToString()); return(partitionHint.GetTenantScopedADSessionSettingsServiceOnly()); }
internal static byte[] Serialize(TenantPartitionHint hint) { if (hint == null) { throw new ArgumentNullException("hint"); } if (hint.tenantName != null && hint.tenantName.Length > 64) { throw new ArgumentException("tenantName is too long: " + hint.tenantName); } if (hint.partitionId != null && hint.partitionId.ForestFQDN != null && hint.partitionId.ForestFQDN.Length > 255) { throw new ArgumentException("partitionId.ForestFQDN is too long: " + hint.partitionId.ForestFQDN); } int num = TenantPartitionHint.Serialize(null, hint); byte[] array = new byte[num]; TenantPartitionHint.Serialize(array, hint); return(array); }
private static int Serialize(byte[] buffer, TenantPartitionHint hint) { int num = 0; num += SerializedValue.SerializeInt32(1, buffer, num); TenantPartitionHint.SerializedTenantHintFlags serializedTenantHintFlags = TenantPartitionHint.SerializedTenantHintFlags.None; if (hint.externalDirectoryOrganizationId != null) { serializedTenantHintFlags |= TenantPartitionHint.SerializedTenantHintFlags.ExternalDirectoryOrganizationIdPresent; } num += SerializedValue.SerializeInt32((int)serializedTenantHintFlags, buffer, num); if (hint.externalDirectoryOrganizationId != null) { num += SerializedValue.SerializeGuid(hint.externalDirectoryOrganizationId.Value, buffer, num); } num += SerializedValue.SerializeString(hint.tenantName, buffer, num); string value = null; if (hint.partitionId != null && hint.partitionId.ForestFQDN != null) { value = hint.partitionId.ForestFQDN; } return(num + SerializedValue.SerializeString(value, buffer, num)); }
internal abstract ADSessionSettings FromTenantPartitionHint(TenantPartitionHint partitionHint);
internal static ADSessionSettings FromTenantPartitionHint(TenantPartitionHint partitionHint) { return(ADSessionSettings.InvokeWithAPILogging <ADSessionSettings>(() => ADSessionSettings.SessionSettingsFactory.Default.FromTenantPartitionHint(partitionHint), "FromTenantPartitionHint")); }