Beispiel #1
0
        static ADOrganizationalUnitFactory()
        {
            ADOrganizationalUnitFactory <T> ._structuralObjectFilter = ADOPathUtil.CreateFilterClause(ADOperator.Like, "objectClass", "organizationalUnit");
            ADOrganizationalUnitFactory <T> ._rDNPrefix             = "OU";
            ADOrganizationalUnitFactory <T> ._structuralObjectClass = "organizationalUnit";
            AttributeConverterEntry[] attributeConverterEntry = new AttributeConverterEntry[7];
            attributeConverterEntry[0] = new AttributeConverterEntry(ADOrganizationalUnitFactory <T> .ADOrganizationalUnitPropertyMap.ManagedBy.PropertyName, ADOrganizationalUnitFactory <T> .ADOrganizationalUnitPropertyMap.ManagedBy.ADAttribute, TypeConstants.ADPrincipal, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryFromADObjectToDN <ADPrincipalFactory <ADPrincipal>, ADPrincipal>), new ToSearchFilterDelegate(SearchConverters.ToSearchFromADObjectToDN <ADPrincipalFactory <ADPrincipal>, ADPrincipal>));
            attributeConverterEntry[1] = new AttributeConverterEntry(ADOrganizationalUnitFactory <T> .ADOrganizationalUnitPropertyMap.Street.PropertyName, ADOrganizationalUnitFactory <T> .ADOrganizationalUnitPropertyMap.Street.ADAttribute, TypeConstants.String, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            attributeConverterEntry[2] = new AttributeConverterEntry(ADOrganizationalUnitFactory <T> .ADOrganizationalUnitPropertyMap.PostalCode.PropertyName, ADOrganizationalUnitFactory <T> .ADOrganizationalUnitPropertyMap.PostalCode.ADAttribute, TypeConstants.String, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            attributeConverterEntry[3] = new AttributeConverterEntry(ADOrganizationalUnitFactory <T> .ADOrganizationalUnitPropertyMap.City.PropertyName, ADOrganizationalUnitFactory <T> .ADOrganizationalUnitPropertyMap.City.ADAttribute, TypeConstants.String, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            attributeConverterEntry[4] = new AttributeConverterEntry(ADOrganizationalUnitFactory <T> .ADOrganizationalUnitPropertyMap.State.PropertyName, ADOrganizationalUnitFactory <T> .ADOrganizationalUnitPropertyMap.State.ADAttribute, TypeConstants.String, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            attributeConverterEntry[5] = new AttributeConverterEntry(ADOrganizationalUnitFactory <T> .ADOrganizationalUnitPropertyMap.Country.PropertyName, ADOrganizationalUnitFactory <T> .ADOrganizationalUnitPropertyMap.Country.ADAttribute, TypeConstants.String, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            attributeConverterEntry[6] = new AttributeConverterEntry(ADOrganizationalUnitFactory <T> .ADOrganizationalUnitPropertyMap.LinkedGroupPolicyObjects.PropertyName, ADOrganizationalUnitFactory <T> .ADOrganizationalUnitPropertyMap.LinkedGroupPolicyObjects.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, false, AttributeSet.Default, new ToExtendedFormatDelegate(GPLinkUtil.ToExtendedGPLink), null, new ToSearchFilterDelegate(GPLinkUtil.ToSearchGPLink));
            ADOrganizationalUnitFactory <T> .ADMappingTable = attributeConverterEntry;
            AttributeConverterEntry[] attributeConverterEntryArray = new AttributeConverterEntry[6];
            attributeConverterEntryArray[0] = new AttributeConverterEntry(ADOrganizationalUnitFactory <T> .ADOrganizationalUnitPropertyMap.ManagedBy.PropertyName, ADOrganizationalUnitFactory <T> .ADOrganizationalUnitPropertyMap.ManagedBy.ADAttribute, TypeConstants.ADPrincipal, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryFromADObjectToDN <ADPrincipalFactory <ADPrincipal>, ADPrincipal>), new ToSearchFilterDelegate(SearchConverters.ToSearchFromADObjectToDN <ADPrincipalFactory <ADPrincipal>, ADPrincipal>));
            attributeConverterEntryArray[1] = new AttributeConverterEntry(ADOrganizationalUnitFactory <T> .ADOrganizationalUnitPropertyMap.Street.PropertyName, ADOrganizationalUnitFactory <T> .ADOrganizationalUnitPropertyMap.Street.ADAttribute, TypeConstants.String, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            attributeConverterEntryArray[2] = new AttributeConverterEntry(ADOrganizationalUnitFactory <T> .ADOrganizationalUnitPropertyMap.PostalCode.PropertyName, ADOrganizationalUnitFactory <T> .ADOrganizationalUnitPropertyMap.PostalCode.ADAttribute, TypeConstants.String, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            attributeConverterEntryArray[3] = new AttributeConverterEntry(ADOrganizationalUnitFactory <T> .ADOrganizationalUnitPropertyMap.City.PropertyName, ADOrganizationalUnitFactory <T> .ADOrganizationalUnitPropertyMap.City.ADAttribute, TypeConstants.String, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            attributeConverterEntryArray[4] = new AttributeConverterEntry(ADOrganizationalUnitFactory <T> .ADOrganizationalUnitPropertyMap.State.PropertyName, ADOrganizationalUnitFactory <T> .ADOrganizationalUnitPropertyMap.State.ADAttribute, TypeConstants.String, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            attributeConverterEntryArray[5] = new AttributeConverterEntry(ADOrganizationalUnitFactory <T> .ADOrganizationalUnitPropertyMap.Country.PropertyName, ADOrganizationalUnitFactory <T> .ADOrganizationalUnitPropertyMap.Country.ADAttribute, TypeConstants.String, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            ADOrganizationalUnitFactory <T> .ADAMMappingTable = attributeConverterEntryArray;
            ADFactoryBase <T> .RegisterMappingTable(ADOrganizationalUnitFactory <T> .ADAMMappingTable, ADServerType.ADLDS);

            ADFactoryBase <T> .RegisterMappingTable(ADOrganizationalUnitFactory <T> .ADMappingTable, ADServerType.ADDS);
        }
        static ADDirectoryServerFactory()
        {
            IADOPathNode[] aDOPathNodeArray = new IADOPathNode[2];
            aDOPathNodeArray[0] = ADOPathUtil.CreateFilterClause(ADOperator.Eq, "objectClass", "nTDSDSA");
            aDOPathNodeArray[1] = ADOPathUtil.CreateFilterClause(ADOperator.Eq, "objectClass", "server");
            ADDirectoryServerFactory <T> ._directoryServerStructuralFilter = ADOPathUtil.CreateOrClause(aDOPathNodeArray);
            string[] strArrays = new string[6];
            strArrays[0] = "name";
            strArrays[1] = "distinguishedName";
            strArrays[2] = "objectClass";
            strArrays[3] = "objectGUID";
            strArrays[4] = "dNSHostName";
            strArrays[5] = "serverReferenceBL";
            ADDirectoryServerFactory <T> ._directoryServerDefaultAttributes = strArrays;
            AttributeConverterEntry[] attributeConverterEntry = new AttributeConverterEntry[14];
            attributeConverterEntry[0]  = new AttributeConverterEntry("Name", "Name", TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[1]  = new AttributeConverterEntry("Site", "Site", TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[2]  = new AttributeConverterEntry("IPv4Address", "HostName", TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(ADComputerFactory <ADComputer> .ToExtendedIPv4), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[3]  = new AttributeConverterEntry("IPv6Address", "HostName", TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(ADComputerFactory <ADComputer> .ToExtendedIPv6), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[4]  = new AttributeConverterEntry("Partitions", "Partitions", TypeConstants.String, false, TypeAdapterAccess.Read, false, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[5]  = new AttributeConverterEntry("DefaultPartition", "DefaultPartition", TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[6]  = new AttributeConverterEntry("HostName", "HostName", TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[7]  = new AttributeConverterEntry("LdapPort", "LdapPort", TypeConstants.Int, false, TypeAdapterAccess.Read, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[8]  = new AttributeConverterEntry("SslPort", "SslPort", TypeConstants.Int, false, TypeAdapterAccess.Read, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[9]  = new AttributeConverterEntry("OperationMasterRoles", "OperationMasterRole", TypeConstants.ADOperationMasterRole, false, TypeAdapterAccess.Read, false, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[10] = new AttributeConverterEntry("NTDSSettingsObjectDN", "NTDSSettingsObjectDN", TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[11] = new AttributeConverterEntry("ServerObjectDN", "ServerObjectDN", TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[12] = new AttributeConverterEntry("ServerObjectGuid", "ServerObjectGuid", TypeConstants.Guid, false, TypeAdapterAccess.Read, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[13] = new AttributeConverterEntry("InvocationId", "InvocationId", TypeConstants.Guid, false, TypeAdapterAccess.Read, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            ADDirectoryServerFactory <T> .ADMappingTable   = attributeConverterEntry;
            ADDirectoryServerFactory <T> .ADAMMappingTable = ADDirectoryServerFactory <T> .ADMappingTable;
            ADFactoryBase <T> .RegisterMappingTable(ADDirectoryServerFactory <T> .ADAMMappingTable, ADServerType.ADLDS);

            ADFactoryBase <T> .RegisterMappingTable(ADDirectoryServerFactory <T> .ADMappingTable, ADServerType.ADDS);
        }
Beispiel #3
0
        static ADReplicationSiteFactory()
        {
            ADReplicationSiteFactory <T> ._structuralObjectFilter = ADOPathUtil.CreateFilterClause(ADOperator.Like, "objectClass", "site");
            ADReplicationSiteFactory <T> ._rDNPrefix             = "CN";
            ADReplicationSiteFactory <T> ._structuralObjectClass = "site";
            string[] strArrays = new string[1];
            strArrays[0] = "name";
            ADReplicationSiteFactory <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(ADReplicationSiteFactory <T> ._identityLdapAttributes);
            genericIdentityResolver[1] = new IdentityResolverDelegate(IdentityResolverMethods.GuidSearchFilterIdentityResolver);
            customIdentityResolver[1]  = IdentityResolverMethods.GetAggregatedIdentityResolver(ADOperator.Or, genericIdentityResolver);
            ADReplicationSiteFactory <T> ._identityResolvers = customIdentityResolver;
            AttributeConverterEntry[] attributeConverterEntry = new AttributeConverterEntry[4];
            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(ADReplicationSiteFactory <T> .ADReplicationSitePropertyMap.Description.PropertyName, ADReplicationSiteFactory <T> .ADReplicationSitePropertyMap.Description.ADAttribute, TypeConstants.String, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[2] = new AttributeConverterEntry(ADReplicationSiteFactory <T> .ADReplicationSitePropertyMap.Subnet.PropertyName, ADReplicationSiteFactory <T> .ADReplicationSitePropertyMap.Subnet.ADAttribute, TypeConstants.ADReplicationSubnet, true, TypeAdapterAccess.Read, false, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedMultivalueObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[3] = new AttributeConverterEntry(ADReplicationSiteFactory <T> .ADReplicationSitePropertyMap.ManagedBy.PropertyName, ADReplicationSiteFactory <T> .ADReplicationSitePropertyMap.ManagedBy.ADAttribute, TypeConstants.ADPrincipal, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(ADReplicationSiteFactory <T> .ToDirectoryFromNameToManagedByDN), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            ADReplicationSiteFactory <T> .ADMappingTable   = attributeConverterEntry;
            ADReplicationSiteFactory <T> .ADAMMappingTable = ADReplicationSiteFactory <T> .ADMappingTable;
            ADFactoryBase <T> .RegisterMappingTable(ADReplicationSiteFactory <T> .ADMappingTable, ADServerType.ADDS);

            ADFactoryBase <T> .RegisterMappingTable(ADReplicationSiteFactory <T> .ADAMMappingTable, ADServerType.ADLDS);
        }
 static ADDomainFactory()
 {
     ADDomainFactory <T> ._domainStructuralFilter       = null;
     ADDomainFactory <T> ._domainIdentityLdapAttributes = null;
     ADDomainFactory <T> ._domainStructuralObjectClass  = "domainDNS";
     AttributeConverterEntry[] attributeConverterEntry = new AttributeConverterEntry[18];
     attributeConverterEntry[0]                   = new AttributeConverterEntry(ADDomainFactory <T> .ADDomainPropertyMap.AllowedDNSSuffixes.PropertyName, ADDomainFactory <T> .ADDomainPropertyMap.AllowedDNSSuffixes.ADAttribute, TypeConstants.String, true, TypeAdapterAccess.ReadWrite, false, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedMultivalueObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryMultivalueObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[1]                   = new AttributeConverterEntry(ADDomainFactory <T> .ADDomainPropertyMap.LastLogonReplicationInterval.PropertyName, ADDomainFactory <T> .ADDomainPropertyMap.LastLogonReplicationInterval.ADAttribute, TypeConstants.TimeSpan, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryDaysFromTimeSpan), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[2]                   = new AttributeConverterEntry(ADDomainFactory <T> .ADDomainPropertyMap.ManagedBy.PropertyName, ADDomainFactory <T> .ADDomainPropertyMap.ManagedBy.ADAttribute, TypeConstants.ADPrincipal, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryFromADObjectToDN <ADPrincipalFactory <ADPrincipal>, ADPrincipal>), new ToSearchFilterDelegate(SearchConverters.ToSearchFromADObjectToDN <ADPrincipalFactory <ADPrincipal>, ADPrincipal>));
     attributeConverterEntry[3]                   = new AttributeConverterEntry(ADDomainFactory <T> .ADDomainPropertyMap.DomainMode.PropertyName, ADDomainFactory <T> .ADDomainPropertyMap.DomainMode.ADAttribute, TypeConstants.ADDomainMode, true, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObjectWithCast <int>), new ToSearchFilterDelegate(SearchConverters.ToSearchEnum <ADDomainMode>));
     attributeConverterEntry[4]                   = new AttributeConverterEntry(ADDomainFactory <T> .ADDomainPropertyMap.DomainSID.PropertyName, ADDomainFactory <T> .ADDomainPropertyMap.DomainSID.ADAttribute, TypeConstants.SID, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[5]                   = new AttributeConverterEntry(ADDomainFactory <T> .ADDomainPropertyMap.LinkedGroupPolicyObjects.PropertyName, ADDomainFactory <T> .ADDomainPropertyMap.LinkedGroupPolicyObjects.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, false, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedMultivalueObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryMultivalueObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[6]                   = new AttributeConverterEntry(ADDomainFactory <T> .ADDomainPropertyMap.ChildDomains.PropertyName, ADDomainFactory <T> .ADDomainPropertyMap.ChildDomains.ADAttribute, TypeConstants.ADDomain, false, TypeAdapterAccess.Read, false, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedMultivalueObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryMultivalueObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[7]                   = new AttributeConverterEntry(ADDomainFactory <T> .ADDomainPropertyMap.ComputersContainer.PropertyName, ADDomainFactory <T> .ADDomainPropertyMap.ComputersContainer.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[8]                   = new AttributeConverterEntry(ADDomainFactory <T> .ADDomainPropertyMap.DomainControllersContainer.PropertyName, ADDomainFactory <T> .ADDomainPropertyMap.DomainControllersContainer.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[9]                   = new AttributeConverterEntry(ADDomainFactory <T> .ADDomainPropertyMap.ForeignSecurityPrincipalsContainer.PropertyName, ADDomainFactory <T> .ADDomainPropertyMap.ForeignSecurityPrincipalsContainer.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[10]                  = new AttributeConverterEntry(ADDomainFactory <T> .ADDomainPropertyMap.Forest.PropertyName, ADDomainFactory <T> .ADDomainPropertyMap.Forest.ADAttribute, TypeConstants.ADForest, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[11]                  = new AttributeConverterEntry(ADDomainFactory <T> .ADDomainPropertyMap.InfrastructureMaster.PropertyName, ADDomainFactory <T> .ADDomainPropertyMap.InfrastructureMaster.ADAttribute, TypeConstants.ADDomainController, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[12]                  = new AttributeConverterEntry(ADDomainFactory <T> .ADDomainPropertyMap.NetBIOSName.PropertyName, ADDomainFactory <T> .ADDomainPropertyMap.NetBIOSName.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[13]                  = new AttributeConverterEntry(ADDomainFactory <T> .ADDomainPropertyMap.PDCEmulator.PropertyName, ADDomainFactory <T> .ADDomainPropertyMap.PDCEmulator.ADAttribute, TypeConstants.ADDomainController, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[14]                  = new AttributeConverterEntry(ADDomainFactory <T> .ADDomainPropertyMap.ParentDomain.PropertyName, ADDomainFactory <T> .ADDomainPropertyMap.ParentDomain.ADAttribute, TypeConstants.ADDomain, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[15]                  = new AttributeConverterEntry(ADDomainFactory <T> .ADDomainPropertyMap.RIDMaster.PropertyName, ADDomainFactory <T> .ADDomainPropertyMap.RIDMaster.ADAttribute, TypeConstants.ADDomainController, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[16]                  = new AttributeConverterEntry(ADDomainFactory <T> .ADDomainPropertyMap.SystemsContainer.PropertyName, ADDomainFactory <T> .ADDomainPropertyMap.SystemsContainer.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[17]                  = new AttributeConverterEntry(ADDomainFactory <T> .ADDomainPropertyMap.UsersContainer.PropertyName, ADDomainFactory <T> .ADDomainPropertyMap.UsersContainer.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     ADDomainFactory <T> .ADMappingTable          = attributeConverterEntry;
     ADDomainFactory <T> ._domainStructuralFilter = ADOPathUtil.CreateFilterClause(ADOperator.Eq, "objectClass", ADDomainFactory <T> ._domainStructuralObjectClass);
     string[] strArrays = new string[3];
     strArrays[0] = "distinguishedName";
     strArrays[1] = "objectSid";
     strArrays[2] = "objectGUID";
     ADDomainFactory <T> ._domainIdentityLdapAttributes = strArrays;
     ADFactoryBase <T> .RegisterMappingTable(ADDomainFactory <T> .ADMappingTable, ADServerType.ADDS);
 }
        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 ADFineGrainedPasswordPolicyFactory()
 {
     ADFineGrainedPasswordPolicyFactory <T> ._fgppStructuralFilter = null;
     string[] strArrays = new string[2];
     strArrays[0] = "name";
     strArrays[1] = "distinguishedName";
     ADFineGrainedPasswordPolicyFactory <T> ._fgppIdentityLdapAttributes = strArrays;
     IdentityResolverDelegate[] aggregatedIdentityResolver = new IdentityResolverDelegate[1];
     IdentityResolverDelegate[] genericIdentityResolver    = new IdentityResolverDelegate[2];
     genericIdentityResolver[0]    = IdentityResolverMethods.GetGenericIdentityResolver(ADFineGrainedPasswordPolicyFactory <T> ._fgppIdentityLdapAttributes);
     genericIdentityResolver[1]    = new IdentityResolverDelegate(IdentityResolverMethods.GuidSearchFilterIdentityResolver);
     aggregatedIdentityResolver[0] = IdentityResolverMethods.GetAggregatedIdentityResolver(ADOperator.Or, genericIdentityResolver);
     ADFineGrainedPasswordPolicyFactory <T> ._identityResolvers = aggregatedIdentityResolver;
     AttributeConverterEntry[] attributeConverterEntry = new AttributeConverterEntry[11];
     attributeConverterEntry[0]  = new AttributeConverterEntry(ADFineGrainedPasswordPolicyFactory <T> .ADFineGrainedPasswordPolicyPropertyMap.LockoutDuration.PropertyName, ADFineGrainedPasswordPolicyFactory <T> .ADFineGrainedPasswordPolicyPropertyMap.LockoutDuration.ADAttribute, TypeConstants.TimeSpan, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedNoExpirationTimeSpan), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryNegativeTimeSpan), new ToSearchFilterDelegate(SearchConverters.ToSearchNegativeTimeSpan));
     attributeConverterEntry[1]  = new AttributeConverterEntry(ADFineGrainedPasswordPolicyFactory <T> .ADFineGrainedPasswordPolicyPropertyMap.LockoutObservationWindow.PropertyName, ADFineGrainedPasswordPolicyFactory <T> .ADFineGrainedPasswordPolicyPropertyMap.LockoutObservationWindow.ADAttribute, TypeConstants.TimeSpan, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedNoExpirationTimeSpan), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryNegativeTimeSpan), new ToSearchFilterDelegate(SearchConverters.ToSearchNegativeTimeSpan));
     attributeConverterEntry[2]  = new AttributeConverterEntry(ADFineGrainedPasswordPolicyFactory <T> .ADFineGrainedPasswordPolicyPropertyMap.LockoutThreshold.PropertyName, ADFineGrainedPasswordPolicyFactory <T> .ADFineGrainedPasswordPolicyPropertyMap.LockoutThreshold.ADAttribute, TypeConstants.Int, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[3]  = new AttributeConverterEntry(ADFineGrainedPasswordPolicyFactory <T> .ADFineGrainedPasswordPolicyPropertyMap.MaxPasswordAge.PropertyName, ADFineGrainedPasswordPolicyFactory <T> .ADFineGrainedPasswordPolicyPropertyMap.MaxPasswordAge.ADAttribute, TypeConstants.TimeSpan, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedNoExpirationTimeSpan), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryNoExpirationTimeSpan), new ToSearchFilterDelegate(SearchConverters.ToSearchNegativeTimeSpan));
     attributeConverterEntry[4]  = new AttributeConverterEntry(ADFineGrainedPasswordPolicyFactory <T> .ADFineGrainedPasswordPolicyPropertyMap.MinPasswordAge.PropertyName, ADFineGrainedPasswordPolicyFactory <T> .ADFineGrainedPasswordPolicyPropertyMap.MinPasswordAge.ADAttribute, TypeConstants.TimeSpan, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedNoExpirationTimeSpan), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryNegativeTimeSpan), new ToSearchFilterDelegate(SearchConverters.ToSearchNegativeTimeSpan));
     attributeConverterEntry[5]  = new AttributeConverterEntry(ADFineGrainedPasswordPolicyFactory <T> .ADFineGrainedPasswordPolicyPropertyMap.MinPasswordLength.PropertyName, ADFineGrainedPasswordPolicyFactory <T> .ADFineGrainedPasswordPolicyPropertyMap.MinPasswordLength.ADAttribute, TypeConstants.Int, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[6]  = new AttributeConverterEntry(ADFineGrainedPasswordPolicyFactory <T> .ADFineGrainedPasswordPolicyPropertyMap.PasswordHistoryCount.PropertyName, ADFineGrainedPasswordPolicyFactory <T> .ADFineGrainedPasswordPolicyPropertyMap.PasswordHistoryCount.ADAttribute, TypeConstants.Int, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[7]  = new AttributeConverterEntry(ADFineGrainedPasswordPolicyFactory <T> .ADFineGrainedPasswordPolicyPropertyMap.ComplexityEnabled.PropertyName, ADFineGrainedPasswordPolicyFactory <T> .ADFineGrainedPasswordPolicyPropertyMap.ComplexityEnabled.ADAttribute, TypeConstants.Bool, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[8]  = new AttributeConverterEntry(ADFineGrainedPasswordPolicyFactory <T> .ADFineGrainedPasswordPolicyPropertyMap.ReversibleEncryptionEnabled.PropertyName, ADFineGrainedPasswordPolicyFactory <T> .ADFineGrainedPasswordPolicyPropertyMap.ReversibleEncryptionEnabled.ADAttribute, TypeConstants.Bool, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[9]  = new AttributeConverterEntry(ADFineGrainedPasswordPolicyFactory <T> .ADFineGrainedPasswordPolicyPropertyMap.Precedence.PropertyName, ADFineGrainedPasswordPolicyFactory <T> .ADFineGrainedPasswordPolicyPropertyMap.Precedence.ADAttribute, TypeConstants.Int, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[10] = new AttributeConverterEntry(ADFineGrainedPasswordPolicyFactory <T> .ADFineGrainedPasswordPolicyPropertyMap.AppliesTo.PropertyName, ADFineGrainedPasswordPolicyFactory <T> .ADFineGrainedPasswordPolicyPropertyMap.AppliesTo.ADAttribute, TypeConstants.ADPrincipal, true, TypeAdapterAccess.Read, false, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedMultivalueObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryMultivalueObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     ADFineGrainedPasswordPolicyFactory <T> .ADMappingTable        = attributeConverterEntry;
     ADFineGrainedPasswordPolicyFactory <T> ._fgppStructuralFilter = ADOPathUtil.CreateFilterClause(ADOperator.Eq, "objectClass", "msDS-PasswordSettings");
     ADFactoryBase <T> .RegisterMappingTable(ADFineGrainedPasswordPolicyFactory <T> .ADMappingTable, ADServerType.ADDS);
 }
Beispiel #7
0
        internal static IADOPathNode BuildSearchFilter(IADOPathNode filter, MappingTable <AttributeConverterEntry> attrMapBaseObj, MappingTable <AttributeConverterEntry> attrMapChildObj, CmdletSessionInfo sessionInfo)
        {
            BinaryADOPathNode binaryADOPathNode = filter as BinaryADOPathNode;

            if (binaryADOPathNode == null)
            {
                return(null);
            }
            else
            {
                string ldapFilterString = binaryADOPathNode.LeftNode.GetLdapFilterString();
                AttributeConverterEntry attributeConverterEntry = null;
                if (!attrMapBaseObj.TryGetValue(ldapFilterString, out attributeConverterEntry))
                {
                    if (!attrMapChildObj.TryGetValue(ldapFilterString, out attributeConverterEntry))
                    {
                        string[] strArrays = new string[1];
                        strArrays[0] = ldapFilterString;
                        return(SearchConverters.ToSearchObjectClientSideFilter(ldapFilterString, strArrays, filter, sessionInfo));
                    }
                    else
                    {
                        return(attributeConverterEntry.InvokeToSearcherConverter(filter, sessionInfo));
                    }
                }
                else
                {
                    return(attributeConverterEntry.InvokeToSearcherConverter(filter, sessionInfo));
                }
            }
        }
Beispiel #8
0
        internal static ICollection <string> GetChildAttributes(MappingTable <AttributeConverterEntry> attrMapBaseObj, MappingTable <AttributeConverterEntry> attrMapChildObj, ICollection <string> propertiesToFetch)
        {
            AttributeConverterEntry attributeConverterEntry = null;
            HashSet <string>        strs = new HashSet <string>(StringComparer.OrdinalIgnoreCase);

            if (propertiesToFetch != null)
            {
                if (!propertiesToFetch.Contains("*"))
                {
                    foreach (string str in propertiesToFetch)
                    {
                        if (!attrMapChildObj.TryGetValue(str, out attributeConverterEntry) || attrMapBaseObj.TryGetValue(str, out attributeConverterEntry))
                        {
                            continue;
                        }
                        strs.Add(str);
                    }
                }
                else
                {
                    foreach (AttributeConverterEntry value in attrMapChildObj.Values)
                    {
                        strs.Add(value.ExtendedAttribute);
                    }
                }
            }
            return(strs);
        }
Beispiel #9
0
        static ADPrincipalFactory()
        {
            ADPrincipalFactory <T> ._principalStructuralFilter = null;
            string[] strArrays = new string[1];
            strArrays[0] = "sAMAccountName";
            ADPrincipalFactory <T> ._principalIdentityLdapAttributes = strArrays;
            IdentityResolverDelegate[] customIdentityResolver = new IdentityResolverDelegate[5];
            customIdentityResolver[0] = IdentityResolverMethods.GetCustomIdentityResolver(new IdentityResolverDelegate(IdentityResolverMethods.DistinguishedNameIdentityResolver));
            customIdentityResolver[1] = IdentityResolverMethods.GetCustomIdentityResolver(new IdentityResolverDelegate(IdentityResolverMethods.GuidIdentityResolver));
            customIdentityResolver[2] = IdentityResolverMethods.GetCustomIdentityResolver(new IdentityResolverDelegate(IdentityResolverMethods.SidIdentityResolver));
            customIdentityResolver[3] = IdentityResolverMethods.GetCustomIdentityResolver(new IdentityResolverDelegate(IdentityResolverMethods.SamAccountNameIdentityResolver));
            customIdentityResolver[4] = IdentityResolverMethods.GetGenericIdentityResolver(ADPrincipalFactory <T> ._principalIdentityLdapAttributes);
            ADPrincipalFactory <T> ._identityResolvers = customIdentityResolver;
            AttributeConverterEntry[] attributeConverterEntry = new AttributeConverterEntry[5];
            attributeConverterEntry[0]             = new AttributeConverterEntry(ADPrincipalFactory <T> .ADPrincipalPropertyMap.SamAccountName.PropertyName, ADPrincipalFactory <T> .ADPrincipalPropertyMap.SamAccountName.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            attributeConverterEntry[1]             = new AttributeConverterEntry(ADPrincipalFactory <T> .ADPrincipalPropertyMap.SID.PropertyName, ADPrincipalFactory <T> .ADPrincipalPropertyMap.SID.ADAttribute, TypeConstants.SID, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            attributeConverterEntry[2]             = new AttributeConverterEntry(ADPrincipalFactory <T> .ADPrincipalPropertyMap.HomePage.PropertyName, ADPrincipalFactory <T> .ADPrincipalPropertyMap.HomePage.ADAttribute, TypeConstants.String, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            attributeConverterEntry[3]             = new AttributeConverterEntry(ADPrincipalFactory <T> .ADPrincipalPropertyMap.SIDHistory.PropertyName, ADPrincipalFactory <T> .ADPrincipalPropertyMap.SIDHistory.ADAttribute, TypeConstants.SID, false, TypeAdapterAccess.Read, false, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedMultivalueObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            attributeConverterEntry[4]             = new AttributeConverterEntry(ADPrincipalFactory <T> .ADPrincipalPropertyMap.MemberOf.PropertyName, ADPrincipalFactory <T> .ADPrincipalPropertyMap.MemberOf.ADAttribute, TypeConstants.ADGroup, false, TypeAdapterAccess.Read, false, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedMultivalueObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            ADPrincipalFactory <T> .ADMappingTable = attributeConverterEntry;
            AttributeConverterEntry[] attributeConverterEntryArray = new AttributeConverterEntry[3];
            attributeConverterEntryArray[0]          = new AttributeConverterEntry(ADPrincipalFactory <T> .ADPrincipalPropertyMap.SID.PropertyName, ADPrincipalFactory <T> .ADPrincipalPropertyMap.SID.ADAMAttribute, TypeConstants.SID, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            attributeConverterEntryArray[1]          = new AttributeConverterEntry(ADPrincipalFactory <T> .ADPrincipalPropertyMap.HomePage.PropertyName, ADPrincipalFactory <T> .ADPrincipalPropertyMap.HomePage.ADAMAttribute, TypeConstants.String, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            attributeConverterEntryArray[2]          = new AttributeConverterEntry(ADPrincipalFactory <T> .ADPrincipalPropertyMap.MemberOf.PropertyName, ADPrincipalFactory <T> .ADPrincipalPropertyMap.MemberOf.ADAMAttribute, TypeConstants.ADGroup, false, TypeAdapterAccess.Read, false, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedMultivalueObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            ADPrincipalFactory <T> .ADAMMappingTable = attributeConverterEntryArray;
            IADOPathNode[] aDOPathNodeArray = new IADOPathNode[2];
            aDOPathNodeArray[0] = ADOPathUtil.CreateFilterClause(ADOperator.Eq, "objectClass", "group");
            aDOPathNodeArray[1] = ADOPathUtil.CreateFilterClause(ADOperator.Eq, "objectClass", "user");
            ADPrincipalFactory <T> ._principalStructuralFilter = ADOPathUtil.CreateOrClause(aDOPathNodeArray);
            ADFactoryBase <T> .RegisterMappingTable(ADPrincipalFactory <T> .ADAMMappingTable, ADServerType.ADLDS);

            ADFactoryBase <T> .RegisterMappingTable(ADPrincipalFactory <T> .ADMappingTable, ADServerType.ADDS);
        }
        static ADReplicationSiteLinkFactory()
        {
            ADReplicationSiteLinkFactory <T> ._rDNPrefix = "CN";
            string[] strArrays = new string[1];
            strArrays[0] = "name";
            ADReplicationSiteLinkFactory <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(ADReplicationSiteLinkFactory <T> ._identityLdapAttributes);
            genericIdentityResolver[1] = new IdentityResolverDelegate(IdentityResolverMethods.GuidSearchFilterIdentityResolver);
            customIdentityResolver[1]  = IdentityResolverMethods.GetAggregatedIdentityResolver(ADOperator.Or, genericIdentityResolver);
            ADReplicationSiteLinkFactory <T> ._identityResolvers = customIdentityResolver;
            AttributeConverterEntry[] attributeConverterEntry = new AttributeConverterEntry[5];
            attributeConverterEntry[0] = new AttributeConverterEntry(ADReplicationSiteLinkFactory <T> .ADReplicationSiteLinkPropertyMap.ReplicationSchedule.PropertyName, ADReplicationSiteLinkFactory <T> .ADReplicationSiteLinkPropertyMap.ReplicationSchedule.ADAttribute, TypeConstants.ByteArray, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedADReplicationScheduleFromBlob), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryBlobFromADReplicationSchedule), new ToSearchFilterDelegate(SearchConverters.ToSearchNotSupported));
            attributeConverterEntry[1] = new AttributeConverterEntry(ADReplicationSiteLinkFactory <T> .ADReplicationSiteLinkPropertyMap.ReplicationCost.PropertyName, ADReplicationSiteLinkFactory <T> .ADReplicationSiteLinkPropertyMap.ReplicationCost.ADAttribute, TypeConstants.Int, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            attributeConverterEntry[2] = new AttributeConverterEntry(ADReplicationSiteLinkFactory <T> .ADReplicationSiteLinkPropertyMap.ReplicationFrequencyInMinutes.PropertyName, ADReplicationSiteLinkFactory <T> .ADReplicationSiteLinkPropertyMap.ReplicationFrequencyInMinutes.ADAttribute, TypeConstants.Int, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            attributeConverterEntry[3] = new AttributeConverterEntry(ADReplicationSiteLinkFactory <T> .ADReplicationSiteLinkPropertyMap.InterSiteTransportProtocol.PropertyName, ADReplicationSiteLinkFactory <T> .ADReplicationSiteLinkPropertyMap.InterSiteTransportProtocol.ADAttribute, typeof(ADInterSiteTransportProtocolType), true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Extended, new ToExtendedFormatDelegate(ADTopologyUtil.ToExtendedFromDNToISTPEnum), null, new ToSearchFilterDelegate(SearchConverters.ToSearchNotSupported));
            attributeConverterEntry[4] = new AttributeConverterEntry(ADReplicationSiteLinkFactory <T> .ADReplicationSiteLinkPropertyMap.SitesIncluded.PropertyName, ADReplicationSiteLinkFactory <T> .ADReplicationSiteLinkPropertyMap.SitesIncluded.ADAttribute, TypeConstants.ADReplicationSite, true, TypeAdapterAccess.ReadWrite, false, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedMultivalueObject), new ToDirectoryFormatDelegate(ADTopologyUtil.ToDirectoryFromTopologyObjectNameListToDNList <ADReplicationSiteFactory <ADReplicationSite>, ADReplicationSite>), new ToSearchFilterDelegate(ADTopologyUtil.ToSearchFromTopologyObjectNameToDN <ADReplicationSiteFactory <ADReplicationSite>, ADReplicationSite>));
            ADReplicationSiteLinkFactory <T> .ADMappingTable   = attributeConverterEntry;
            ADReplicationSiteLinkFactory <T> .ADAMMappingTable = ADReplicationSiteLinkFactory <T> .ADMappingTable;
            ADFactoryBase <T> .RegisterMappingTable(ADReplicationSiteLinkFactory <T> .ADMappingTable, ADServerType.ADDS);

            ADFactoryBase <T> .RegisterMappingTable(ADReplicationSiteLinkFactory <T> .ADAMMappingTable, ADServerType.ADLDS);
        }
Beispiel #11
0
        static ADObjectFactory()
        {
            ADObjectFactory <T> ._structuralObjectFilter = ADOPathUtil.CreateFilterClause(ADOperator.Like, "objectClass", "*");
            ADObjectFactory <T> ._rDNPrefix              = "CN";
            ADObjectFactory <T> ._structuralObjectClass  = "top";
            ADObjectFactory <T> ._identityLdapAttributes = new string[0];
            IdentityResolverDelegate[] customIdentityResolver = new IdentityResolverDelegate[2];
            customIdentityResolver[0] = IdentityResolverMethods.GetCustomIdentityResolver(new IdentityResolverDelegate(IdentityResolverMethods.DistinguishedNameIdentityResolver));
            customIdentityResolver[1] = IdentityResolverMethods.GetCustomIdentityResolver(new IdentityResolverDelegate(IdentityResolverMethods.GuidIdentityResolver));
            ADObjectFactory <T> ._identityResolvers = customIdentityResolver;
            AttributeConverterEntry[] attributeConverterEntry = new AttributeConverterEntry[14];
            attributeConverterEntry[0]            = new AttributeConverterEntry(ADObjectFactory <T> .ADObjectPropertyMap.DistinguishedName.PropertyName, ADObjectFactory <T> .ADObjectPropertyMap.DistinguishedName.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            attributeConverterEntry[1]            = new AttributeConverterEntry(ADObjectFactory <T> .ADObjectPropertyMap.ObjectClass.PropertyName, ADObjectFactory <T> .ADObjectPropertyMap.ObjectClass.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            attributeConverterEntry[2]            = new AttributeConverterEntry(ADObjectFactory <T> .ADObjectPropertyMap.CanonicalName.PropertyName, ADObjectFactory <T> .ADObjectPropertyMap.CanonicalName.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            attributeConverterEntry[3]            = new AttributeConverterEntry(ADObjectFactory <T> .ADObjectPropertyMap.GUID.PropertyName, ADObjectFactory <T> .ADObjectPropertyMap.GUID.ADAttribute, TypeConstants.Guid, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchGuid));
            attributeConverterEntry[4]            = new AttributeConverterEntry(ADObjectFactory <T> .ADObjectPropertyMap.CN.PropertyName, ADObjectFactory <T> .ADObjectPropertyMap.CN.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            attributeConverterEntry[5]            = new AttributeConverterEntry(ADObjectFactory <T> .ADObjectPropertyMap.CreationTimeStamp.PropertyName, ADObjectFactory <T> .ADObjectPropertyMap.CreationTimeStamp.ADAttribute, TypeConstants.DateTime, false, TypeAdapterAccess.Read, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedDateTimeFromDateTime), null, new ToSearchFilterDelegate(SearchConverters.ToSearchDateTimeUsingSchemaInfo));
            attributeConverterEntry[6]            = new AttributeConverterEntry(ADObjectFactory <T> .ADObjectPropertyMap.Description.PropertyName, ADObjectFactory <T> .ADObjectPropertyMap.Description.ADAttribute, TypeConstants.String, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            attributeConverterEntry[7]            = new AttributeConverterEntry(ADObjectFactory <T> .ADObjectPropertyMap.DisplayName.PropertyName, ADObjectFactory <T> .ADObjectPropertyMap.DisplayName.ADAttribute, TypeConstants.String, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            attributeConverterEntry[8]            = new AttributeConverterEntry(ADObjectFactory <T> .ADObjectPropertyMap.IsDeleted.PropertyName, ADObjectFactory <T> .ADObjectPropertyMap.IsDeleted.ADAttribute, TypeConstants.Bool, false, TypeAdapterAccess.Read, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            attributeConverterEntry[9]            = new AttributeConverterEntry(ADObjectFactory <T> .ADObjectPropertyMap.LastKnownParent.PropertyName, ADObjectFactory <T> .ADObjectPropertyMap.LastKnownParent.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            attributeConverterEntry[10]           = new AttributeConverterEntry(ADObjectFactory <T> .ADObjectPropertyMap.ModifiedTimeStamp.PropertyName, ADObjectFactory <T> .ADObjectPropertyMap.ModifiedTimeStamp.ADAttribute, TypeConstants.DateTime, false, TypeAdapterAccess.Read, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedDateTimeFromDateTime), null, new ToSearchFilterDelegate(SearchConverters.ToSearchDateTimeUsingSchemaInfo));
            attributeConverterEntry[11]           = new AttributeConverterEntry(ADObjectFactory <T> .ADObjectPropertyMap.ObjectCategory.PropertyName, ADObjectFactory <T> .ADObjectPropertyMap.ObjectCategory.ADAttribute, TypeConstants.String, true, TypeAdapterAccess.Read, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            attributeConverterEntry[12]           = new AttributeConverterEntry(ADObjectFactory <T> .ADObjectPropertyMap.Name.PropertyName, ADObjectFactory <T> .ADObjectPropertyMap.Name.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            attributeConverterEntry[13]           = new AttributeConverterEntry(ADObjectFactory <T> .ADObjectPropertyMap.ProtectedFromDeletion.PropertyName, ADObjectFactory <T> .ADObjectPropertyMap.ProtectedFromDeletion.ADAttribute, TypeConstants.Bool, false, TypeAdapterAccess.ReadWrite, true, AttributeSet.Extended, new ToExtendedFormatDelegate(ADObjectFactory <T> .ToExtendedProtectedFromDeletion), null, new ToSearchFilterDelegate(SearchConverters.ToSearchNotSupported));
            ADObjectFactory <T> .ADMappingTable   = attributeConverterEntry;
            ADObjectFactory <T> .ADAMMappingTable = ADObjectFactory <T> .ADMappingTable;
            ADFactoryBase <T> .RegisterMappingTable(ADObjectFactory <T> .ADAMMappingTable, ADServerType.ADLDS);

            ADFactoryBase <T> .RegisterMappingTable(ADObjectFactory <T> .ADMappingTable, ADServerType.ADDS);
        }
Beispiel #12
0
        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);
        }
Beispiel #13
0
        static ADServiceAccountFactory()
        {
            IADOPathNode[] aDOPathNodeArray  = new IADOPathNode[2];
            IADOPathNode[] aDOPathNodeArray1 = new IADOPathNode[2];
            aDOPathNodeArray1[0] = ADOPathUtil.CreateFilterClause(ADOperator.Eq, "objectClass", "msDS-ManagedServiceAccount");
            aDOPathNodeArray1[1] = ADOPathUtil.CreateFilterClause(ADOperator.Eq, "objectCategory", "msDS-ManagedServiceAccount");
            aDOPathNodeArray[0]  = ADOPathUtil.CreateAndClause(aDOPathNodeArray1);
            aDOPathNodeArray[1]  = ADOPathUtil.CreateFilterClause(ADOperator.Eq, "objectClass", "msDS-GroupManagedServiceAccount");
            ADServiceAccountFactory <T> ._structuralObjectFilter = ADOPathUtil.CreateOrClause(aDOPathNodeArray);
            string[] strArrays = new string[1];
            strArrays[0] = "sAMAccountName";
            ADServiceAccountFactory <T> ._serviceAccountIdentityLdapAttributes = strArrays;
            IdentityResolverDelegate[] customIdentityResolver = new IdentityResolverDelegate[5];
            customIdentityResolver[0] = IdentityResolverMethods.GetCustomIdentityResolver(new IdentityResolverDelegate(IdentityResolverMethods.DistinguishedNameIdentityResolver));
            customIdentityResolver[1] = IdentityResolverMethods.GetCustomIdentityResolver(new IdentityResolverDelegate(IdentityResolverMethods.GuidIdentityResolver));
            customIdentityResolver[2] = IdentityResolverMethods.GetCustomIdentityResolver(new IdentityResolverDelegate(IdentityResolverMethods.SidIdentityResolver));
            customIdentityResolver[3] = IdentityResolverMethods.GetCustomIdentityResolver(new IdentityResolverDelegate(IdentityResolverMethods.SamAccountNameIdentityResolver));
            customIdentityResolver[4] = ADComputerUtil.GetGenericIdentityResolverWithSamName(ADServiceAccountFactory <T> ._serviceAccountIdentityLdapAttributes);
            ADServiceAccountFactory <T> ._identityResolvers = customIdentityResolver;
            AttributeConverterEntry[] attributeConverterEntry = new AttributeConverterEntry[5];
            attributeConverterEntry[0] = new AttributeConverterEntry(ADPrincipalFactory <T> .ADPrincipalPropertyMap.SamAccountName.PropertyName, ADPrincipalFactory <T> .ADPrincipalPropertyMap.SamAccountName.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(ADComputerUtil.ToDirectoryServiceAccountSamAccountName), new ToSearchFilterDelegate(ADComputerUtil.ToSearchComputerSamAccountName));
            attributeConverterEntry[1] = new AttributeConverterEntry(ADServiceAccountFactory <T> .ADServiceAccountPropertyMap.HostComputers.PropertyName, ADServiceAccountFactory <T> .ADServiceAccountPropertyMap.HostComputers.ADAttribute, TypeConstants.String, true, TypeAdapterAccess.Read, false, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedMultivalueObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryMultivalueObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            attributeConverterEntry[2] = new AttributeConverterEntry(ADServiceAccountFactory <T> .ADServiceAccountPropertyMap.DNSHostName.PropertyName, ADServiceAccountFactory <T> .ADServiceAccountPropertyMap.DNSHostName.ADAttribute, TypeConstants.String, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            attributeConverterEntry[3] = new AttributeConverterEntry(ADServiceAccountFactory <T> .ADServiceAccountPropertyMap.PrincipalsAllowedToRetrieveManagedPassword.PropertyName, ADServiceAccountFactory <T> .ADServiceAccountPropertyMap.PrincipalsAllowedToRetrieveManagedPassword.ADAttribute, TypeConstants.ADPrincipal, true, TypeAdapterAccess.ReadWrite, false, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedPrincipalFromSecDesc), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectorySecDescFromPrincipal), new ToSearchFilterDelegate(SearchConverters.ToSearchNotSupported));
            attributeConverterEntry[4] = new AttributeConverterEntry(ADServiceAccountFactory <T> .ADServiceAccountPropertyMap.ManagedPasswordIntervalInDays.PropertyName, ADServiceAccountFactory <T> .ADServiceAccountPropertyMap.ManagedPasswordIntervalInDays.ADAttribute, TypeConstants.Int, true, TypeAdapterAccess.ReadWrite, false, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            ADServiceAccountFactory <T> .ADMappingTable = attributeConverterEntry;
            ADFactoryBase <T> .RegisterMappingTable(ADServiceAccountFactory <T> .ADMappingTable, ADServerType.ADDS);

            ADAccountFactory <T> .DefaultUserAccessControl      = 0x1002;
            ADAccountFactory <T> .UseComputerPasswordGeneration = true;
        }
Beispiel #14
0
 internal virtual IADOPathNode BuildSearchFilter(IADOPathNode filter)
 {
     if (this.CmdletSessionInfo != null)
     {
         MappingTable <AttributeConverterEntry> item = ADFactoryBase <T> .AttributeTable[this.ConnectedStore];
         BinaryADOPathNode binaryADOPathNode         = filter as BinaryADOPathNode;
         if (binaryADOPathNode == null)
         {
             return(null);
         }
         else
         {
             string ldapFilterString = binaryADOPathNode.LeftNode.GetLdapFilterString();
             AttributeConverterEntry attributeConverterEntry = null;
             if (!item.TryGetValue(ldapFilterString, out attributeConverterEntry))
             {
                 string[] strArrays = new string[1];
                 strArrays[0] = ldapFilterString;
                 return(SearchConverters.ToSearchUsingSchemaInfo(ldapFilterString, strArrays, filter, this.CmdletSessionInfo));
             }
             else
             {
                 return(attributeConverterEntry.InvokeToSearcherConverter(filter, this.CmdletSessionInfo));
             }
         }
     }
     else
     {
         throw new ArgumentNullException(StringResources.SessionRequired);
     }
 }
Beispiel #15
0
 static ADForestFactory()
 {
     ADForestFactory <T> ._forestStructuralFilter       = null;
     ADForestFactory <T> ._forestIdentityLdapAttributes = null;
     AttributeConverterEntry[] attributeConverterEntry = new AttributeConverterEntry[13];
     attributeConverterEntry[0]                   = new AttributeConverterEntry(ADForestFactory <T> .ADForestPropertyMap.UPNSuffixes.PropertyName, ADForestFactory <T> .ADForestPropertyMap.UPNSuffixes.ADAttribute, TypeConstants.String, true, TypeAdapterAccess.ReadWrite, false, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedMultivalueObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryMultivalueObject), new ToSearchFilterDelegate(SearchConverters.ToSearchMultivalueObject));
     attributeConverterEntry[1]                   = new AttributeConverterEntry(ADForestFactory <T> .ADForestPropertyMap.SPNSuffixes.PropertyName, ADForestFactory <T> .ADForestPropertyMap.SPNSuffixes.ADAttribute, TypeConstants.String, true, TypeAdapterAccess.ReadWrite, false, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedMultivalueObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryMultivalueObject), new ToSearchFilterDelegate(SearchConverters.ToSearchMultivalueObject));
     attributeConverterEntry[2]                   = new AttributeConverterEntry(ADForestFactory <T> .ADForestPropertyMap.PartitionsContainer.PropertyName, ADForestFactory <T> .ADForestPropertyMap.PartitionsContainer.ADAttribute, TypeConstants.String, true, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchObject));
     attributeConverterEntry[3]                   = new AttributeConverterEntry(ADForestFactory <T> .ADForestPropertyMap.ForestMode.PropertyName, ADForestFactory <T> .ADForestPropertyMap.ForestMode.ADAttribute, TypeConstants.ADForestMode, true, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObjectWithCast <int>), new ToSearchFilterDelegate(SearchConverters.ToSearchEnum <ADForestMode>));
     attributeConverterEntry[4]                   = new AttributeConverterEntry(ADForestFactory <T> .ADForestPropertyMap.ApplicationPartitions.PropertyName, ADForestFactory <T> .ADForestPropertyMap.ApplicationPartitions.ADAttribute, TypeConstants.ADPartition, false, TypeAdapterAccess.Read, false, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedMultivalueObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryMultivalueObject), new ToSearchFilterDelegate(SearchConverters.ToSearchMultivalueObject));
     attributeConverterEntry[5]                   = new AttributeConverterEntry(ADForestFactory <T> .ADForestPropertyMap.CrossForestReferences.PropertyName, ADForestFactory <T> .ADForestPropertyMap.CrossForestReferences.ADAttribute, TypeConstants.ADPartition, false, TypeAdapterAccess.Read, false, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedMultivalueObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryMultivalueObject), new ToSearchFilterDelegate(SearchConverters.ToSearchMultivalueObject));
     attributeConverterEntry[6]                   = new AttributeConverterEntry(ADForestFactory <T> .ADForestPropertyMap.Domains.PropertyName, ADForestFactory <T> .ADForestPropertyMap.Domains.ADAttribute, TypeConstants.ADDomain, false, TypeAdapterAccess.Read, false, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedMultivalueObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryMultivalueObject), new ToSearchFilterDelegate(SearchConverters.ToSearchMultivalueObject));
     attributeConverterEntry[7]                   = new AttributeConverterEntry(ADForestFactory <T> .ADForestPropertyMap.GlobalCatalogs.PropertyName, ADForestFactory <T> .ADForestPropertyMap.GlobalCatalogs.ADAttribute, TypeConstants.ADDomainController, false, TypeAdapterAccess.Read, false, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedMultivalueObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryMultivalueObject), new ToSearchFilterDelegate(SearchConverters.ToSearchMultivalueObject));
     attributeConverterEntry[8]                   = new AttributeConverterEntry(ADForestFactory <T> .ADForestPropertyMap.Sites.PropertyName, ADForestFactory <T> .ADForestPropertyMap.Sites.ADAttribute, TypeConstants.ADReplicationSite, false, TypeAdapterAccess.Read, false, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedMultivalueObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryMultivalueObject), new ToSearchFilterDelegate(SearchConverters.ToSearchMultivalueObject));
     attributeConverterEntry[9]                   = new AttributeConverterEntry(ADForestFactory <T> .ADForestPropertyMap.DomainNamingMaster.PropertyName, ADForestFactory <T> .ADForestPropertyMap.DomainNamingMaster.ADAttribute, TypeConstants.ADDomainController, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchObject));
     attributeConverterEntry[10]                  = new AttributeConverterEntry(ADForestFactory <T> .ADForestPropertyMap.RootDomain.PropertyName, ADForestFactory <T> .ADForestPropertyMap.RootDomain.ADAttribute, TypeConstants.ADDomain, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchObject));
     attributeConverterEntry[11]                  = new AttributeConverterEntry(ADForestFactory <T> .ADForestPropertyMap.Name.PropertyName, ADForestFactory <T> .ADForestPropertyMap.Name.ADAttribute, TypeConstants.ADDomain, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchObject));
     attributeConverterEntry[12]                  = new AttributeConverterEntry(ADForestFactory <T> .ADForestPropertyMap.SchemaMaster.PropertyName, ADForestFactory <T> .ADForestPropertyMap.SchemaMaster.ADAttribute, TypeConstants.ADDomainController, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchObject));
     ADForestFactory <T> .ADMappingTable          = attributeConverterEntry;
     ADForestFactory <T> ._forestStructuralFilter = ADOPathUtil.CreateFilterClause(ADOperator.Eq, "objectClass", "crossRefContainer");
     string[] strArrays = new string[3];
     strArrays[0] = "distinguishedName";
     strArrays[1] = "objectSid";
     strArrays[2] = "objectGUID";
     ADForestFactory <T> ._forestIdentityLdapAttributes = strArrays;
     ADFactoryBase <T> .RegisterMappingTable(ADForestFactory <T> .ADMappingTable, ADServerType.ADDS);
 }
        static ADOptionalFeatureFactory()
        {
            ADOptionalFeatureFactory <T> ._ofStructuralFilter = null;
            string[] strArrays = new string[1];
            strArrays[0] = "name";
            ADOptionalFeatureFactory <T> ._ofIdentityLdapAttributes = strArrays;
            IdentityResolverDelegate[] customIdentityResolver = new IdentityResolverDelegate[3];
            customIdentityResolver[0] = IdentityResolverMethods.GetCustomIdentityResolver(new IdentityResolverDelegate(IdentityResolverMethods.DistinguishedNameIdentityResolver));
            customIdentityResolver[1] = IdentityResolverMethods.GetCustomIdentityResolver(new IdentityResolverDelegate(ADOptionalFeatureFactory <T> .ADOFGuidIdentityResolver));
            customIdentityResolver[2] = IdentityResolverMethods.GetGenericIdentityResolver(ADOptionalFeatureFactory <T> ._ofIdentityLdapAttributes);
            ADOptionalFeatureFactory <T> ._identityResolvers = customIdentityResolver;
            AttributeConverterEntry[] attributeConverterEntry = new AttributeConverterEntry[6];
            attributeConverterEntry[0] = new AttributeConverterEntry(ADOptionalFeatureFactory <T> .ADOptionalFeaturePropertyMap.EnabledScopes.PropertyName, ADOptionalFeatureFactory <T> .ADOptionalFeaturePropertyMap.EnabledScopes.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, false, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedMultivalueObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            attributeConverterEntry[1] = new AttributeConverterEntry(ADOptionalFeatureFactory <T> .ADOptionalFeaturePropertyMap.FeatureScope.PropertyName, ADOptionalFeatureFactory <T> .ADOptionalFeaturePropertyMap.FeatureScope.ADAttribute, TypeConstants.Int, false, TypeAdapterAccess.Read, false, AttributeSet.Default, new ToExtendedFormatDelegate(ADOptionalFeatureFactory <T> .ToExtendedFeatureScope), null, new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            attributeConverterEntry[2] = new AttributeConverterEntry(ADOptionalFeatureFactory <T> .ADOptionalFeaturePropertyMap.IsDisableable.PropertyName, ADOptionalFeatureFactory <T> .ADOptionalFeaturePropertyMap.IsDisableable.ADAttribute, TypeConstants.Bool, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(ADOptionalFeatureFactory <T> .ToExtendedIsDisableable), null, new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            attributeConverterEntry[3] = new AttributeConverterEntry(ADOptionalFeatureFactory <T> .ADOptionalFeaturePropertyMap.FeatureGUID.PropertyName, ADOptionalFeatureFactory <T> .ADOptionalFeaturePropertyMap.FeatureGUID.ADAttribute, TypeConstants.Guid, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedGuid), null, new ToSearchFilterDelegate(SearchConverters.ToSearchGuid));
            attributeConverterEntry[4] = new AttributeConverterEntry(ADOptionalFeatureFactory <T> .ADOptionalFeaturePropertyMap.RequiredDomainMode.PropertyName, ADOptionalFeatureFactory <T> .ADOptionalFeaturePropertyMap.RequiredDomainMode.ADAttribute, TypeConstants.ADDomainMode, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObjectWithCast <ADDomainMode>), null, new ToSearchFilterDelegate(SearchConverters.ToSearchEnum <ADDomainMode>));
            attributeConverterEntry[5] = new AttributeConverterEntry(ADOptionalFeatureFactory <T> .ADOptionalFeaturePropertyMap.RequiredForestMode.PropertyName, ADOptionalFeatureFactory <T> .ADOptionalFeaturePropertyMap.RequiredForestMode.ADAttribute, TypeConstants.ADForestMode, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObjectWithCast <ADForestMode>), null, new ToSearchFilterDelegate(SearchConverters.ToSearchEnum <ADForestMode>));
            ADOptionalFeatureFactory <T> .ADMappingTable      = attributeConverterEntry;
            ADOptionalFeatureFactory <T> .ADAMMappingTable    = ADOptionalFeatureFactory <T> .ADMappingTable;
            ADOptionalFeatureFactory <T> ._ofStructuralFilter = ADOPathUtil.CreateFilterClause(ADOperator.Eq, "objectClass", "msDS-OptionalFeature");
            ADFactoryBase <T> .RegisterMappingTable(ADOptionalFeatureFactory <T> .ADMappingTable, ADServerType.ADDS);

            ADFactoryBase <T> .RegisterMappingTable(ADOptionalFeatureFactory <T> .ADAMMappingTable, ADServerType.ADLDS);
        }
Beispiel #17
0
 static ADClaimTypeFactory()
 {
     ADClaimTypeFactory <T> ._rDNPrefix = "CN";
     string[] strArrays = new string[2];
     strArrays[0] = "name";
     strArrays[1] = "displayName";
     ADClaimTypeFactory <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(ADClaimTypeFactory <T> ._identityLdapAttributes);
     genericIdentityResolver[1] = new IdentityResolverDelegate(IdentityResolverMethods.GuidSearchFilterIdentityResolver);
     customIdentityResolver[1]  = IdentityResolverMethods.GetAggregatedIdentityResolver(ADOperator.Or, genericIdentityResolver);
     ADClaimTypeFactory <T> ._identityResolvers = customIdentityResolver;
     string[] strArrays1 = new string[4];
     strArrays1[0] = "msDS-ManagedServiceAccount";
     strArrays1[1] = "user";
     strArrays1[2] = "computer";
     strArrays1[3] = "inetOrgPerson";
     ADClaimTypeFactory <T> .ValidAppliesToClasses = strArrays1;
     string[] strArrays2 = new string[4];
     strArrays2[0] = "dBCSPwd";
     strArrays2[1] = "lmPwdHistory";
     strArrays2[2] = "dBCSPwd";
     strArrays2[3] = "unicodePwd";
     ADClaimTypeFactory <T> .BlockedAttributes        = strArrays2;
     ADClaimTypeFactory <T> .FLAG_ATTR_NOT_REPLICATED = 1;
     ADClaimTypeFactory <T> .RODCFilteredAttribute    = 0x200;
     string[] strArrays3 = new string[3];
     strArrays3[0] = "2.5.5.1";
     strArrays3[1] = "2.5.5.12";
     strArrays3[2] = "2.5.5.15";
     ADClaimTypeFactory <T> .ValidAttributeSyntaxString = strArrays3;
     string[] strArrays4 = new string[2];
     strArrays4[0] = "2.5.5.9";
     strArrays4[1] = "2.5.5.16";
     ADClaimTypeFactory <T> .ValidAttributeSyntaxInt     = strArrays4;
     ADClaimTypeFactory <T> .ValidAttributeSyntaxUInt    = "2.5.5.2";
     ADClaimTypeFactory <T> .ValidBooleanAttributeSyntax = "2.5.5.8";
     string[] strArrays5 = new string[5];
     strArrays5[0] = "lDAPDisplayName";
     strArrays5[1] = "systemFlags";
     strArrays5[2] = "attributeSyntax";
     strArrays5[3] = "isDefunct";
     strArrays5[4] = "searchFlags";
     ADClaimTypeFactory <T> .SchemaAttributeProperties = strArrays5;
     AttributeConverterEntry[] attributeConverterEntry = new AttributeConverterEntry[8];
     attributeConverterEntry[0]             = new AttributeConverterEntry(ADClaimTypeFactory <T> .ADClaimTypePropertyMap.SourceAttribute.PropertyName, ADClaimTypeFactory <T> .ADClaimTypePropertyMap.SourceAttribute.ADAttribute, TypeConstants.String, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(ADClaimTypeFactory <T> .ToDirectoryFromSourceAttributeToDN), new ToSearchFilterDelegate(ADCBACUtil.ToSearchFromSchemaObjectNameToDN));
     attributeConverterEntry[1]             = new AttributeConverterEntry(ADClaimTypeFactory <T> .ADClaimTypePropertyMap.SourceOID.PropertyName, ADClaimTypeFactory <T> .ADClaimTypePropertyMap.SourceOID.ADAttribute, TypeConstants.String, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[2]             = new AttributeConverterEntry(ADClaimTypeFactory <T> .ADClaimTypePropertyMap.AppliesToClasses.PropertyName, ADClaimTypeFactory <T> .ADClaimTypePropertyMap.AppliesToClasses.ADAttribute, TypeConstants.String, true, TypeAdapterAccess.ReadWrite, false, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedMultivalueObject), new ToDirectoryFormatDelegate(ADCBACUtil.ToDirectoryFromSchemaObjectNameListToDNList), new ToSearchFilterDelegate(ADCBACUtil.ToSearchFromSchemaObjectNameToDN));
     attributeConverterEntry[3]             = new AttributeConverterEntry(ADClaimTypeFactory <T> .ADClaimTypePropertyMap.RestrictValues.PropertyName, ADClaimTypeFactory <T> .ADClaimTypePropertyMap.RestrictValues.ADAttribute, TypeConstants.Bool, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[4]             = new AttributeConverterEntry(ADClaimTypeFactory <T> .ADClaimTypePropertyMap.ValueType.PropertyName, ADClaimTypeFactory <T> .ADClaimTypePropertyMap.ValueType.ADAttribute, TypeConstants.ADClaimValueType, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(ADClaimTypeBaseFactory <ADClaimTypeBase> .ToExtendedFromIntToValueTypeEnum), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObjectWithCast <long>), new ToSearchFilterDelegate(SearchConverters.ToSearchEnum <ADClaimValueType>));
     attributeConverterEntry[5]             = new AttributeConverterEntry(ADClaimTypeFactory <T> .ADClaimTypePropertyMap.IsSingleValued.PropertyName, ADClaimTypeFactory <T> .ADClaimTypePropertyMap.IsSingleValued.ADAttribute, TypeConstants.Bool, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[6]             = new AttributeConverterEntry(ADClaimTypeFactory <T> .ADClaimTypePropertyMap.CompatibleResourceTypes.PropertyName, ADClaimTypeFactory <T> .ADClaimTypePropertyMap.CompatibleResourceTypes.ADAttribute, TypeConstants.ADResourcePropertyValueType, true, TypeAdapterAccess.Read, false, AttributeSet.Default, new ToExtendedFormatDelegate(ADClaimTypeFactory <T> .ToCompatibleResourceTypes), null, new ToSearchFilterDelegate(SearchConverters.ToSearchNotSupported));
     attributeConverterEntry[7]             = new AttributeConverterEntry(ADClaimTypeFactory <T> .ADClaimTypePropertyMap.ClaimSourceType.PropertyName, ADClaimTypeFactory <T> .ADClaimTypePropertyMap.ClaimSourceType.ADAttribute, TypeConstants.String, true, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     ADClaimTypeFactory <T> .ADMappingTable = attributeConverterEntry;
     ADFactoryBase <T> .RegisterMappingTable(ADClaimTypeFactory <T> .ADMappingTable, ADServerType.ADDS);
 }
 static ADPartitionFactory()
 {
     AttributeConverterEntry[] attributeConverterEntry = new AttributeConverterEntry[7];
     attributeConverterEntry[0]             = new AttributeConverterEntry(ADPartitionFactory <T> .ADPartitionPropertyMap.SubordinateReferences.PropertyName, ADPartitionFactory <T> .ADPartitionPropertyMap.SubordinateReferences.ADAttribute, TypeConstants.ADPartition, false, TypeAdapterAccess.Read, false, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedMultivalueObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryMultivalueObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[1]             = new AttributeConverterEntry(ADPartitionFactory <T> .ADPartitionPropertyMap.DNSRoot.PropertyName, ADPartitionFactory <T> .ADPartitionPropertyMap.DNSRoot.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[2]             = new AttributeConverterEntry(ADPartitionFactory <T> .ADPartitionPropertyMap.LostAndFoundContainer.PropertyName, ADPartitionFactory <T> .ADPartitionPropertyMap.LostAndFoundContainer.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[3]             = new AttributeConverterEntry(ADPartitionFactory <T> .ADPartitionPropertyMap.DeletedObjectsContainer.PropertyName, ADPartitionFactory <T> .ADPartitionPropertyMap.DeletedObjectsContainer.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[4]             = new AttributeConverterEntry(ADPartitionFactory <T> .ADPartitionPropertyMap.QuotasContainer.PropertyName, ADPartitionFactory <T> .ADPartitionPropertyMap.QuotasContainer.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[5]             = new AttributeConverterEntry(ADPartitionFactory <T> .ADPartitionPropertyMap.ReadOnlyReplicaDirectoryServers.PropertyName, ADPartitionFactory <T> .ADPartitionPropertyMap.ReadOnlyReplicaDirectoryServers.ADAttribute, TypeConstants.ADDirectoryServer, false, TypeAdapterAccess.Read, false, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedMultivalueObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryMultivalueObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[6]             = new AttributeConverterEntry(ADPartitionFactory <T> .ADPartitionPropertyMap.ReplicaDirectoryServers.PropertyName, ADPartitionFactory <T> .ADPartitionPropertyMap.ReplicaDirectoryServers.ADAttribute, TypeConstants.ADDirectoryServer, false, TypeAdapterAccess.Read, false, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedMultivalueObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryMultivalueObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     ADPartitionFactory <T> .ADMappingTable = attributeConverterEntry;
     ADFactoryBase <T> .RegisterMappingTable(ADPartitionFactory <T> .ADMappingTable, ADServerType.ADDS);
 }
Beispiel #19
0
        internal override void UpdateFromObject(T modifiedObject, ADObject directoryObj)
        {
            AttributeConverterEntry attributeConverterEntry = null;

            if (modifiedObject.Contains("SuggestedValues"))
            {
                MappingTable <AttributeConverterEntry> item = ADClaimTypeBaseFactory <T> .AttributeTable[base.ConnectedStore];
                if (item.TryGetValue("SuggestedValues", out attributeConverterEntry))
                {
                    attributeConverterEntry.InvokeToDirectoryConverter(modifiedObject["SuggestedValues"], directoryObj, base.CmdletSessionInfo);
                }
            }
            base.UpdateFromObject(modifiedObject, directoryObj);
        }
Beispiel #20
0
        static ADGroupFactory()
        {
            ADGroupFactory <T> ._groupStructuralFilter = null;
            AttributeConverterEntry[] attributeConverterEntry = new AttributeConverterEntry[4];
            attributeConverterEntry[0]                 = new AttributeConverterEntry(ADGroupFactory <T> .ADGroupPropertyMap.GroupScope.PropertyName, ADGroupFactory <T> .ADGroupPropertyMap.GroupScope.ADAttribute, TypeConstants.ADGroupScope, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(GroupTypeUtils.ToExtendedGroupScope), new ToDirectoryFormatDelegate(GroupTypeUtils.ToDirectoryGroupScope), new ToSearchFilterDelegate(GroupTypeUtils.ToSearchGroupScope));
            attributeConverterEntry[1]                 = new AttributeConverterEntry(ADGroupFactory <T> .ADGroupPropertyMap.GroupCategory.PropertyName, ADGroupFactory <T> .ADGroupPropertyMap.GroupCategory.ADAttribute, TypeConstants.ADGroupCategory, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(GroupTypeUtils.ToExtendedGroupCategory), new ToDirectoryFormatDelegate(GroupTypeUtils.ToDirectoryGroupCategory), new ToSearchFilterDelegate(GroupTypeUtils.ToSearchGroupCategory));
            attributeConverterEntry[2]                 = new AttributeConverterEntry(ADGroupFactory <T> .ADGroupPropertyMap.ManagedBy.PropertyName, ADGroupFactory <T> .ADGroupPropertyMap.ManagedBy.ADAttribute, TypeConstants.ADPrincipal, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryFromADObjectToDN <ADPrincipalFactory <ADPrincipal>, ADPrincipal>), new ToSearchFilterDelegate(SearchConverters.ToSearchFromADObjectToDN <ADPrincipalFactory <ADPrincipal>, ADPrincipal>));
            attributeConverterEntry[3]                 = new AttributeConverterEntry(ADGroupFactory <T> .ADGroupPropertyMap.Members.PropertyName, ADGroupFactory <T> .ADGroupPropertyMap.Members.ADAttribute, TypeConstants.ADPrincipal, false, TypeAdapterAccess.Read, false, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedMultivalueObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryMultivalueObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
            ADGroupFactory <T> .ADMappingTable         = attributeConverterEntry;
            ADGroupFactory <T> .ADAMMappingTable       = ADGroupFactory <T> .ADMappingTable;
            ADGroupFactory <T> ._groupStructuralFilter = ADOPathUtil.CreateFilterClause(ADOperator.Eq, "objectClass", "group");
            ADFactoryBase <T> .RegisterMappingTable(ADGroupFactory <T> .ADAMMappingTable, ADServerType.ADLDS);

            ADFactoryBase <T> .RegisterMappingTable(ADGroupFactory <T> .ADMappingTable, ADServerType.ADDS);
        }
Beispiel #21
0
        static ADReplicationUpToDatenessVectorTableFactory()
        {
            AttributeConverterEntry[] attributeConverterEntry = new AttributeConverterEntry[7];
            attributeConverterEntry[0] = new AttributeConverterEntry(ADReplicationUpToDatenessVectorTableFactory <T> .ADReplicationUpToDatenessVectorTablePropertyMap.Server.PropertyName, ADReplicationUpToDatenessVectorTableFactory <T> .ADReplicationUpToDatenessVectorTablePropertyMap.Server.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(ADReplicationUtil.ToExtendedServerFromSessionInfo), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[1] = new AttributeConverterEntry(ADReplicationUpToDatenessVectorTableFactory <T> .ADReplicationUpToDatenessVectorTablePropertyMap.Partner.PropertyName, ADReplicationUpToDatenessVectorTableFactory <T> .ADReplicationUpToDatenessVectorTablePropertyMap.Partner.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[2] = new AttributeConverterEntry(ADReplicationUpToDatenessVectorTableFactory <T> .ADReplicationUpToDatenessVectorTablePropertyMap.PartnerInvocationId.PropertyName, ADReplicationUpToDatenessVectorTableFactory <T> .ADReplicationUpToDatenessVectorTablePropertyMap.PartnerInvocationId.ADAttribute, TypeConstants.Guid, false, TypeAdapterAccess.Read, true, AttributeSet.Default, AttributeConverters.GetToExtendedFromStringConverter(new AttributeConverters.StringParserDelegate(AttributeConverters.ParseGuidFromString)), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[3] = new AttributeConverterEntry(ADReplicationUpToDatenessVectorTableFactory <T> .ADReplicationUpToDatenessVectorTablePropertyMap.Partition.PropertyName, ADReplicationUpToDatenessVectorTableFactory <T> .ADReplicationUpToDatenessVectorTablePropertyMap.Partition.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[4] = new AttributeConverterEntry(ADReplicationUpToDatenessVectorTableFactory <T> .ADReplicationUpToDatenessVectorTablePropertyMap.PartitionGuid.PropertyName, ADReplicationUpToDatenessVectorTableFactory <T> .ADReplicationUpToDatenessVectorTablePropertyMap.PartitionGuid.ADAttribute, TypeConstants.Guid, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[5] = new AttributeConverterEntry(ADReplicationUpToDatenessVectorTableFactory <T> .ADReplicationUpToDatenessVectorTablePropertyMap.LastReplicationSuccess.PropertyName, ADReplicationUpToDatenessVectorTableFactory <T> .ADReplicationUpToDatenessVectorTablePropertyMap.LastReplicationSuccess.ADAttribute, TypeConstants.DateTime, false, TypeAdapterAccess.Read, true, AttributeSet.Default, AttributeConverters.GetToExtendedFromStringConverter(new AttributeConverters.StringParserDelegate(AttributeConverters.ParseDateTimeFromString)), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[6] = new AttributeConverterEntry(ADReplicationUpToDatenessVectorTableFactory <T> .ADReplicationUpToDatenessVectorTablePropertyMap.UsnFilter.PropertyName, ADReplicationUpToDatenessVectorTableFactory <T> .ADReplicationUpToDatenessVectorTablePropertyMap.UsnFilter.ADAttribute, TypeConstants.Long, false, TypeAdapterAccess.Read, true, AttributeSet.Default, AttributeConverters.GetToExtendedFromStringConverter(new AttributeConverters.StringParserDelegate(AttributeConverters.ParseLongFromString)), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            ADReplicationUpToDatenessVectorTableFactory <T> .ADMappingTable   = attributeConverterEntry;
            ADReplicationUpToDatenessVectorTableFactory <T> .ADAMMappingTable = ADReplicationUpToDatenessVectorTableFactory <T> .ADMappingTable;
            ADFactoryBase <T> .RegisterMappingTable(ADReplicationUpToDatenessVectorTableFactory <T> .ADAMMappingTable, ADServerType.ADLDS);

            ADFactoryBase <T> .RegisterMappingTable(ADReplicationUpToDatenessVectorTableFactory <T> .ADMappingTable, ADServerType.ADDS);
        }
        static ADReplicationFailureFactory()
        {
            AttributeConverterEntry[] attributeConverterEntry = new AttributeConverterEntry[7];
            attributeConverterEntry[0] = new AttributeConverterEntry(ADReplicationFailureFactory <T> .ADReplicationFailurePropertyMap.Server.PropertyName, ADReplicationFailureFactory <T> .ADReplicationFailurePropertyMap.Server.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(ADReplicationUtil.ToExtendedServerFromSessionInfo), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[1] = new AttributeConverterEntry(ADReplicationFailureFactory <T> .ADReplicationFailurePropertyMap.Partner.PropertyName, ADReplicationFailureFactory <T> .ADReplicationFailurePropertyMap.Partner.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[2] = new AttributeConverterEntry(ADReplicationFailureFactory <T> .ADReplicationFailurePropertyMap.PartnerGuid.PropertyName, ADReplicationFailureFactory <T> .ADReplicationFailurePropertyMap.PartnerGuid.ADAttribute, TypeConstants.Guid, false, TypeAdapterAccess.Read, true, AttributeSet.Default, AttributeConverters.GetToExtendedFromStringConverter(new AttributeConverters.StringParserDelegate(AttributeConverters.ParseGuidFromString)), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[3] = new AttributeConverterEntry(ADReplicationFailureFactory <T> .ADReplicationFailurePropertyMap.FailureCount.PropertyName, ADReplicationFailureFactory <T> .ADReplicationFailurePropertyMap.FailureCount.ADAttribute, TypeConstants.Int, false, TypeAdapterAccess.Read, true, AttributeSet.Default, AttributeConverters.GetToExtendedFromStringConverter(new AttributeConverters.StringParserDelegate(AttributeConverters.ParseIntFromString)), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[4] = new AttributeConverterEntry(ADReplicationFailureFactory <T> .ADReplicationFailurePropertyMap.FailureType.PropertyName, ADReplicationFailureFactory <T> .ADReplicationFailurePropertyMap.FailureType.ADAttribute, TypeConstants.ADPartnerType, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(ADReplicationUtil.ToExtendedReplicationFailureType), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[5] = new AttributeConverterEntry(ADReplicationFailureFactory <T> .ADReplicationFailurePropertyMap.FirstFailureTime.PropertyName, ADReplicationFailureFactory <T> .ADReplicationFailurePropertyMap.FirstFailureTime.ADAttribute, TypeConstants.DateTime, false, TypeAdapterAccess.Read, true, AttributeSet.Default, AttributeConverters.GetToExtendedFromStringConverter(new AttributeConverters.StringParserDelegate(AttributeConverters.ParseDateTimeFromString)), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[6] = new AttributeConverterEntry(ADReplicationFailureFactory <T> .ADReplicationFailurePropertyMap.LastError.PropertyName, ADReplicationFailureFactory <T> .ADReplicationFailurePropertyMap.LastError.ADAttribute, TypeConstants.Int, false, TypeAdapterAccess.Read, true, AttributeSet.Default, AttributeConverters.GetToExtendedFromStringConverter(new AttributeConverters.StringParserDelegate(AttributeConverters.ParseIntFromString)), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            ADReplicationFailureFactory <T> .ADMappingTable   = attributeConverterEntry;
            ADReplicationFailureFactory <T> .ADAMMappingTable = ADReplicationFailureFactory <T> .ADMappingTable;
            ADFactoryBase <T> .RegisterMappingTable(ADReplicationFailureFactory <T> .ADAMMappingTable, ADServerType.ADLDS);

            ADFactoryBase <T> .RegisterMappingTable(ADReplicationFailureFactory <T> .ADMappingTable, ADServerType.ADDS);
        }
 static ADResourcePropertyListFactory()
 {
     ADResourcePropertyListFactory <T> ._rDNPrefix = "CN";
     string[] strArrays = new string[1];
     strArrays[0] = "name";
     ADResourcePropertyListFactory <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(ADResourcePropertyListFactory <T> ._identityLdapAttributes);
     genericIdentityResolver[1] = new IdentityResolverDelegate(IdentityResolverMethods.GuidSearchFilterIdentityResolver);
     customIdentityResolver[1]  = IdentityResolverMethods.GetAggregatedIdentityResolver(ADOperator.Or, genericIdentityResolver);
     ADResourcePropertyListFactory <T> ._identityResolvers = customIdentityResolver;
     AttributeConverterEntry[] attributeConverterEntry = new AttributeConverterEntry[1];
     attributeConverterEntry[0] = new AttributeConverterEntry(ADResourcePropertyListFactory <T> .ADResourcePropertyListPropertyMap.Members.PropertyName, ADResourcePropertyListFactory <T> .ADResourcePropertyListPropertyMap.Members.ADAttribute, TypeConstants.ADResourceProperty, false, TypeAdapterAccess.Read, false, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedMultivalueObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryMultivalueObject), new ToSearchFilterDelegate(ADCBACUtil.ToSearchFromResourcePropertyNameToDN));
     ADResourcePropertyListFactory <T> .ADMappingTable = attributeConverterEntry;
     ADFactoryBase <T> .RegisterMappingTable(ADResourcePropertyListFactory <T> .ADMappingTable, ADServerType.ADDS);
 }
        static ADReplicationQueueOperationFactory()
        {
            AttributeConverterEntry[] attributeConverterEntry = new AttributeConverterEntry[9];
            attributeConverterEntry[0] = new AttributeConverterEntry(ADReplicationQueueOperationFactory <T> .ADReplicationQueueOperationPropertyMap.Server.PropertyName, ADReplicationQueueOperationFactory <T> .ADReplicationQueueOperationPropertyMap.Server.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(ADReplicationUtil.ToExtendedServerFromSessionInfo), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[1] = new AttributeConverterEntry(ADReplicationQueueOperationFactory <T> .ADReplicationQueueOperationPropertyMap.Partner.PropertyName, ADReplicationQueueOperationFactory <T> .ADReplicationQueueOperationPropertyMap.Partner.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[2] = new AttributeConverterEntry(ADReplicationQueueOperationFactory <T> .ADReplicationQueueOperationPropertyMap.PartnerAddress.PropertyName, ADReplicationQueueOperationFactory <T> .ADReplicationQueueOperationPropertyMap.PartnerAddress.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[3] = new AttributeConverterEntry(ADReplicationQueueOperationFactory <T> .ADReplicationQueueOperationPropertyMap.Partition.PropertyName, ADReplicationQueueOperationFactory <T> .ADReplicationQueueOperationPropertyMap.Partition.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[4] = new AttributeConverterEntry(ADReplicationQueueOperationFactory <T> .ADReplicationQueueOperationPropertyMap.EnqueueTime.PropertyName, ADReplicationQueueOperationFactory <T> .ADReplicationQueueOperationPropertyMap.EnqueueTime.ADAttribute, TypeConstants.DateTime, false, TypeAdapterAccess.Read, true, AttributeSet.Default, AttributeConverters.GetToExtendedFromStringConverter(new AttributeConverters.StringParserDelegate(AttributeConverters.ParseDateTimeFromString)), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[5] = new AttributeConverterEntry(ADReplicationQueueOperationFactory <T> .ADReplicationQueueOperationPropertyMap.OperationID.PropertyName, ADReplicationQueueOperationFactory <T> .ADReplicationQueueOperationPropertyMap.OperationID.ADAttribute, TypeConstants.Int, false, TypeAdapterAccess.Read, true, AttributeSet.Default, AttributeConverters.GetToExtendedFromStringConverter(new AttributeConverters.StringParserDelegate(AttributeConverters.ParseIntFromString)), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[6] = new AttributeConverterEntry(ADReplicationQueueOperationFactory <T> .ADReplicationQueueOperationPropertyMap.OperationType.PropertyName, ADReplicationQueueOperationFactory <T> .ADReplicationQueueOperationPropertyMap.OperationType.ADAttribute, TypeConstants.ADReplicationOperationType, false, TypeAdapterAccess.Read, true, AttributeSet.Default, AttributeConverters.GetToExtendedFromStringConverter(new AttributeConverters.StringParserDelegate(AttributeConverters.ParseIntFromString)), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[7] = new AttributeConverterEntry(ADReplicationQueueOperationFactory <T> .ADReplicationQueueOperationPropertyMap.Options.PropertyName, ADReplicationQueueOperationFactory <T> .ADReplicationQueueOperationPropertyMap.Options.ADAttribute, TypeConstants.Int, false, TypeAdapterAccess.Read, true, AttributeSet.Default, AttributeConverters.GetToExtendedFromStringConverter(new AttributeConverters.StringParserDelegate(AttributeConverters.ParseIntFromString)), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            attributeConverterEntry[8] = new AttributeConverterEntry(ADReplicationQueueOperationFactory <T> .ADReplicationQueueOperationPropertyMap.Priority.PropertyName, ADReplicationQueueOperationFactory <T> .ADReplicationQueueOperationPropertyMap.Priority.ADAttribute, TypeConstants.Int, false, TypeAdapterAccess.Read, true, AttributeSet.Default, AttributeConverters.GetToExtendedFromStringConverter(new AttributeConverters.StringParserDelegate(AttributeConverters.ParseIntFromString)), null, new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
            ADReplicationQueueOperationFactory <T> .ADMappingTable   = attributeConverterEntry;
            ADReplicationQueueOperationFactory <T> .ADAMMappingTable = ADReplicationQueueOperationFactory <T> .ADMappingTable;
            ADFactoryBase <T> .RegisterMappingTable(ADReplicationQueueOperationFactory <T> .ADAMMappingTable, ADServerType.ADLDS);

            ADFactoryBase <T> .RegisterMappingTable(ADReplicationQueueOperationFactory <T> .ADMappingTable, ADServerType.ADDS);
        }
Beispiel #25
0
        internal static ICollection <string> GetParentAttributes(MappingTable <AttributeConverterEntry> attrMapBaseObj, MappingTable <AttributeConverterEntry> attrMapChildObj, ICollection <string> propertiesToFetch)
        {
            AttributeConverterEntry attributeConverterEntry = null;
            HashSet <string>        strs = new HashSet <string>(StringComparer.OrdinalIgnoreCase);

            if (propertiesToFetch != null)
            {
                foreach (string str in propertiesToFetch)
                {
                    if (!attrMapBaseObj.TryGetValue(str, out attributeConverterEntry) && attrMapChildObj.TryGetValue(str, out attributeConverterEntry))
                    {
                        continue;
                    }
                    strs.Add(str);
                }
            }
            return(strs);
        }
Beispiel #26
0
 static ADDomainControllerFactory()
 {
     IADOPathNode[] aDOPathNodeArray = new IADOPathNode[2];
     aDOPathNodeArray[0] = ADOPathUtil.CreateFilterClause(ADOperator.Eq, "objectClass", "computer");
     IADOPathNode[] aDOPathNodeArray1 = new IADOPathNode[2];
     aDOPathNodeArray1[0] = ADOPathUtil.CreateFilterClause(ADOperator.Eq, "primaryGroupID", "516");
     aDOPathNodeArray1[1] = ADOPathUtil.CreateFilterClause(ADOperator.Eq, "primaryGroupID", "521");
     aDOPathNodeArray[1]  = ADOPathUtil.CreateOrClause(aDOPathNodeArray1);
     ADDomainControllerFactory <T> ._domainControllerComputerObjectFilter = ADOPathUtil.CreateAndClause(aDOPathNodeArray);
     string[] strArrays = new string[7];
     strArrays[0] = "name";
     strArrays[1] = "distinguishedName";
     strArrays[2] = "objectClass";
     strArrays[3] = "objectGUID";
     strArrays[4] = "dNSHostName";
     strArrays[5] = "serverReference";
     strArrays[6] = "serverReferenceBL";
     ADDomainControllerFactory <T> ._domainControllerDefaultAttributes = strArrays;
     IADOPathNode[] aDOPathNodeArray2 = new IADOPathNode[3];
     aDOPathNodeArray2[0] = ADOPathUtil.CreateFilterClause(ADOperator.Eq, "objectClass", "nTDSDSA");
     aDOPathNodeArray2[1] = ADOPathUtil.CreateFilterClause(ADOperator.Eq, "objectClass", "server");
     aDOPathNodeArray2[2] = ADDomainControllerFactory <T> ._domainControllerComputerObjectFilter;
     ADDomainControllerFactory <T> ._domainControllerStructuralFilter = ADOPathUtil.CreateOrClause(aDOPathNodeArray2);
     string[] strArrays1 = new string[5];
     strArrays1[0] = "distinguishedName";
     strArrays1[1] = "objectGUID";
     strArrays1[2] = "dNSHostName";
     strArrays1[3] = "objectSid";
     strArrays1[4] = "sAMAccountName";
     ADDomainControllerFactory <T> ._identityLdapAttributes = strArrays1;
     AttributeConverterEntry[] attributeConverterEntry = new AttributeConverterEntry[10];
     attributeConverterEntry[0] = new AttributeConverterEntry("IsReadOnly", "IsReadOnly", TypeConstants.Bool, false, TypeAdapterAccess.Read, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
     attributeConverterEntry[1] = new AttributeConverterEntry("IsGlobalCatalog", "IsGlobalCatalog", TypeConstants.Bool, false, TypeAdapterAccess.Read, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
     attributeConverterEntry[2] = new AttributeConverterEntry("Enabled", "Enabled", TypeConstants.Bool, false, TypeAdapterAccess.Read, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
     attributeConverterEntry[3] = new AttributeConverterEntry("OperatingSystemVersion", "OSVersion", TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
     attributeConverterEntry[4] = new AttributeConverterEntry("OperatingSystem", "OSName", TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
     attributeConverterEntry[5] = new AttributeConverterEntry("OperatingSystemServicePack", "OSServicepack", TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
     attributeConverterEntry[6] = new AttributeConverterEntry("OperatingSystemHotfix", "OSHotFix", TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
     attributeConverterEntry[7] = new AttributeConverterEntry("ComputerObjectDN", "ComputerDN", TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Extended, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
     attributeConverterEntry[8] = new AttributeConverterEntry("Domain", "Domain", TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
     attributeConverterEntry[9] = new AttributeConverterEntry("Forest", "Forest", TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchObjectClientSideFilter));
     ADDomainControllerFactory <T> .ADMappingTable = attributeConverterEntry;
     ADFactoryBase <T> .RegisterMappingTable(ADDomainControllerFactory <T> .ADMappingTable, ADServerType.ADDS);
 }
Beispiel #27
0
 static ADCentralAccessPolicyFactory()
 {
     ADCentralAccessPolicyFactory <T> ._rDNPrefix = "CN";
     string[] strArrays = new string[1];
     strArrays[0] = "name";
     ADCentralAccessPolicyFactory <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(ADCentralAccessPolicyFactory <T> ._identityLdapAttributes);
     genericIdentityResolver[1] = new IdentityResolverDelegate(IdentityResolverMethods.GuidSearchFilterIdentityResolver);
     customIdentityResolver[1]  = IdentityResolverMethods.GetAggregatedIdentityResolver(ADOperator.Or, genericIdentityResolver);
     ADCentralAccessPolicyFactory <T> ._identityResolvers = customIdentityResolver;
     AttributeConverterEntry[] attributeConverterEntry = new AttributeConverterEntry[2];
     attributeConverterEntry[0] = new AttributeConverterEntry(ADCentralAccessPolicyFactory <T> .ADCentralAccessPolicyPropertyMap.Members.PropertyName, ADCentralAccessPolicyFactory <T> .ADCentralAccessPolicyPropertyMap.Members.ADAttribute, TypeConstants.ADCentralAccessRule, false, TypeAdapterAccess.Read, false, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedMultivalueObject), new ToDirectoryFormatDelegate(ADCentralAccessPolicyFactory <ADCentralAccessPolicy> .ToDirectoryCapMember), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[1] = new AttributeConverterEntry(ADCentralAccessPolicyFactory <T> .ADCentralAccessPolicyPropertyMap.PolicyID.PropertyName, ADCentralAccessPolicyFactory <T> .ADCentralAccessPolicyPropertyMap.PolicyID.ADAttribute, TypeConstants.SID, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     ADCentralAccessPolicyFactory <T> .ADMappingTable = attributeConverterEntry;
     ADFactoryBase <T> .RegisterMappingTable(ADCentralAccessPolicyFactory <T> .ADMappingTable, ADServerType.ADDS);
 }
Beispiel #28
0
 static ADClaimTransformPolicyFactory()
 {
     ADClaimTransformPolicyFactory <T> .RuleXml    = " <ClaimsTransformationPolicy>     <Rules version=\"1\">         <![CDATA[{0}]]>    </Rules></ClaimsTransformationPolicy>";
     ADClaimTransformPolicyFactory <T> ._rDNPrefix = "CN";
     string[] strArrays = new string[1];
     strArrays[0] = "name";
     ADClaimTransformPolicyFactory <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(ADClaimTransformPolicyFactory <T> ._identityLdapAttributes);
     genericIdentityResolver[1] = new IdentityResolverDelegate(IdentityResolverMethods.GuidSearchFilterIdentityResolver);
     customIdentityResolver[1]  = IdentityResolverMethods.GetAggregatedIdentityResolver(ADOperator.Or, genericIdentityResolver);
     ADClaimTransformPolicyFactory <T> ._identityResolvers = customIdentityResolver;
     AttributeConverterEntry[] attributeConverterEntry = new AttributeConverterEntry[3];
     attributeConverterEntry[0] = new AttributeConverterEntry(ADClaimTransformPolicyFactory <T> .ADClaimTransformPolicyPropertyMap.IncomingTrust.PropertyName, ADClaimTransformPolicyFactory <T> .ADClaimTransformPolicyPropertyMap.IncomingTrust.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, false, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedMultivalueObject), null, new ToSearchFilterDelegate(ADCBACUtil.ToSearchFromTrustNameToDN));
     attributeConverterEntry[1] = new AttributeConverterEntry(ADClaimTransformPolicyFactory <T> .ADClaimTransformPolicyPropertyMap.OutgoingTrust.PropertyName, ADClaimTransformPolicyFactory <T> .ADClaimTransformPolicyPropertyMap.OutgoingTrust.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, false, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedMultivalueObject), null, new ToSearchFilterDelegate(ADCBACUtil.ToSearchFromTrustNameToDN));
     attributeConverterEntry[2] = new AttributeConverterEntry(ADClaimTransformPolicyFactory <T> .ADClaimTransformPolicyPropertyMap.Rule.PropertyName, ADClaimTransformPolicyFactory <T> .ADClaimTransformPolicyPropertyMap.Rule.ADAttribute, TypeConstants.String, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(ADClaimTransformPolicyFactory <T> .ToPolicyRuleStringFromRuleXml), new ToDirectoryFormatDelegate(ADClaimTransformPolicyFactory <T> .ToRuleXmlFromPolicyString), new ToSearchFilterDelegate(SearchConverters.ToSearchNotSupported));
     ADClaimTransformPolicyFactory <T> .ADMappingTable = attributeConverterEntry;
     ADFactoryBase <T> .RegisterMappingTable(ADClaimTransformPolicyFactory <T> .ADMappingTable, ADServerType.ADDS);
 }
Beispiel #29
0
 static ADClaimTypeBaseFactory()
 {
     ADClaimTypeBaseFactory <T> ._rDNPrefix = "CN";
     string[] strArrays = new string[1];
     strArrays[0] = "name";
     ADClaimTypeBaseFactory <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(ADClaimTypeBaseFactory <T> ._identityLdapAttributes);
     genericIdentityResolver[1] = new IdentityResolverDelegate(IdentityResolverMethods.GuidSearchFilterIdentityResolver);
     customIdentityResolver[1]  = IdentityResolverMethods.GetAggregatedIdentityResolver(ADOperator.Or, genericIdentityResolver);
     ADClaimTypeBaseFactory <T> ._identityResolvers = customIdentityResolver;
     AttributeConverterEntry[] attributeConverterEntry = new AttributeConverterEntry[4];
     attributeConverterEntry[0] = new AttributeConverterEntry(ADClaimTypeBaseFactory <T> .ADClaimTypeBasePropertyMap.SuggestedValues.PropertyName, ADClaimTypeBaseFactory <T> .ADClaimTypeBasePropertyMap.SuggestedValues.ADAttribute, TypeConstants.ByteArray, true, TypeAdapterAccess.ReadWrite, false, AttributeSet.Default, new ToExtendedFormatDelegate(ADCBACUtil.ToExtendedADSuggestedValueEntryListFromXml), new ToDirectoryFormatDelegate(ADCBACUtil.ToDirectoryXmlFromADSuggestedValueEntryList), new ToSearchFilterDelegate(SearchConverters.ToSearchNotSupported));
     attributeConverterEntry[1] = new AttributeConverterEntry(ADClaimTypeBaseFactory <T> .ADClaimTypeBasePropertyMap.ID.PropertyName, ADClaimTypeBaseFactory <T> .ADClaimTypeBasePropertyMap.ID.ADAttribute, TypeConstants.String, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[2] = new AttributeConverterEntry(ADClaimTypeBaseFactory <T> .ADClaimTypeBasePropertyMap.DisplayName.PropertyName, ADClaimTypeBaseFactory <T> .ADClaimTypeBasePropertyMap.DisplayName.ADAttribute, TypeConstants.String, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[3] = new AttributeConverterEntry(ADClaimTypeBaseFactory <T> .ADClaimTypeBasePropertyMap.Enabled.PropertyName, ADClaimTypeBaseFactory <T> .ADClaimTypeBasePropertyMap.Enabled.ADAttribute, TypeConstants.Bool, true, TypeAdapterAccess.ReadWrite, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), new ToDirectoryFormatDelegate(AttributeConverters.ToDirectoryObject), new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     ADClaimTypeBaseFactory <T> .ADMappingTable = attributeConverterEntry;
     ADFactoryBase <T> .RegisterMappingTable(ADClaimTypeBaseFactory <T> .ADMappingTable, ADServerType.ADDS);
 }
Beispiel #30
0
 static ADResourcePropertyValueTypeFactory()
 {
     ADResourcePropertyValueTypeFactory <T> ._rDNPrefix = "CN";
     string[] strArrays = new string[1];
     strArrays[0] = "name";
     ADResourcePropertyValueTypeFactory <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(ADResourcePropertyValueTypeFactory <T> ._identityLdapAttributes);
     genericIdentityResolver[1] = new IdentityResolverDelegate(IdentityResolverMethods.GuidSearchFilterIdentityResolver);
     customIdentityResolver[1]  = IdentityResolverMethods.GetAggregatedIdentityResolver(ADOperator.Or, genericIdentityResolver);
     ADResourcePropertyValueTypeFactory <T> ._identityResolvers = customIdentityResolver;
     AttributeConverterEntry[] attributeConverterEntry = new AttributeConverterEntry[5];
     attributeConverterEntry[0] = new AttributeConverterEntry(ADResourcePropertyValueTypeFactory <T> .ADResourcePropertyValueTypePropertyMap.RestrictValues.PropertyName, ADResourcePropertyValueTypeFactory <T> .ADResourcePropertyValueTypePropertyMap.RestrictValues.ADAttribute, TypeConstants.Bool, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[1] = new AttributeConverterEntry(ADResourcePropertyValueTypeFactory <T> .ADResourcePropertyValueTypePropertyMap.ValueType.PropertyName, ADResourcePropertyValueTypeFactory <T> .ADResourcePropertyValueTypePropertyMap.ValueType.ADAttribute, TypeConstants.ADClaimValueType, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(ADClaimTypeBaseFactory <ADClaimTypeBase> .ToExtendedFromIntToValueTypeEnum), null, new ToSearchFilterDelegate(SearchConverters.ToSearchEnum <ADClaimValueType>));
     attributeConverterEntry[2] = new AttributeConverterEntry(ADResourcePropertyValueTypeFactory <T> .ADResourcePropertyValueTypePropertyMap.IsSingleValued.PropertyName, ADResourcePropertyValueTypeFactory <T> .ADResourcePropertyValueTypePropertyMap.IsSingleValued.ADAttribute, TypeConstants.Bool, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[3] = new AttributeConverterEntry(ADResourcePropertyValueTypeFactory <T> .ADResourcePropertyValueTypePropertyMap.IsSuggestedValuesPresent.PropertyName, ADResourcePropertyValueTypeFactory <T> .ADResourcePropertyValueTypePropertyMap.IsSuggestedValuesPresent.ADAttribute, TypeConstants.Bool, false, TypeAdapterAccess.Read, true, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedObject), null, new ToSearchFilterDelegate(SearchConverters.ToSearchUsingSchemaInfo));
     attributeConverterEntry[4] = new AttributeConverterEntry(ADResourcePropertyValueTypeFactory <T> .ADResourcePropertyValueTypePropertyMap.ResourceProperties.PropertyName, ADResourcePropertyValueTypeFactory <T> .ADResourcePropertyValueTypePropertyMap.ResourceProperties.ADAttribute, TypeConstants.ADResourceProperty, false, TypeAdapterAccess.Read, false, AttributeSet.Default, new ToExtendedFormatDelegate(AttributeConverters.ToExtendedMultivalueObject), null, new ToSearchFilterDelegate(ADCBACUtil.ToSearchFromResourcePropertyNameToDN));
     ADResourcePropertyValueTypeFactory <T> .ADMappingTable = attributeConverterEntry;
     ADFactoryBase <T> .RegisterMappingTable(ADResourcePropertyValueTypeFactory <T> .ADMappingTable, ADServerType.ADDS);
 }