static ADNtdsSiteSettingFactory() { ADNtdsSiteSettingFactory <T> ._structuralObjectFilter = ADOPathUtil.CreateFilterClause(ADOperator.Like, "objectClass", "nTDSSiteSettings"); ADNtdsSiteSettingFactory <T> ._rDNPrefix = "CN"; ADNtdsSiteSettingFactory <T> ._structuralObjectClass = "nTDSSiteSettings"; string[] strArrays = new string[1]; strArrays[0] = "name"; ADNtdsSiteSettingFactory <T> ._identityLdapAttributes = strArrays; IdentityResolverDelegate[] customIdentityResolver = new IdentityResolverDelegate[2]; customIdentityResolver[0] = IdentityResolverMethods.GetCustomIdentityResolver(new IdentityResolverDelegate(IdentityResolverMethods.DistinguishedNameIdentityResolver)); IdentityResolverDelegate[] genericIdentityResolver = new IdentityResolverDelegate[2]; genericIdentityResolver[0] = IdentityResolverMethods.GetGenericIdentityResolver(ADNtdsSiteSettingFactory <T> ._identityLdapAttributes); genericIdentityResolver[1] = new IdentityResolverDelegate(IdentityResolverMethods.GuidSearchFilterIdentityResolver); customIdentityResolver[1] = IdentityResolverMethods.GetAggregatedIdentityResolver(ADOperator.Or, genericIdentityResolver); ADNtdsSiteSettingFactory <T> ._identityResolvers = customIdentityResolver; AttributeConverterEntry[] attributeConverterEntry = new AttributeConverterEntry[16]; attributeConverterEntry[0] = new AttributeConverterEntry(ADNtdsSiteSettingFactory <T> .ADNtdsSiteSettingPropertyMap.InterSiteTopologyGenerator.PropertyName, ADNtdsSiteSettingFactory <T> .ADNtdsSiteSettingPropertyMap.InterSiteTopologyGenerator.ADAttribute, TypeConstants.ADDirectoryServer, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(ADTopologyUtil.ToDirectoryFromServerNameToNTDSSettings), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[1] = new AttributeConverterEntry(ADNtdsSiteSettingFactory <T> .ADNtdsSiteSettingPropertyMap.ReplicationSchedule.PropertyName, ADNtdsSiteSettingFactory <T> .ADNtdsSiteSettingPropertyMap.ReplicationSchedule.ADAttribute, TypeConstants.ByteArray, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedADReplicationScheduleFromBlob), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryBlobFromADReplicationSchedule), new ToSearchFilterDelegate(SearchConverters.ToSearchNotSupported)); attributeConverterEntry[2] = new AttributeConverterEntry(ADNtdsSiteSettingFactory <T> .ADNtdsSiteSettingPropertyMap.UniversalGroupCachingRefreshSite.PropertyName, ADNtdsSiteSettingFactory <T> .ADNtdsSiteSettingPropertyMap.UniversalGroupCachingRefreshSite.ADAttribute, TypeConstants.ADReplicationSite, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(ADTopologyUtil.ToDirectoryFromSiteNameToDN), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[3] = new AttributeConverterEntry(ADNtdsSiteSettingFactory <T> .ADNtdsSiteSettingPropertyMap.AutomaticTopologyGenerationEnabled.PropertyName, ADNtdsSiteSettingFactory <T> .ADNtdsSiteSettingPropertyMap.AutomaticTopologyGenerationEnabled.ADAttribute, TypeConstants.Bool, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.GetDelegateToExtendedFlagFromInt(1, true).Invoke), new ToDirectoryFormatDelegate(AttributeConverters.GetDelegateToDirectoryIntFromFlag(1, true).Invoke), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[4] = new AttributeConverterEntry(ADNtdsSiteSettingFactory <T> .ADNtdsSiteSettingPropertyMap.TopologyCleanupEnabled.PropertyName, ADNtdsSiteSettingFactory <T> .ADNtdsSiteSettingPropertyMap.TopologyCleanupEnabled.ADAttribute, TypeConstants.Bool, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.GetDelegateToExtendedFlagFromInt(2, true).Invoke), new ToDirectoryFormatDelegate(AttributeConverters.GetDelegateToDirectoryIntFromFlag(2, true).Invoke), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[5] = new AttributeConverterEntry(ADNtdsSiteSettingFactory <T> .ADNtdsSiteSettingPropertyMap.TopologyMinimumHopsEnabled.PropertyName, ADNtdsSiteSettingFactory <T> .ADNtdsSiteSettingPropertyMap.TopologyMinimumHopsEnabled.ADAttribute, TypeConstants.Bool, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.GetDelegateToExtendedFlagFromInt(4, true).Invoke), new ToDirectoryFormatDelegate(AttributeConverters.GetDelegateToDirectoryIntFromFlag(4, true).Invoke), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[6] = new AttributeConverterEntry(ADNtdsSiteSettingFactory <T> .ADNtdsSiteSettingPropertyMap.TopologyDetectStaleEnabled.PropertyName, ADNtdsSiteSettingFactory <T> .ADNtdsSiteSettingPropertyMap.TopologyDetectStaleEnabled.ADAttribute, TypeConstants.Bool, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.GetDelegateToExtendedFlagFromInt(8, true).Invoke), new ToDirectoryFormatDelegate(AttributeConverters.GetDelegateToDirectoryIntFromFlag(8, true).Invoke), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[7] = new AttributeConverterEntry(ADNtdsSiteSettingFactory <T> .ADNtdsSiteSettingPropertyMap.RedundantServerTopologyEnabled.PropertyName, ADNtdsSiteSettingFactory <T> .ADNtdsSiteSettingPropertyMap.RedundantServerTopologyEnabled.ADAttribute, TypeConstants.Bool, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.GetDelegateToExtendedFlagFromInt(0x400, false).Invoke), new ToDirectoryFormatDelegate(AttributeConverters.GetDelegateToDirectoryIntFromFlag(0x400, false).Invoke), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[8] = new AttributeConverterEntry(ADNtdsSiteSettingFactory <T> .ADNtdsSiteSettingPropertyMap.UniversalGroupCachingEnabled.PropertyName, ADNtdsSiteSettingFactory <T> .ADNtdsSiteSettingPropertyMap.UniversalGroupCachingEnabled.ADAttribute, TypeConstants.Bool, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.GetDelegateToExtendedFlagFromInt(32, false).Invoke), new ToDirectoryFormatDelegate(AttributeConverters.GetDelegateToDirectoryIntFromFlag(32, false).Invoke), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[9] = new AttributeConverterEntry(ADNtdsSiteSettingFactory <T> .ADNtdsSiteSettingPropertyMap.AutomaticInterSiteTopologyGenerationEnabled.PropertyName, ADNtdsSiteSettingFactory <T> .ADNtdsSiteSettingPropertyMap.AutomaticInterSiteTopologyGenerationEnabled.ADAttribute, TypeConstants.Bool, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.GetDelegateToExtendedFlagFromInt(16, true).Invoke), new ToDirectoryFormatDelegate(AttributeConverters.GetDelegateToDirectoryIntFromFlag(16, true).Invoke), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[10] = new AttributeConverterEntry(ADNtdsSiteSettingFactory <T> .ADNtdsSiteSettingPropertyMap.WindowsServer2003KCCBehaviorEnabled.PropertyName, ADNtdsSiteSettingFactory <T> .ADNtdsSiteSettingPropertyMap.WindowsServer2003KCCBehaviorEnabled.ADAttribute, TypeConstants.Bool, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.GetDelegateToExtendedFlagFromInt(64, false).Invoke), new ToDirectoryFormatDelegate(AttributeConverters.GetDelegateToDirectoryIntFromFlag(64, false).Invoke), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[11] = new AttributeConverterEntry(ADNtdsSiteSettingFactory <T> .ADNtdsSiteSettingPropertyMap.WindowsServer2000KCCISTGSelectionBehaviorEnabled.PropertyName, ADNtdsSiteSettingFactory <T> .ADNtdsSiteSettingPropertyMap.WindowsServer2000KCCISTGSelectionBehaviorEnabled.ADAttribute, TypeConstants.Bool, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.GetDelegateToExtendedFlagFromInt(128, false).Invoke), new ToDirectoryFormatDelegate(AttributeConverters.GetDelegateToDirectoryIntFromFlag(128, false).Invoke), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[12] = new AttributeConverterEntry(ADNtdsSiteSettingFactory <T> .ADNtdsSiteSettingPropertyMap.WindowsServer2000BridgeheadSelectionMethodEnabled.PropertyName, ADNtdsSiteSettingFactory <T> .ADNtdsSiteSettingPropertyMap.WindowsServer2000BridgeheadSelectionMethodEnabled.ADAttribute, TypeConstants.Bool, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.GetDelegateToExtendedFlagFromInt(0x100, true).Invoke), new ToDirectoryFormatDelegate(AttributeConverters.GetDelegateToDirectoryIntFromFlag(0x100, true).Invoke), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[13] = new AttributeConverterEntry(ADNtdsSiteSettingFactory <T> .ADNtdsSiteSettingPropertyMap.ScheduleHashingEnabled.PropertyName, ADNtdsSiteSettingFactory <T> .ADNtdsSiteSettingPropertyMap.ScheduleHashingEnabled.ADAttribute, TypeConstants.Bool, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.GetDelegateToExtendedFlagFromInt(0x200, false).Invoke), new ToDirectoryFormatDelegate(AttributeConverters.GetDelegateToDirectoryIntFromFlag(0x200, false).Invoke), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[14] = new AttributeConverterEntry(ADNtdsSiteSettingFactory <T> .ADNtdsSiteSettingPropertyMap.WindowsServer2003KCCIgnoreScheduleEnabled.PropertyName, ADNtdsSiteSettingFactory <T> .ADNtdsSiteSettingPropertyMap.WindowsServer2003KCCIgnoreScheduleEnabled.ADAttribute, TypeConstants.Bool, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.GetDelegateToExtendedFlagFromInt(0x800, false).Invoke), new ToDirectoryFormatDelegate(AttributeConverters.GetDelegateToDirectoryIntFromFlag(0x800, false).Invoke), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[15] = new AttributeConverterEntry(ADNtdsSiteSettingFactory <T> .ADNtdsSiteSettingPropertyMap.WindowsServer2003KCCSiteLinkBridgingEnabled.PropertyName, ADNtdsSiteSettingFactory <T> .ADNtdsSiteSettingPropertyMap.WindowsServer2003KCCSiteLinkBridgingEnabled.ADAttribute, TypeConstants.Bool, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.GetDelegateToExtendedFlagFromInt(0x1000, false).Invoke), new ToDirectoryFormatDelegate(AttributeConverters.GetDelegateToDirectoryIntFromFlag(0x1000, false).Invoke), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); ADNtdsSiteSettingFactory <T> .ADMappingTable = attributeConverterEntry; ADNtdsSiteSettingFactory <T> .ADAMMappingTable = ADNtdsSiteSettingFactory <T> .ADMappingTable; ADFactoryBase <T> .RegisterMappingTable(ADNtdsSiteSettingFactory <T> .ADMappingTable, ADServerType.ADDS); ADFactoryBase <T> .RegisterMappingTable(ADNtdsSiteSettingFactory <T> .ADAMMappingTable, ADServerType.ADLDS); }
static ADReplicationPartnerMetadataFactory() { AttributeConverterEntry[] attributeConverterEntry = new AttributeConverterEntry[24]; attributeConverterEntry[0] = new AttributeConverterEntry(ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.Server.PropertyName, ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.Server.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(ADReplicationUtil.ToExtendedServerFromSessionInfo), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[1] = new AttributeConverterEntry(ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.Partner.PropertyName, ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.Partner.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[2] = new AttributeConverterEntry(ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.PartnerAddress.PropertyName, ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.PartnerAddress.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[3] = new AttributeConverterEntry(ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.PartnerGuid.PropertyName, ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.PartnerGuid.ADAttribute, TypeConstants.Guid, false, TypeAdapterAccess.Read, true, AttributeSet.Default, AttributeConverters.GetToExtendedFromStringConverter(new AttributeConverters.StringParserDelegate(AttributeConverters.ParseGuidFromString)), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[4] = new AttributeConverterEntry(ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.PartnerInvocationId.PropertyName, ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.PartnerInvocationId.ADAttribute, TypeConstants.Guid, false, TypeAdapterAccess.Read, true, AttributeSet.Default, AttributeConverters.GetToExtendedFromStringConverter(new AttributeConverters.StringParserDelegate(AttributeConverters.ParseGuidFromString)), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[5] = new AttributeConverterEntry(ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.PartnerType.PropertyName, ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.PartnerType.ADAttribute, TypeConstants.ADPartnerType, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(ADReplicationUtil.ToExtendedReplicationPartnerType), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[6] = new AttributeConverterEntry(ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.Partition.PropertyName, ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.Partition.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[7] = new AttributeConverterEntry(ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.PartitionGuid.PropertyName, ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.PartitionGuid.ADAttribute, TypeConstants.Guid, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[8] = new AttributeConverterEntry(ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.LastReplicationAttempt.PropertyName, ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.LastReplicationAttempt.ADAttribute, TypeConstants.DateTime, false, TypeAdapterAccess.Read, true, AttributeSet.Default, AttributeConverters.GetToExtendedFromStringConverter(new AttributeConverters.StringParserDelegate(AttributeConverters.ParseDateTimeFromString)), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[9] = new AttributeConverterEntry(ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.LastReplicationResult.PropertyName, ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.LastReplicationResult.ADAttribute, TypeConstants.Int, false, TypeAdapterAccess.Read, true, AttributeSet.Default, AttributeConverters.GetToExtendedFromStringConverter(new AttributeConverters.StringParserDelegate(AttributeConverters.ParseIntFromString)), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[10] = new AttributeConverterEntry(ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.LastReplicationSuccess.PropertyName, ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.LastReplicationSuccess.ADAttribute, TypeConstants.DateTime, false, TypeAdapterAccess.Read, true, AttributeSet.Default, AttributeConverters.GetToExtendedFromStringConverter(new AttributeConverters.StringParserDelegate(AttributeConverters.ParseDateTimeFromString)), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[11] = new AttributeConverterEntry(ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.ConsecutiveReplicationFailures.PropertyName, ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.ConsecutiveReplicationFailures.ADAttribute, TypeConstants.Int, false, TypeAdapterAccess.Read, true, AttributeSet.Default, AttributeConverters.GetToExtendedFromStringConverter(new AttributeConverters.StringParserDelegate(AttributeConverters.ParseIntFromString)), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[12] = new AttributeConverterEntry(ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.LastChangeUsn.PropertyName, ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.LastChangeUsn.ADAttribute, TypeConstants.Long, false, TypeAdapterAccess.Read, true, AttributeSet.Default, AttributeConverters.GetToExtendedFromStringConverter(new AttributeConverters.StringParserDelegate(AttributeConverters.ParseLongFromString)), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[13] = new AttributeConverterEntry(ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.UsnFilter.PropertyName, ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.UsnFilter.ADAttribute, TypeConstants.Long, false, TypeAdapterAccess.Read, true, AttributeSet.Default, AttributeConverters.GetToExtendedFromStringConverter(new AttributeConverters.StringParserDelegate(AttributeConverters.ParseLongFromString)), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[14] = new AttributeConverterEntry(ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.IntersiteTransport.PropertyName, ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.IntersiteTransport.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[15] = new AttributeConverterEntry(ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.IntersiteTransportGuid.PropertyName, ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.IntersiteTransportGuid.ADAttribute, TypeConstants.Guid, false, TypeAdapterAccess.Read, true, AttributeSet.Default, AttributeConverters.GetToExtendedFromStringConverter(new AttributeConverters.StringParserDelegate(AttributeConverters.ParseGuidFromString)), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[16] = new AttributeConverterEntry(ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.IntersiteTransportType.PropertyName, ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.IntersiteTransportType.ADAttribute, TypeConstants.ADInterSiteTransportProtocolType, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(ADReplicationUtil.ToExtendedTransportTypeFromDrsOptions), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[17] = new AttributeConverterEntry(ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.CompressChanges.PropertyName, ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.CompressChanges.ADAttribute, TypeConstants.Bool, false, TypeAdapterAccess.Read, true, AttributeSet.Default, AttributeConverters.GetDelegateToExtendedFlagFromInt(0x10000000, false), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[18] = new AttributeConverterEntry(ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.DisableScheduledSync.PropertyName, ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.DisableScheduledSync.ADAttribute, TypeConstants.Bool, false, TypeAdapterAccess.Read, true, AttributeSet.Default, AttributeConverters.GetDelegateToExtendedFlagFromInt(0x8000000, false), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[19] = new AttributeConverterEntry(ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.IgnoreChangeNotifications.PropertyName, ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.IgnoreChangeNotifications.ADAttribute, TypeConstants.Bool, false, TypeAdapterAccess.Read, true, AttributeSet.Default, AttributeConverters.GetDelegateToExtendedFlagFromInt(0x4000000, false), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[20] = new AttributeConverterEntry(ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.ScheduledSync.PropertyName, ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.ScheduledSync.ADAttribute, TypeConstants.Bool, false, TypeAdapterAccess.Read, true, AttributeSet.Default, AttributeConverters.GetDelegateToExtendedFlagFromInt(64, false), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[21] = new AttributeConverterEntry(ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.SyncOnStartup.PropertyName, ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.SyncOnStartup.ADAttribute, TypeConstants.Bool, false, TypeAdapterAccess.Read, true, AttributeSet.Default, AttributeConverters.GetDelegateToExtendedFlagFromInt(32, false), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[22] = new AttributeConverterEntry(ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.TwoWaySync.PropertyName, ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.TwoWaySync.ADAttribute, TypeConstants.Bool, false, TypeAdapterAccess.Read, true, AttributeSet.Default, AttributeConverters.GetDelegateToExtendedFlagFromInt(0x200, false), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[23] = new AttributeConverterEntry(ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.Writable.PropertyName, ADReplicationPartnerMetadataFactory <T> .ADReplicationPartnerMetadataPropertyMap.Writable.ADAttribute, TypeConstants.Bool, false, TypeAdapterAccess.Read, true, AttributeSet.Default, AttributeConverters.GetDelegateToExtendedFlagFromInt(16, false), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); ADReplicationPartnerMetadataFactory <T> .ADMappingTable = attributeConverterEntry; ADReplicationPartnerMetadataFactory <T> .ADAMMappingTable = ADReplicationPartnerMetadataFactory <T> .ADMappingTable; ADFactoryBase <T> .RegisterMappingTable(ADReplicationPartnerMetadataFactory <T> .ADAMMappingTable, ADServerType.ADLDS); ADFactoryBase <T> .RegisterMappingTable(ADReplicationPartnerMetadataFactory <T> .ADMappingTable, ADServerType.ADDS); }
static ADTrustFactory() { ADTrustFactory <T> ._rDNPrefix = "CN"; string[] strArrays = new string[1]; strArrays[0] = "name"; ADTrustFactory <T> ._identityLdapAttributes = strArrays; IdentityResolverDelegate[] customIdentityResolver = new IdentityResolverDelegate[2]; customIdentityResolver[0] = IdentityResolverMethods.GetCustomIdentityResolver(new IdentityResolverDelegate(IdentityResolverMethods.DistinguishedNameIdentityResolver)); IdentityResolverDelegate[] genericIdentityResolver = new IdentityResolverDelegate[2]; genericIdentityResolver[0] = IdentityResolverMethods.GetGenericIdentityResolver(ADTrustFactory <T> ._identityLdapAttributes); genericIdentityResolver[1] = new IdentityResolverDelegate(IdentityResolverMethods.GuidSearchFilterIdentityResolver); customIdentityResolver[1] = IdentityResolverMethods.GetAggregatedIdentityResolver(ADOperator.Or, genericIdentityResolver); ADTrustFactory <T> ._identityResolvers = customIdentityResolver; AttributeConverterEntry[] attributeConverterEntry = new AttributeConverterEntry[19]; attributeConverterEntry[0] = new AttributeConverterEntry(ADTrustFactory <T> .ADTrustPropertyMap.Source.PropertyName, ADTrustFactory <T> .ADTrustPropertyMap.Source.ADAttribute, TypeConstants.String, true, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(ADTrustFactory <T> .ToExtendedSourceNameFromDN), null, new ToSearchFilterDelegate(SearchConverters.ToSearchNotSupported)); attributeConverterEntry[1] = new AttributeConverterEntry(ADTrustFactory <T> .ADTrustPropertyMap.Target.PropertyName, ADTrustFactory <T> .ADTrustPropertyMap.Target.ADAttribute, TypeConstants.String, true, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo)); attributeConverterEntry[2] = new AttributeConverterEntry(ADTrustFactory <T> .ADTrustPropertyMap.TrustDirection.PropertyName, ADTrustFactory <T> .ADTrustPropertyMap.TrustDirection.ADAttribute, TypeConstants.ADTrustDirection, true, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObjectWithCast <ADTrustDirection>), null, new ToSearchFilterDelegate(SearchConverters.ToSearchEnum <ADTrustDirection>)); attributeConverterEntry[3] = new AttributeConverterEntry(ADTrustFactory <T> .ADTrustPropertyMap.TrustType.PropertyName, ADTrustFactory <T> .ADTrustPropertyMap.TrustType.ADAttribute, TypeConstants.ADTrustType, true, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObjectWithCast <ADTrustType>), null, new ToSearchFilterDelegate(SearchConverters.ToSearchEnum <ADTrustType>)); attributeConverterEntry[4] = new AttributeConverterEntry(ADTrustFactory <T> .ADTrustPropertyMap.TrustAttributes.PropertyName, ADTrustFactory <T> .ADTrustPropertyMap.TrustAttributes.ADAttribute, TypeConstants.Int, true, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo)); attributeConverterEntry[5] = new AttributeConverterEntry(ADTrustFactory <T> .ADTrustPropertyMap.TrustingPolicy.PropertyName, ADTrustFactory <T> .ADTrustPropertyMap.TrustingPolicy.ADAttribute, TypeConstants.ADClaimTransformPolicy, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(ADTrustFactory <T> .ToSearchFromClaimTransformPolicyToDN)); attributeConverterEntry[6] = new AttributeConverterEntry(ADTrustFactory <T> .ADTrustPropertyMap.TrustedPolicy.PropertyName, ADTrustFactory <T> .ADTrustPropertyMap.TrustedPolicy.ADAttribute, TypeConstants.ADClaimTransformPolicy, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(ADTrustFactory <T> .ToSearchFromClaimTransformPolicyToDN)); attributeConverterEntry[7] = new AttributeConverterEntry(ADTrustFactory <T> .ADTrustPropertyMap.DisallowTransivity.PropertyName, ADTrustFactory <T> .ADTrustPropertyMap.DisallowTransivity.ADAttribute, TypeConstants.Bool, true, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.GetDelegateToExtendedFlagFromInt(1, false).Invoke), null, new ToSearchFilterDelegate(SearchConverters.GetDelegateToSearchFlagInInt(1, false).Invoke)); attributeConverterEntry[8] = new AttributeConverterEntry(ADTrustFactory <T> .ADTrustPropertyMap.UplevelOnly.PropertyName, ADTrustFactory <T> .ADTrustPropertyMap.UplevelOnly.ADAttribute, TypeConstants.Bool, true, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.GetDelegateToExtendedFlagFromInt(2, false).Invoke), null, new ToSearchFilterDelegate(SearchConverters.GetDelegateToSearchFlagInInt(2, false).Invoke)); attributeConverterEntry[9] = new AttributeConverterEntry(ADTrustFactory <T> .ADTrustPropertyMap.SIDFilteringQuarantined.PropertyName, ADTrustFactory <T> .ADTrustPropertyMap.SIDFilteringQuarantined.ADAttribute, TypeConstants.Bool, true, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.GetDelegateToExtendedFlagFromInt(4, false).Invoke), null, new ToSearchFilterDelegate(SearchConverters.GetDelegateToSearchFlagInInt(4, false).Invoke)); attributeConverterEntry[10] = new AttributeConverterEntry(ADTrustFactory <T> .ADTrustPropertyMap.ForestTransitive.PropertyName, ADTrustFactory <T> .ADTrustPropertyMap.ForestTransitive.ADAttribute, TypeConstants.Bool, true, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.GetDelegateToExtendedFlagFromInt(8, false).Invoke), null, new ToSearchFilterDelegate(SearchConverters.GetDelegateToSearchFlagInInt(8, false).Invoke)); attributeConverterEntry[11] = new AttributeConverterEntry(ADTrustFactory <T> .ADTrustPropertyMap.SelectiveAuthentication.PropertyName, ADTrustFactory <T> .ADTrustPropertyMap.SelectiveAuthentication.ADAttribute, TypeConstants.Bool, true, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.GetDelegateToExtendedFlagFromInt(16, false).Invoke), null, new ToSearchFilterDelegate(SearchConverters.GetDelegateToSearchFlagInInt(16, false).Invoke)); attributeConverterEntry[12] = new AttributeConverterEntry(ADTrustFactory <T> .ADTrustPropertyMap.IntraForest.PropertyName, ADTrustFactory <T> .ADTrustPropertyMap.IntraForest.ADAttribute, TypeConstants.Bool, true, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.GetDelegateToExtendedFlagFromInt(32, false).Invoke), null, new ToSearchFilterDelegate(SearchConverters.GetDelegateToSearchFlagInInt(32, false).Invoke)); attributeConverterEntry[13] = new AttributeConverterEntry(ADTrustFactory <T> .ADTrustPropertyMap.SIDFilteringForestAware.PropertyName, ADTrustFactory <T> .ADTrustPropertyMap.SIDFilteringForestAware.ADAttribute, TypeConstants.Bool, true, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.GetDelegateToExtendedFlagFromInt(64, false).Invoke), null, new ToSearchFilterDelegate(SearchConverters.GetDelegateToSearchFlagInInt(64, false).Invoke)); attributeConverterEntry[14] = new AttributeConverterEntry(ADTrustFactory <T> .ADTrustPropertyMap.UsesRC4Encryption.PropertyName, ADTrustFactory <T> .ADTrustPropertyMap.UsesRC4Encryption.ADAttribute, TypeConstants.Bool, true, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.GetDelegateToExtendedFlagFromInt(128, false).Invoke), null, new ToSearchFilterDelegate(SearchConverters.GetDelegateToSearchFlagInInt(128, false).Invoke)); attributeConverterEntry[15] = new AttributeConverterEntry(ADTrustFactory <T> .ADTrustPropertyMap.UsesAESKeys.PropertyName, ADTrustFactory <T> .ADTrustPropertyMap.UsesAESKeys.ADAttribute, TypeConstants.Bool, true, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.GetDelegateToExtendedFlagFromInt(0x100, false).Invoke), null, new ToSearchFilterDelegate(SearchConverters.GetDelegateToSearchFlagInInt(0x100, false).Invoke)); attributeConverterEntry[16] = new AttributeConverterEntry(ADTrustFactory <T> .ADTrustPropertyMap.IsTreeParent.PropertyName, ADTrustFactory <T> .ADTrustPropertyMap.IsTreeParent.ADAttribute, TypeConstants.Bool, true, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.GetDelegateToExtendedFlagFromInt(0x400000, false).Invoke), null, new ToSearchFilterDelegate(SearchConverters.GetDelegateToSearchFlagInInt(0x400000, false).Invoke)); attributeConverterEntry[17] = new AttributeConverterEntry(ADTrustFactory <T> .ADTrustPropertyMap.IsTreeRoot.PropertyName, ADTrustFactory <T> .ADTrustPropertyMap.IsTreeRoot.ADAttribute, TypeConstants.Bool, true, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.GetDelegateToExtendedFlagFromInt(0x800000, false).Invoke), null, new ToSearchFilterDelegate(SearchConverters.GetDelegateToSearchFlagInInt(0x800000, false).Invoke)); attributeConverterEntry[18] = new AttributeConverterEntry(ADTrustFactory <T> .ADTrustPropertyMap.TGTDelegation.PropertyName, ADTrustFactory <T> .ADTrustPropertyMap.TGTDelegation.ADAttribute, TypeConstants.Bool, true, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.GetDelegateToExtendedFlagFromInt(0x200, false).Invoke), null, new ToSearchFilterDelegate(SearchConverters.GetDelegateToSearchFlagInInt(0x200, false).Invoke)); ADTrustFactory <T> .ADMappingTable = attributeConverterEntry; ADFactoryBase <T> .RegisterMappingTable(ADTrustFactory <T> .ADMappingTable, ADServerType.ADDS); }
static ADReplicationConnectionFactory() { ADReplicationConnectionFactory <T> ._rDNPrefix = "CN"; string[] strArrays = new string[1]; strArrays[0] = "name"; ADReplicationConnectionFactory <T> ._identityLdapAttributes = strArrays; IdentityResolverDelegate[] customIdentityResolver = new IdentityResolverDelegate[2]; customIdentityResolver[0] = IdentityResolverMethods.GetCustomIdentityResolver(new IdentityResolverDelegate(IdentityResolverMethods.DistinguishedNameIdentityResolver)); IdentityResolverDelegate[] genericIdentityResolver = new IdentityResolverDelegate[2]; genericIdentityResolver[0] = IdentityResolverMethods.GetGenericIdentityResolver(ADReplicationConnectionFactory <T> ._identityLdapAttributes); genericIdentityResolver[1] = new IdentityResolverDelegate(IdentityResolverMethods.GuidSearchFilterIdentityResolver); customIdentityResolver[1] = IdentityResolverMethods.GetAggregatedIdentityResolver(ADOperator.Or, genericIdentityResolver); ADReplicationConnectionFactory <T> ._identityResolvers = customIdentityResolver; AttributeConverterEntry[] attributeConverterEntry = new AttributeConverterEntry[6]; attributeConverterEntry[0] = new AttributeConverterEntry("Name", "name", TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[1] = new AttributeConverterEntry(ADReplicationConnectionFactory <T> .ADReplicationConnectionPropertyMap.InterSiteTransportProtocol.PropertyName, ADReplicationConnectionFactory <T> .ADReplicationConnectionPropertyMap.InterSiteTransportProtocol.ADAttribute, TypeConstants.String, true, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(ADReplicationConnectionFactory <T> .ToExtendedFromTransportTypeToISTPEnum), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[2] = new AttributeConverterEntry(ADReplicationConnectionFactory <T> .ADReplicationConnectionPropertyMap.ReplicateFromDirectoryServer.PropertyName, ADReplicationConnectionFactory <T> .ADReplicationConnectionPropertyMap.ReplicateFromDirectoryServer.ADAttribute, TypeConstants.ADDirectoryServer, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(ADTopologyUtil.ToDirectoryFromServerNameToNTDSSettings), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[3] = new AttributeConverterEntry(ADReplicationConnectionFactory <T> .ADReplicationConnectionPropertyMap.ReplicateToDirectoryServer.PropertyName, ADReplicationConnectionFactory <T> .ADReplicationConnectionPropertyMap.ReplicateToDirectoryServer.ADAttribute, TypeConstants.ADDirectoryServer, true, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(ADReplicationConnectionFactory <T> .ToExtendedFromDNToDirectoryServerDN), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); attributeConverterEntry[4] = new AttributeConverterEntry(ADReplicationConnectionFactory <T> .ADReplicationConnectionPropertyMap.ReplicationSchedule.PropertyName, ADReplicationConnectionFactory <T> .ADReplicationConnectionPropertyMap.ReplicationSchedule.ADAttribute, TypeConstants.ByteArray, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedADReplicationScheduleFromBlob), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryBlobFromADReplicationSchedule), new ToSearchFilterDelegate(SearchConverters.ToSearchNotSupported)); attributeConverterEntry[5] = new AttributeConverterEntry(ADReplicationConnectionFactory <T> .ADReplicationConnectionPropertyMap.AutoGenerated.PropertyName, ADReplicationConnectionFactory <T> .ADReplicationConnectionPropertyMap.AutoGenerated.ADAttribute, TypeConstants.Bool, true, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.GetDelegateToExtendedFlagFromInt(1, false).Invoke), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter)); ADReplicationConnectionFactory <T> .ADMappingTable = attributeConverterEntry; ADReplicationConnectionFactory <T> .ADAMMappingTable = ADReplicationConnectionFactory <T> .ADMappingTable; ADFactoryBase <T> .RegisterMappingTable(ADReplicationConnectionFactory <T> .ADMappingTable, ADServerType.ADDS); ADFactoryBase <T> .RegisterMappingTable(ADReplicationConnectionFactory <T> .ADAMMappingTable, ADServerType.ADLDS); }