internal ReplicationCursor(DirectoryServer server, string partition, Guid guid, long filter)
 {
     this.partition = partition;
     this.invocationID = guid;
     this.USN = filter;
     this.server = server;
 }
 internal AttributeMetadata(IntPtr info, bool advanced, DirectoryServer server, Hashtable table)
 {
     if (advanced)
     {
         DS_REPL_ATTR_META_DATA_2 structure = new DS_REPL_ATTR_META_DATA_2();
         Marshal.PtrToStructure(info, structure);
         this.pszAttributeName = Marshal.PtrToStringUni(structure.pszAttributeName);
         this.dwVersion = structure.dwVersion;
         long fileTime = ((long) ((ulong) structure.ftimeLastOriginatingChange1)) + (structure.ftimeLastOriginatingChange2 << 0x20);
         this.ftimeLastOriginatingChange = DateTime.FromFileTime(fileTime);
         this.uuidLastOriginatingDsaInvocationID = structure.uuidLastOriginatingDsaInvocationID;
         this.usnOriginatingChange = structure.usnOriginatingChange;
         this.usnLocalChange = structure.usnLocalChange;
         this.pszLastOriginatingDsaDN = Marshal.PtrToStringUni(structure.pszLastOriginatingDsaDN);
     }
     else
     {
         DS_REPL_ATTR_META_DATA ds_repl_attr_meta_data = new DS_REPL_ATTR_META_DATA();
         Marshal.PtrToStructure(info, ds_repl_attr_meta_data);
         this.pszAttributeName = Marshal.PtrToStringUni(ds_repl_attr_meta_data.pszAttributeName);
         this.dwVersion = ds_repl_attr_meta_data.dwVersion;
         long num2 = ((long) ((ulong) ds_repl_attr_meta_data.ftimeLastOriginatingChange1)) + (ds_repl_attr_meta_data.ftimeLastOriginatingChange2 << 0x20);
         this.ftimeLastOriginatingChange = DateTime.FromFileTime(num2);
         this.uuidLastOriginatingDsaInvocationID = ds_repl_attr_meta_data.uuidLastOriginatingDsaInvocationID;
         this.usnOriginatingChange = ds_repl_attr_meta_data.usnOriginatingChange;
         this.usnLocalChange = ds_repl_attr_meta_data.usnLocalChange;
     }
     this.server = server;
     this.nameTable = table;
     this.advanced = advanced;
 }
 public ReplicationConnection(DirectoryContext context, string name, DirectoryServer sourceServer, ActiveDirectorySchedule schedule, ActiveDirectoryTransportType transport)
 {
     ValidateArgument(context, name);
     if (sourceServer == null)
     {
         throw new ArgumentNullException("sourceServer");
     }
     if ((transport < ActiveDirectoryTransportType.Rpc) || (transport > ActiveDirectoryTransportType.Smtp))
     {
         throw new InvalidEnumArgumentException("value", (int) transport, typeof(ActiveDirectoryTransportType));
     }
     context = new DirectoryContext(context);
     this.ValidateTargetAndSourceServer(context, sourceServer);
     this.context = context;
     this.connectionName = name;
     this.transport = transport;
     DirectoryEntry directoryEntry = DirectoryEntryManager.GetDirectoryEntry(context, WellKnownDN.RootDSE);
     try
     {
         string str = (string) PropertyManager.GetPropertyValue(context, directoryEntry, PropertyManager.ServerName);
         string dn = "CN=NTDS Settings," + str;
         directoryEntry = DirectoryEntryManager.GetDirectoryEntry(context, dn);
         string escapedPath = Utils.GetEscapedPath("cn=" + this.connectionName);
         this.cachedDirectoryEntry = directoryEntry.Children.Add(escapedPath, "nTDSConnection");
         DirectoryContext context2 = sourceServer.Context;
         directoryEntry = DirectoryEntryManager.GetDirectoryEntry(context2, WellKnownDN.RootDSE);
         string str4 = (string) PropertyManager.GetPropertyValue(context2, directoryEntry, PropertyManager.ServerName);
         str4 = "CN=NTDS Settings," + str4;
         this.cachedDirectoryEntry.Properties["fromServer"].Add(str4);
         if (schedule != null)
         {
             this.cachedDirectoryEntry.Properties["schedule"].Value = schedule.GetUnmanagedSchedule();
         }
         string dNFromTransportType = Utils.GetDNFromTransportType(this.TransportType, context);
         directoryEntry = DirectoryEntryManager.GetDirectoryEntry(context, dNFromTransportType);
         try
         {
             directoryEntry.Bind(true);
         }
         catch (COMException exception)
         {
             if (((exception.ErrorCode == -2147016656) && Utils.CheckCapability(DirectoryEntryManager.GetDirectoryEntry(context, WellKnownDN.RootDSE), Capability.ActiveDirectoryApplicationMode)) && (transport == ActiveDirectoryTransportType.Smtp))
             {
                 throw new NotSupportedException(Res.GetString("NotSupportTransportSMTP"));
             }
             throw ExceptionHelper.GetExceptionFromCOMException(context, exception);
         }
         this.cachedDirectoryEntry.Properties["transportType"].Add(dNFromTransportType);
         this.cachedDirectoryEntry.Properties["enabledConnection"].Value = false;
         this.cachedDirectoryEntry.Properties["options"].Value = 0;
     }
     catch (COMException exception2)
     {
         throw ExceptionHelper.GetExceptionFromCOMException(context, exception2);
     }
     finally
     {
         directoryEntry.Close();
     }
 }
Пример #4
0
        internal AttributeMetadata(IntPtr info, bool advanced, DirectoryServer server, Hashtable table)
        {
            if (advanced)
            {
                DS_REPL_ATTR_META_DATA_2 attrMetaData = new DS_REPL_ATTR_META_DATA_2();
                Marshal.PtrToStructure(info, attrMetaData);
                Debug.Assert(attrMetaData != null);

                _pszAttributeName = Marshal.PtrToStringUni(attrMetaData.pszAttributeName);
                _dwVersion = attrMetaData.dwVersion;
                long ftimeChangeValue = (long)((uint)attrMetaData.ftimeLastOriginatingChange1 + (((long)attrMetaData.ftimeLastOriginatingChange2) << 32));
                _ftimeLastOriginatingChange = DateTime.FromFileTime(ftimeChangeValue);
                _uuidLastOriginatingDsaInvocationID = attrMetaData.uuidLastOriginatingDsaInvocationID;
                _usnOriginatingChange = attrMetaData.usnOriginatingChange;
                _usnLocalChange = attrMetaData.usnLocalChange;
                _pszLastOriginatingDsaDN = Marshal.PtrToStringUni(attrMetaData.pszLastOriginatingDsaDN);
            }
            else
            {
                DS_REPL_ATTR_META_DATA attrMetaData = new DS_REPL_ATTR_META_DATA();
                Marshal.PtrToStructure(info, attrMetaData);
                Debug.Assert(attrMetaData != null);

                _pszAttributeName = Marshal.PtrToStringUni(attrMetaData.pszAttributeName);
                _dwVersion = attrMetaData.dwVersion;
                long ftimeChangeValue = (long)((uint)attrMetaData.ftimeLastOriginatingChange1 + (((long)attrMetaData.ftimeLastOriginatingChange2) << 32));
                _ftimeLastOriginatingChange = DateTime.FromFileTime(ftimeChangeValue);
                _uuidLastOriginatingDsaInvocationID = attrMetaData.uuidLastOriginatingDsaInvocationID;
                _usnOriginatingChange = attrMetaData.usnOriginatingChange;
                _usnLocalChange = attrMetaData.usnLocalChange;
            }
            _server = server;
            _nameTable = table;
            _advanced = advanced;
        }
Пример #5
0
 internal AttributeMetadata(IntPtr info, bool advanced, DirectoryServer server, Hashtable table)
 {
     if (!advanced)
     {
         DS_REPL_ATTR_META_DATA dSREPLATTRMETADATum = new DS_REPL_ATTR_META_DATA();
         Marshal.PtrToStructure(info, dSREPLATTRMETADATum);
         this.pszAttributeName = Marshal.PtrToStringUni(dSREPLATTRMETADATum.pszAttributeName);
         this.dwVersion        = dSREPLATTRMETADATum.dwVersion;
         long num = (long)dSREPLATTRMETADATum.ftimeLastOriginatingChange1 + ((long)dSREPLATTRMETADATum.ftimeLastOriginatingChange2 << 32);
         this.ftimeLastOriginatingChange         = DateTime.FromFileTime(num);
         this.uuidLastOriginatingDsaInvocationID = dSREPLATTRMETADATum.uuidLastOriginatingDsaInvocationID;
         this.usnOriginatingChange = dSREPLATTRMETADATum.usnOriginatingChange;
         this.usnLocalChange       = dSREPLATTRMETADATum.usnLocalChange;
     }
     else
     {
         DS_REPL_ATTR_META_DATA_2 dSREPLATTRMETADATA2 = new DS_REPL_ATTR_META_DATA_2();
         Marshal.PtrToStructure(info, dSREPLATTRMETADATA2);
         this.pszAttributeName = Marshal.PtrToStringUni(dSREPLATTRMETADATA2.pszAttributeName);
         this.dwVersion        = dSREPLATTRMETADATA2.dwVersion;
         long num1 = (long)dSREPLATTRMETADATA2.ftimeLastOriginatingChange1 + ((long)dSREPLATTRMETADATA2.ftimeLastOriginatingChange2 << 32);
         this.ftimeLastOriginatingChange         = DateTime.FromFileTime(num1);
         this.uuidLastOriginatingDsaInvocationID = dSREPLATTRMETADATA2.uuidLastOriginatingDsaInvocationID;
         this.usnOriginatingChange    = dSREPLATTRMETADATA2.usnOriginatingChange;
         this.usnLocalChange          = dSREPLATTRMETADATA2.usnLocalChange;
         this.pszLastOriginatingDsaDN = Marshal.PtrToStringUni(dSREPLATTRMETADATA2.pszLastOriginatingDsaDN);
     }
     this.server    = server;
     this.nameTable = table;
     this.advanced  = advanced;
 }
        private DirectoryServer GetSchemaRoleOwner()
        {
            DirectoryServer server2;

            try
            {
                this.schemaEntry.RefreshCache();
                if (base.context.isADAMConfigSet())
                {
                    string adamDnsHostNameFromNTDSA = Utils.GetAdamDnsHostNameFromNTDSA(base.context, (string)PropertyManager.GetPropertyValue(base.context, this.schemaEntry, PropertyManager.FsmoRoleOwner));
                    return(new AdamInstance(Utils.GetNewDirectoryContext(adamDnsHostNameFromNTDSA, DirectoryContextType.DirectoryServer, base.context), adamDnsHostNameFromNTDSA));
                }
                DirectoryServer server = null;
                if (Utils.CheckCapability(base.directoryEntryMgr.GetCachedDirectoryEntry(WellKnownDN.RootDSE), Capability.ActiveDirectory))
                {
                    string dnsHostNameFromNTDSA = Utils.GetDnsHostNameFromNTDSA(base.context, (string)PropertyManager.GetPropertyValue(base.context, this.schemaEntry, PropertyManager.FsmoRoleOwner));
                    server = new DomainController(Utils.GetNewDirectoryContext(dnsHostNameFromNTDSA, DirectoryContextType.DirectoryServer, base.context), dnsHostNameFromNTDSA);
                }
                else
                {
                    string adamInstanceName = Utils.GetAdamDnsHostNameFromNTDSA(base.context, (string)PropertyManager.GetPropertyValue(base.context, this.schemaEntry, PropertyManager.FsmoRoleOwner));
                    server = new AdamInstance(Utils.GetNewDirectoryContext(adamInstanceName, DirectoryContextType.DirectoryServer, base.context), adamInstanceName);
                }
                server2 = server;
            }
            catch (COMException exception)
            {
                throw ExceptionHelper.GetExceptionFromCOMException(base.context, exception);
            }
            return(server2);
        }
Пример #7
0
        internal ReplicationNeighbor(IntPtr addr, DirectoryServer server, Hashtable table)
        {
            DS_REPL_NEIGHBOR neighbor = new DS_REPL_NEIGHBOR();
            Marshal.PtrToStructure(addr, neighbor);

            _namingContext = Marshal.PtrToStringUni(neighbor.pszNamingContext);
            _sourceServerDN = Marshal.PtrToStringUni(neighbor.pszSourceDsaDN);

            string transportDN = Marshal.PtrToStringUni(neighbor.pszAsyncIntersiteTransportDN);
            if (transportDN != null)
            {
                string rdn = Utils.GetRdnFromDN(transportDN);
                string transport = (Utils.GetDNComponents(rdn))[0].Value;

                if (String.Compare(transport, "SMTP", StringComparison.OrdinalIgnoreCase) == 0)
                    _transportType = ActiveDirectoryTransportType.Smtp;
                else
                    _transportType = ActiveDirectoryTransportType.Rpc;
            }

            _replicaFlags = (ReplicationNeighborOptions)neighbor.dwReplicaFlags;
            _uuidSourceDsaInvocationID = neighbor.uuidSourceDsaInvocationID;
            _usnLastObjChangeSynced = neighbor.usnLastObjChangeSynced;
            _usnAttributeFilter = neighbor.usnAttributeFilter;
            _timeLastSyncSuccess = DateTime.FromFileTime(neighbor.ftimeLastSyncSuccess);
            _timeLastSyncAttempt = DateTime.FromFileTime(neighbor.ftimeLastSyncAttempt);
            _lastSyncResult = neighbor.dwLastSyncResult;
            _consecutiveSyncFailures = neighbor.cNumConsecutiveSyncFailures;

            _server = server;
            _nameTable = table;
        }
Пример #8
0
 internal ReplicationCursor(DirectoryServer server, string partition, Guid guid, long filter)
 {
     this.partition    = partition;
     this.invocationID = guid;
     this.USN          = filter;
     this.server       = server;
 }
Пример #9
0
        internal ReplicationNeighborCollection ConstructNeighbors(IntPtr info, DirectoryServer server, LoadLibrarySafeHandle libHandle)
        {
            ReplicationNeighborCollection collection = new ReplicationNeighborCollection(server);
            int count = 0;

            try
            {
                if (info != (IntPtr)0)
                {
                    DS_REPL_NEIGHBORS neighbors = new DS_REPL_NEIGHBORS();
                    Marshal.PtrToStructure(info, neighbors);
                    Debug.Assert(neighbors != null);
                    count = neighbors.cNumNeighbors;
                    if (count > 0)
                    {
                        collection.AddHelper(neighbors, info);
                    }
                }
            }
            finally
            {
                FreeReplicaInfo(DS_REPL_INFO_TYPE.DS_REPL_INFO_NEIGHBORS, info, libHandle);
            }
            return(collection);
        }
        public DirectoryServer this[int index]
        {
            get
            {
                return((DirectoryServer)InnerList[index]);
            }
            set
            {
                DirectoryServer server = (DirectoryServer)value;

                if (server == null)
                {
                    throw new ArgumentNullException("value");
                }

                if (!Contains(server))
                {
                    List[index] = server;
                }
                else
                {
                    throw new ArgumentException(Res.GetString(Res.AlreadyExistingInCollection, server), "value");
                }
            }
        }
 internal AttributeMetadata(IntPtr info, bool advanced, DirectoryServer server, Hashtable table)
 {
     if (advanced)
     {
         DS_REPL_ATTR_META_DATA_2 structure = new DS_REPL_ATTR_META_DATA_2();
         Marshal.PtrToStructure(info, structure);
         this.pszAttributeName = Marshal.PtrToStringUni(structure.pszAttributeName);
         this.dwVersion        = structure.dwVersion;
         long fileTime = ((long)((ulong)structure.ftimeLastOriginatingChange1)) + (structure.ftimeLastOriginatingChange2 << 0x20);
         this.ftimeLastOriginatingChange         = DateTime.FromFileTime(fileTime);
         this.uuidLastOriginatingDsaInvocationID = structure.uuidLastOriginatingDsaInvocationID;
         this.usnOriginatingChange    = structure.usnOriginatingChange;
         this.usnLocalChange          = structure.usnLocalChange;
         this.pszLastOriginatingDsaDN = Marshal.PtrToStringUni(structure.pszLastOriginatingDsaDN);
     }
     else
     {
         DS_REPL_ATTR_META_DATA ds_repl_attr_meta_data = new DS_REPL_ATTR_META_DATA();
         Marshal.PtrToStructure(info, ds_repl_attr_meta_data);
         this.pszAttributeName = Marshal.PtrToStringUni(ds_repl_attr_meta_data.pszAttributeName);
         this.dwVersion        = ds_repl_attr_meta_data.dwVersion;
         long num2 = ((long)((ulong)ds_repl_attr_meta_data.ftimeLastOriginatingChange1)) + (ds_repl_attr_meta_data.ftimeLastOriginatingChange2 << 0x20);
         this.ftimeLastOriginatingChange         = DateTime.FromFileTime(num2);
         this.uuidLastOriginatingDsaInvocationID = ds_repl_attr_meta_data.uuidLastOriginatingDsaInvocationID;
         this.usnOriginatingChange = ds_repl_attr_meta_data.usnOriginatingChange;
         this.usnLocalChange       = ds_repl_attr_meta_data.usnLocalChange;
     }
     this.server    = server;
     this.nameTable = table;
     this.advanced  = advanced;
 }
        internal ReplicationOperationCollection(DirectoryServer server)
        {
            this.server = server;
            Hashtable hashtables = new Hashtable();

            this.nameTable = Hashtable.Synchronized(hashtables);
        }
        internal ActiveDirectoryReplicationMetadata(DirectoryServer server)
        {
            _server = server;
            Hashtable tempNameTable = new Hashtable();

            _nameTable = Hashtable.Synchronized(tempNameTable);
        }
Пример #14
0
        internal AttributeMetadata(IntPtr info, bool advanced, DirectoryServer server, Hashtable table)
        {
            if (advanced)
            {
                DS_REPL_ATTR_META_DATA_2 attrMetaData = new DS_REPL_ATTR_META_DATA_2();
                Marshal.PtrToStructure(info, attrMetaData);
                Debug.Assert(attrMetaData != null);

                _pszAttributeName = Marshal.PtrToStringUni(attrMetaData.pszAttributeName);
                _dwVersion        = attrMetaData.dwVersion;
                long ftimeChangeValue = (long)((uint)attrMetaData.ftimeLastOriginatingChange1 + (((long)attrMetaData.ftimeLastOriginatingChange2) << 32));
                _ftimeLastOriginatingChange         = DateTime.FromFileTime(ftimeChangeValue);
                _uuidLastOriginatingDsaInvocationID = attrMetaData.uuidLastOriginatingDsaInvocationID;
                _usnOriginatingChange    = attrMetaData.usnOriginatingChange;
                _usnLocalChange          = attrMetaData.usnLocalChange;
                _pszLastOriginatingDsaDN = Marshal.PtrToStringUni(attrMetaData.pszLastOriginatingDsaDN);
            }
            else
            {
                DS_REPL_ATTR_META_DATA attrMetaData = new DS_REPL_ATTR_META_DATA();
                Marshal.PtrToStructure(info, attrMetaData);
                Debug.Assert(attrMetaData != null);

                _pszAttributeName = Marshal.PtrToStringUni(attrMetaData.pszAttributeName);
                _dwVersion        = attrMetaData.dwVersion;
                long ftimeChangeValue = (long)((uint)attrMetaData.ftimeLastOriginatingChange1 + (((long)attrMetaData.ftimeLastOriginatingChange2) << 32));
                _ftimeLastOriginatingChange         = DateTime.FromFileTime(ftimeChangeValue);
                _uuidLastOriginatingDsaInvocationID = attrMetaData.uuidLastOriginatingDsaInvocationID;
                _usnOriginatingChange = attrMetaData.usnOriginatingChange;
                _usnLocalChange       = attrMetaData.usnLocalChange;
            }
            _server    = server;
            _nameTable = table;
            _advanced  = advanced;
        }
Пример #15
0
 public void AddRange(DirectoryServer[] servers)
 {
     if (servers != null)
     {
         DirectoryServer[] directoryServerArray = servers;
         int num = 0;
         while (num < (int)directoryServerArray.Length)
         {
             DirectoryServer directoryServer = directoryServerArray[num];
             if (directoryServer != null)
             {
                 num++;
             }
             else
             {
                 throw new ArgumentException("servers");
             }
         }
         for (int i = 0; i < (int)servers.Length; i++)
         {
             this.Add(servers[i]);
         }
         return;
     }
     else
     {
         throw new ArgumentNullException("servers");
     }
 }
Пример #16
0
 public DirectoryServer this[int index]
 {
     get
     {
         return((DirectoryServer)base.InnerList[index]);
     }
     set
     {
         DirectoryServer directoryServer = value;
         if (directoryServer != null)
         {
             if (this.Contains(directoryServer))
             {
                 object[] objArray = new object[1];
                 objArray[0] = directoryServer;
                 throw new ArgumentException(Res.GetString("AlreadyExistingInCollection", objArray), "value");
             }
             else
             {
                 base.List[index] = directoryServer;
                 return;
             }
         }
         else
         {
             throw new ArgumentNullException("value");
         }
     }
 }
Пример #17
0
        internal ReplicationOperation(IntPtr addr, DirectoryServer server, Hashtable table)
        {
            DS_REPL_OP operation = new DS_REPL_OP();
            Marshal.PtrToStructure(addr, operation);

            // get the enqueued time
            _timeEnqueued = DateTime.FromFileTime(operation.ftimeEnqueued);

            // get the operation identifier
            _serialNumber = operation.ulSerialNumber;

            // get the priority
            _priority = operation.ulPriority;

            // get the operation type
            _operationType = operation.OpType;

            // get the partition name
            _namingContext = Marshal.PtrToStringUni(operation.pszNamingContext);

            // get the dsaDN
            _dsaDN = Marshal.PtrToStringUni(operation.pszDsaDN);

            // get the dsaobject guid
            _uuidDsaObjGuid = operation.uuidDsaObjGuid;

            _server = server;
            _nameTable = table;
        }
        internal ReplicationFailureCollection(DirectoryServer server)
        {
            this.server = server;
            Hashtable table = new Hashtable();

            this.nameTable = Hashtable.Synchronized(table);
        }
Пример #19
0
        internal ReplicationNeighbor(IntPtr addr, DirectoryServer server, Hashtable table)
        {
            DS_REPL_NEIGHBOR dSREPLNEIGHBOR = new DS_REPL_NEIGHBOR();

            Marshal.PtrToStructure(addr, dSREPLNEIGHBOR);
            this.namingContext  = Marshal.PtrToStringUni(dSREPLNEIGHBOR.pszNamingContext);
            this.sourceServerDN = Marshal.PtrToStringUni(dSREPLNEIGHBOR.pszSourceDsaDN);
            string stringUni = Marshal.PtrToStringUni(dSREPLNEIGHBOR.pszAsyncIntersiteTransportDN);

            if (stringUni != null)
            {
                string rdnFromDN = Utils.GetRdnFromDN(stringUni);
                string value     = Utils.GetDNComponents(rdnFromDN)[0].Value;
                if (string.Compare(value, "SMTP", StringComparison.OrdinalIgnoreCase) != 0)
                {
                    this.transportType = ActiveDirectoryTransportType.Rpc;
                }
                else
                {
                    this.transportType = ActiveDirectoryTransportType.Smtp;
                }
            }
            this.replicaFlags = (ReplicationNeighbor.ReplicationNeighborOptions)((long)dSREPLNEIGHBOR.dwReplicaFlags);
            this.uuidSourceDsaInvocationID = dSREPLNEIGHBOR.uuidSourceDsaInvocationID;
            this.usnLastObjChangeSynced    = dSREPLNEIGHBOR.usnLastObjChangeSynced;
            this.usnAttributeFilter        = dSREPLNEIGHBOR.usnAttributeFilter;
            this.timeLastSyncSuccess       = DateTime.FromFileTime(dSREPLNEIGHBOR.ftimeLastSyncSuccess);
            this.timeLastSyncAttempt       = DateTime.FromFileTime(dSREPLNEIGHBOR.ftimeLastSyncAttempt);
            this.lastSyncResult            = dSREPLNEIGHBOR.dwLastSyncResult;
            this.consecutiveSyncFailures   = dSREPLNEIGHBOR.cNumConsecutiveSyncFailures;
            this.server    = server;
            this.nameTable = table;
        }
Пример #20
0
        internal ReplicationOperation(IntPtr addr, DirectoryServer server, Hashtable table)
        {
            DS_REPL_OP operation = new DS_REPL_OP();

            Marshal.PtrToStructure(addr, operation);

            // get the enqueued time
            TimeEnqueued = DateTime.FromFileTime(operation.ftimeEnqueued);

            // get the operation identifier
            OperationNumber = operation.ulSerialNumber;

            // get the priority
            Priority = operation.ulPriority;

            // get the operation type
            OperationType = operation.OpType;

            // get the partition name
            PartitionName = Marshal.PtrToStringUni(operation.pszNamingContext);

            // get the dsaDN
            _dsaDN = Marshal.PtrToStringUni(operation.pszDsaDN);

            // get the dsaobject guid
            SourceServerGuid = operation.uuidDsaObjGuid;

            _server    = server;
            _nameTable = table;
        }
Пример #21
0
        internal ReplicationNeighbor(IntPtr addr, DirectoryServer server, Hashtable table)
        {
            DS_REPL_NEIGHBOR structure = new DS_REPL_NEIGHBOR();

            Marshal.PtrToStructure(addr, structure);
            this.namingContext  = Marshal.PtrToStringUni(structure.pszNamingContext);
            this.sourceServerDN = Marshal.PtrToStringUni(structure.pszSourceDsaDN);
            string distinguishedName = Marshal.PtrToStringUni(structure.pszAsyncIntersiteTransportDN);

            if (distinguishedName != null)
            {
                if (string.Compare(Utils.GetDNComponents(Utils.GetRdnFromDN(distinguishedName))[0].Value, "SMTP", StringComparison.OrdinalIgnoreCase) == 0)
                {
                    this.transportType = ActiveDirectoryTransportType.Smtp;
                }
                else
                {
                    this.transportType = ActiveDirectoryTransportType.Rpc;
                }
            }
            this.replicaFlags = (ReplicationNeighborOptions)structure.dwReplicaFlags;
            this.uuidSourceDsaInvocationID = structure.uuidSourceDsaInvocationID;
            this.usnLastObjChangeSynced    = structure.usnLastObjChangeSynced;
            this.usnAttributeFilter        = structure.usnAttributeFilter;
            this.timeLastSyncSuccess       = DateTime.FromFileTime(structure.ftimeLastSyncSuccess);
            this.timeLastSyncAttempt       = DateTime.FromFileTime(structure.ftimeLastSyncAttempt);
            this.lastSyncResult            = structure.dwLastSyncResult;
            this.consecutiveSyncFailures   = structure.cNumConsecutiveSyncFailures;
            this.server    = server;
            this.nameTable = table;
        }
Пример #22
0
 public void Remove(DirectoryServer server)
 {
     if (server != null)
     {
         int num = 0;
         while (num < base.InnerList.Count)
         {
             DirectoryServer item = (DirectoryServer)base.InnerList[num];
             if (Utils.Compare(item.Name, server.Name) != 0)
             {
                 num++;
             }
             else
             {
                 base.List.Remove(item);
                 return;
             }
         }
         object[] objArray = new object[1];
         objArray[0] = server;
         throw new ArgumentException(Res.GetString("NotFoundInCollection", objArray), "server");
     }
     else
     {
         throw new ArgumentNullException("server");
     }
 }
 internal ReplicationNeighbor(IntPtr addr, DirectoryServer server, Hashtable table)
 {
     DS_REPL_NEIGHBOR structure = new DS_REPL_NEIGHBOR();
     Marshal.PtrToStructure(addr, structure);
     this.namingContext = Marshal.PtrToStringUni(structure.pszNamingContext);
     this.sourceServerDN = Marshal.PtrToStringUni(structure.pszSourceDsaDN);
     string distinguishedName = Marshal.PtrToStringUni(structure.pszAsyncIntersiteTransportDN);
     if (distinguishedName != null)
     {
         if (string.Compare(Utils.GetDNComponents(Utils.GetRdnFromDN(distinguishedName))[0].Value, "SMTP", StringComparison.OrdinalIgnoreCase) == 0)
         {
             this.transportType = ActiveDirectoryTransportType.Smtp;
         }
         else
         {
             this.transportType = ActiveDirectoryTransportType.Rpc;
         }
     }
     this.replicaFlags = (ReplicationNeighborOptions) structure.dwReplicaFlags;
     this.uuidSourceDsaInvocationID = structure.uuidSourceDsaInvocationID;
     this.usnLastObjChangeSynced = structure.usnLastObjChangeSynced;
     this.usnAttributeFilter = structure.usnAttributeFilter;
     this.timeLastSyncSuccess = DateTime.FromFileTime(structure.ftimeLastSyncSuccess);
     this.timeLastSyncAttempt = DateTime.FromFileTime(structure.ftimeLastSyncAttempt);
     this.lastSyncResult = structure.dwLastSyncResult;
     this.consecutiveSyncFailures = structure.cNumConsecutiveSyncFailures;
     this.server = server;
     this.nameTable = table;
 }
Пример #24
0
        internal ReplicationOperationCollection(DirectoryServer server)
        {
            _server = server;
            Hashtable tempNameTable = new Hashtable();

            _nameTable = Hashtable.Synchronized(tempNameTable);
        }
    public int IndexOf(DirectoryServer server)
    {
      Contract.Requires(server != null);
      Contract.Ensures(Contract.Result<int>() >= -1);
      Contract.Ensures(Contract.Result<int>() < this.Count);

      return default(int);
    }
Пример #26
0
        internal ReplicationCursor(DirectoryServer server, string partition, Guid guid, long filter)
        {
            PartitionName      = partition;
            SourceInvocationId = guid;
            UpToDatenessUsn    = filter;

            _server = server;
        }
		internal ActiveDirectoryReplicationMetadata(DirectoryServer server)
		{
			this.dataValueCollection = new AttributeMetadataCollection();
			this.dataNameCollection = new ReadOnlyStringCollection();
			this.server = server;
			Hashtable hashtables = new Hashtable();
			this.nameTable = Hashtable.Synchronized(hashtables);
		}
Пример #28
0
        internal ReplicationCursor(DirectoryServer server, string partition, Guid guid, long filter)
        {
            _partition = partition;
            _invocationID = guid;
            _USN = filter;

            _server = server;
        }
Пример #29
0
        internal ReplicationCursor(DirectoryServer server, string partition, Guid guid, long filter)
        {
            _partition    = partition;
            _invocationID = guid;
            _USN          = filter;

            _server = server;
        }
        public int IndexOf(DirectoryServer directoryServer)
        {
            Contract.Requires(directoryServer != null);
            Contract.Ensures(Contract.Result <int>() >= -1);
            Contract.Ensures(Contract.Result <int>() < this.Count);

            return(default(int));
        }
Пример #31
0
        internal ActiveDirectoryReplicationMetadata(DirectoryServer server)
        {
            this.dataValueCollection = new AttributeMetadataCollection();
            this.dataNameCollection  = new ReadOnlyStringCollection();
            this.server = server;
            Hashtable hashtables = new Hashtable();

            this.nameTable = Hashtable.Synchronized(hashtables);
        }
Пример #32
0
 internal ReplicationCursor(DirectoryServer server, string partition, Guid guid, long filter, long time, IntPtr dn)
 {
     this.partition    = partition;
     this.invocationID = guid;
     this.USN          = filter;
     this.syncTime     = DateTime.FromFileTime(time);
     this.serverDN     = Marshal.PtrToStringUni(dn);
     this.advanced     = true;
     this.server       = server;
 }
 internal ReplicationCursor(DirectoryServer server, string partition, Guid guid, long filter, long time, IntPtr dn)
 {
     this.partition = partition;
     this.invocationID = guid;
     this.USN = filter;
     this.syncTime = DateTime.FromFileTime(time);
     this.serverDN = Marshal.PtrToStringUni(dn);
     this.advanced = true;
     this.server = server;
 }
        internal string[] GetMultiValuedProperty()
        {
            ArrayList list = new ArrayList();

            for (int i = 0; i < base.InnerList.Count; i++)
            {
                DirectoryServer server = (DirectoryServer)base.InnerList[i];
                string          str    = (server is DomainController) ? ((DomainController)server).NtdsaObjectName : ((AdamInstance)server).NtdsaObjectName;
                list.Add(str);
            }
            return((string[])list.ToArray(typeof(string)));
        }
        public int Add(DirectoryServer server)
        {
            if (server == null)
            {
                throw new ArgumentNullException("server");
            }

            // make sure that it is within the current site
            if (_isForNC)
            {
                if ((!_isADAM))
                {
                    if (!(server is DomainController))
                    {
                        throw new ArgumentException(Res.GetString(Res.ServerShouldBeDC), "server");
                    }

                    // verify that the version >= 5.2
                    // DC should be Win 2003 or higher
                    if (((DomainController)server).NumericOSVersion < 5.2)
                    {
                        throw new ArgumentException(Res.GetString(Res.ServerShouldBeW2K3), "server");
                    }
                }

                if (!Contains(server))
                {
                    return(List.Add(server));
                }
                else
                {
                    throw new ArgumentException(Res.GetString(Res.AlreadyExistingInCollection, server), "server");
                }
            }
            else
            {
                string siteName = (server is DomainController) ? ((DomainController)server).SiteObjectName : ((AdamInstance)server).SiteObjectName;
                Debug.Assert(siteName != null);
                if (Utils.Compare(siteDN, siteName) != 0)
                {
                    throw new ArgumentException(Res.GetString(Res.NotWithinSite));
                }

                if (!Contains(server))
                {
                    return(List.Add(server));
                }
                else
                {
                    throw new ArgumentException(Res.GetString(Res.AlreadyExistingInCollection, server), "server");
                }
            }
        }
Пример #36
0
        public void Insert(int index, DirectoryServer server)
        {
            if (server == null)
            {
                throw new ArgumentNullException("server");
            }

            if (_isForNC)
            {
                if ((!_isADAM))
                {
                    if (!(server is DomainController))
                    {
                        throw new ArgumentException(SR.ServerShouldBeDC, "server");
                    }

                    // verify that the version >= 5.2
                    // DC should be Win 2003 or higher
                    if (((DomainController)server).NumericOSVersion < 5.2)
                    {
                        throw new ArgumentException(SR.ServerShouldBeW2K3, "server");
                    }
                }

                if (!Contains(server))
                {
                    List.Insert(index, server);
                }
                else
                {
                    throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, SR.AlreadyExistingInCollection, server), "server");
                }
            }
            else
            {
                // make sure that it is within the current site
                string siteName = (server is DomainController) ? ((DomainController)server).SiteObjectName : ((AdamInstance)server).SiteObjectName;
                Debug.Assert(siteName != null);
                if (Utils.Compare(siteDN, siteName) != 0)
                {
                    throw new ArgumentException(SR.NotWithinSite, "server");
                }

                if (!Contains(server))
                {
                    List.Insert(index, server);
                }
                else
                {
                    throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, SR.AlreadyExistingInCollection, server));
                }
            }
        }
 internal ReplicationFailure(IntPtr addr, DirectoryServer server, Hashtable table)
 {
     DS_REPL_KCC_DSA_FAILURE structure = new DS_REPL_KCC_DSA_FAILURE();
     Marshal.PtrToStructure(addr, structure);
     this.sourceDsaDN = Marshal.PtrToStringUni(structure.pszDsaDN);
     this.uuidDsaObjGuid = structure.uuidDsaObjGuid;
     this.timeFirstFailure = DateTime.FromFileTime(structure.ftimeFirstFailure);
     this.numFailures = structure.cNumFailures;
     this.lastResult = structure.dwLastResult;
     this.server = server;
     this.nameTable = table;
 }
        internal string[] GetMultiValuedProperty()
        {
            ArrayList values = new ArrayList();

            for (int i = 0; i < InnerList.Count; i++)
            {
                DirectoryServer ds = (DirectoryServer)InnerList[i];

                string ntdsaName = (ds is DomainController) ? ((DomainController)ds).NtdsaObjectName : ((AdamInstance)ds).NtdsaObjectName;
                values.Add(ntdsaName);
            }
            return((string[])values.ToArray(typeof(string)));
        }
        internal ReplicationFailure(IntPtr addr, DirectoryServer server, Hashtable table)
        {
            DS_REPL_KCC_DSA_FAILURE structure = new DS_REPL_KCC_DSA_FAILURE();

            Marshal.PtrToStructure(addr, structure);
            this.sourceDsaDN      = Marshal.PtrToStringUni(structure.pszDsaDN);
            this.uuidDsaObjGuid   = structure.uuidDsaObjGuid;
            this.timeFirstFailure = DateTime.FromFileTime(structure.ftimeFirstFailure);
            this.numFailures      = structure.cNumFailures;
            this.lastResult       = structure.dwLastResult;
            this.server           = server;
            this.nameTable        = table;
        }
 internal ReplicationOperation(IntPtr addr, DirectoryServer server, Hashtable table)
 {
     DS_REPL_OP structure = new DS_REPL_OP();
     Marshal.PtrToStructure(addr, structure);
     this.timeEnqueued = DateTime.FromFileTime(structure.ftimeEnqueued);
     this.serialNumber = structure.ulSerialNumber;
     this.priority = structure.ulPriority;
     this.operationType = structure.OpType;
     this.namingContext = Marshal.PtrToStringUni(structure.pszNamingContext);
     this.dsaDN = Marshal.PtrToStringUni(structure.pszDsaDN);
     this.uuidDsaObjGuid = structure.uuidDsaObjGuid;
     this.server = server;
     this.nameTable = table;
 }
Пример #41
0
        internal ReplicationFailure(IntPtr addr, DirectoryServer server, Hashtable table)
        {
            DS_REPL_KCC_DSA_FAILURE failure = new DS_REPL_KCC_DSA_FAILURE();
            Marshal.PtrToStructure(addr, failure);

            _sourceDsaDN = Marshal.PtrToStringUni(failure.pszDsaDN);
            _uuidDsaObjGuid = failure.uuidDsaObjGuid;
            _timeFirstFailure = DateTime.FromFileTime(failure.ftimeFirstFailure);
            _numFailures = failure.cNumFailures;
            lastResult = failure.dwLastResult;

            _server = server;
            _nameTable = table;
        }
Пример #42
0
        internal ReplicationOperation(IntPtr addr, DirectoryServer server, Hashtable table)
        {
            DS_REPL_OP structure = new DS_REPL_OP();

            Marshal.PtrToStructure(addr, structure);
            this.timeEnqueued   = DateTime.FromFileTime(structure.ftimeEnqueued);
            this.serialNumber   = structure.ulSerialNumber;
            this.priority       = structure.ulPriority;
            this.operationType  = structure.OpType;
            this.namingContext  = Marshal.PtrToStringUni(structure.pszNamingContext);
            this.dsaDN          = Marshal.PtrToStringUni(structure.pszDsaDN);
            this.uuidDsaObjGuid = structure.uuidDsaObjGuid;
            this.server         = server;
            this.nameTable      = table;
        }
Пример #43
0
        internal ReplicationFailure(IntPtr addr, DirectoryServer server, Hashtable table)
        {
            DS_REPL_KCC_DSA_FAILURE failure = new DS_REPL_KCC_DSA_FAILURE();

            Marshal.PtrToStructure(addr, failure);

            _sourceDsaDN            = Marshal.PtrToStringUni(failure.pszDsaDN);
            SourceServerGuid        = failure.uuidDsaObjGuid;
            FirstFailureTime        = DateTime.FromFileTime(failure.ftimeFirstFailure);
            ConsecutiveFailureCount = failure.cNumFailures;
            lastResult = failure.dwLastResult;

            _server    = server;
            _nameTable = table;
        }
Пример #44
0
        internal ReplicationCursor(DirectoryServer server, string partition, Guid guid, long filter, long time, IntPtr dn)
        {
            _partition = partition;
            _invocationID = guid;
            _USN = filter;

            // convert filetime to DateTime
            _syncTime = DateTime.FromFileTime(time);

            // get the dn
            _serverDN = Marshal.PtrToStringUni(dn);

            _advanced = true;

            _server = server;
        }
Пример #45
0
        internal ReplicationCursor(DirectoryServer server, string partition, Guid guid, long filter, long time, IntPtr dn)
        {
            _partition    = partition;
            _invocationID = guid;
            _USN          = filter;

            // convert filetime to DateTime
            _syncTime = DateTime.FromFileTime(time);

            // get the dn
            _serverDN = Marshal.PtrToStringUni(dn);

            _advanced = true;

            _server = server;
        }
Пример #46
0
        public int Add(DirectoryServer server)
        {
            if (server == null)
                throw new ArgumentNullException("server");

            // make sure that it is within the current site
            if (_isForNC)
            {
                if ((!_isADAM))
                {
                    if (!(server is DomainController))
                        throw new ArgumentException(Res.GetString(Res.ServerShouldBeDC), "server");

                    // verify that the version >= 5.2
                    // DC should be Win 2003 or higher
                    if (((DomainController)server).NumericOSVersion < 5.2)
                    {
                        throw new ArgumentException(Res.GetString(Res.ServerShouldBeW2K3), "server");
                    }
                }

                if (!Contains(server))
                {
                    return List.Add(server);
                }
                else
                {
                    throw new ArgumentException(Res.GetString(Res.AlreadyExistingInCollection, server), "server");
                }
            }
            else
            {
                string siteName = (server is DomainController) ? ((DomainController)server).SiteObjectName : ((AdamInstance)server).SiteObjectName;
                Debug.Assert(siteName != null);
                if (Utils.Compare(siteDN, siteName) != 0)
                {
                    throw new ArgumentException(Res.GetString(Res.NotWithinSite));
                }

                if (!Contains(server))
                    return List.Add(server);
                else
                    throw new ArgumentException(Res.GetString(Res.AlreadyExistingInCollection, server), "server");
            }
        }
 public void AddRange(DirectoryServer[] servers)
 {
     if (servers == null)
     {
         throw new ArgumentNullException("servers");
     }
     DirectoryServer[] serverArray = servers;
     for (int i = 0; i < serverArray.Length; i++)
     {
         if (serverArray[i] == null)
         {
             throw new ArgumentException("servers");
         }
     }
     for (int j = 0; j < servers.Length; j++)
     {
         this.Add(servers[j]);
     }
 }
 internal ActiveDirectoryReplicationMetadata ConstructMetaData(bool advanced, IntPtr info, DirectoryServer server, LoadLibrarySafeHandle libHandle)
 {
     ActiveDirectoryReplicationMetadata metadata = new ActiveDirectoryReplicationMetadata(server);
     int count = 0;
     if (advanced)
     {
         try
         {
             if (info != IntPtr.Zero)
             {
                 DS_REPL_OBJ_META_DATA_2 structure = new DS_REPL_OBJ_META_DATA_2();
                 Marshal.PtrToStructure(info, structure);
                 count = structure.cNumEntries;
                 if (count > 0)
                 {
                     metadata.AddHelper(count, info, true);
                 }
             }
             return metadata;
         }
         finally
         {
             this.FreeReplicaInfo(DS_REPL_INFO_TYPE.DS_REPL_INFO_METADATA_2_FOR_OBJ, info, libHandle);
         }
     }
     try
     {
         DS_REPL_OBJ_META_DATA ds_repl_obj_meta_data = new DS_REPL_OBJ_META_DATA();
         Marshal.PtrToStructure(info, ds_repl_obj_meta_data);
         count = ds_repl_obj_meta_data.cNumEntries;
         if (count > 0)
         {
             metadata.AddHelper(count, info, false);
         }
     }
     finally
     {
         this.FreeReplicaInfo(DS_REPL_INFO_TYPE.DS_REPL_INFO_METADATA_FOR_OBJ, info, libHandle);
     }
     return metadata;
 }
 internal ReplicationFailureCollection ConstructFailures(IntPtr info, DirectoryServer server, LoadLibrarySafeHandle libHandle)
 {
     ReplicationFailureCollection failures = new ReplicationFailureCollection(server);
     try
     {
         if (info != IntPtr.Zero)
         {
             DS_REPL_KCC_DSA_FAILURES structure = new DS_REPL_KCC_DSA_FAILURES();
             Marshal.PtrToStructure(info, structure);
             if (structure.cNumEntries > 0)
             {
                 failures.AddHelper(structure, info);
             }
         }
     }
     finally
     {
         this.FreeReplicaInfo(DS_REPL_INFO_TYPE.DS_REPL_INFO_KCC_DSA_CONNECT_FAILURES, info, libHandle);
     }
     return failures;
 }
 public int Add(DirectoryServer server)
 {
     if (server == null)
     {
         throw new ArgumentNullException("server");
     }
     if (this.isForNC)
     {
         if (!this.isADAM)
         {
             if (!(server is DomainController))
             {
                 throw new ArgumentException(Res.GetString("ServerShouldBeDC"), "server");
             }
             if (((DomainController) server).NumericOSVersion < 5.2)
             {
                 throw new ArgumentException(Res.GetString("ServerShouldBeW2K3"), "server");
             }
         }
         if (this.Contains(server))
         {
             throw new ArgumentException(Res.GetString("AlreadyExistingInCollection", new object[] { server }), "server");
         }
         return base.List.Add(server);
     }
     string str = (server is DomainController) ? ((DomainController) server).SiteObjectName : ((AdamInstance) server).SiteObjectName;
     if (Utils.Compare(this.siteDN, str) != 0)
     {
         throw new ArgumentException(Res.GetString("NotWithinSite"));
     }
     if (this.Contains(server))
     {
         throw new ArgumentException(Res.GetString("AlreadyExistingInCollection", new object[] { server }), "server");
     }
     return base.List.Add(server);
 }
		public int IndexOf(DirectoryServer directoryServer)
		{
			if (directoryServer != null)
			{
				int num = 0;
				while (num < base.InnerList.Count)
				{
					DirectoryServer item = (DirectoryServer)base.InnerList[num];
					if (Utils.Compare(item.Name, directoryServer.Name) != 0)
					{
						num++;
					}
					else
					{
						return num;
					}
				}
				return -1;
			}
			else
			{
				throw new ArgumentNullException("directoryServer");
			}
		}
Пример #52
0
		internal ReplicationNeighborCollection(DirectoryServer server)
		{
			this.server = server;
			Hashtable hashtables = new Hashtable();
			this.nameTable = Hashtable.Synchronized(hashtables);
		}
Пример #53
0
		internal ReplicationNeighbor(IntPtr addr, DirectoryServer server, Hashtable table)
		{
			DS_REPL_NEIGHBOR dSREPLNEIGHBOR = new DS_REPL_NEIGHBOR();
			Marshal.PtrToStructure(addr, dSREPLNEIGHBOR);
			this.namingContext = Marshal.PtrToStringUni(dSREPLNEIGHBOR.pszNamingContext);
			this.sourceServerDN = Marshal.PtrToStringUni(dSREPLNEIGHBOR.pszSourceDsaDN);
			string stringUni = Marshal.PtrToStringUni(dSREPLNEIGHBOR.pszAsyncIntersiteTransportDN);
			if (stringUni != null)
			{
				string rdnFromDN = Utils.GetRdnFromDN(stringUni);
				string value = Utils.GetDNComponents(rdnFromDN)[0].Value;
				if (string.Compare(value, "SMTP", StringComparison.OrdinalIgnoreCase) != 0)
				{
					this.transportType = ActiveDirectoryTransportType.Rpc;
				}
				else
				{
					this.transportType = ActiveDirectoryTransportType.Smtp;
				}
			}
			this.replicaFlags = (ReplicationNeighbor.ReplicationNeighborOptions)((long)dSREPLNEIGHBOR.dwReplicaFlags);
			this.uuidSourceDsaInvocationID = dSREPLNEIGHBOR.uuidSourceDsaInvocationID;
			this.usnLastObjChangeSynced = dSREPLNEIGHBOR.usnLastObjChangeSynced;
			this.usnAttributeFilter = dSREPLNEIGHBOR.usnAttributeFilter;
			this.timeLastSyncSuccess = DateTime.FromFileTime(dSREPLNEIGHBOR.ftimeLastSyncSuccess);
			this.timeLastSyncAttempt = DateTime.FromFileTime(dSREPLNEIGHBOR.ftimeLastSyncAttempt);
			this.lastSyncResult = dSREPLNEIGHBOR.dwLastSyncResult;
			this.consecutiveSyncFailures = dSREPLNEIGHBOR.cNumConsecutiveSyncFailures;
			this.server = server;
			this.nameTable = table;
		}
Пример #54
0
		internal AttributeMetadata(IntPtr info, bool advanced, DirectoryServer server, Hashtable table)
		{
			if (!advanced)
			{
				DS_REPL_ATTR_META_DATA dSREPLATTRMETADATum = new DS_REPL_ATTR_META_DATA();
				Marshal.PtrToStructure(info, dSREPLATTRMETADATum);
				this.pszAttributeName = Marshal.PtrToStringUni(dSREPLATTRMETADATum.pszAttributeName);
				this.dwVersion = dSREPLATTRMETADATum.dwVersion;
				long num = (long)dSREPLATTRMETADATum.ftimeLastOriginatingChange1 + ((long)dSREPLATTRMETADATum.ftimeLastOriginatingChange2 << 32);
				this.ftimeLastOriginatingChange = DateTime.FromFileTime(num);
				this.uuidLastOriginatingDsaInvocationID = dSREPLATTRMETADATum.uuidLastOriginatingDsaInvocationID;
				this.usnOriginatingChange = dSREPLATTRMETADATum.usnOriginatingChange;
				this.usnLocalChange = dSREPLATTRMETADATum.usnLocalChange;
			}
			else
			{
				DS_REPL_ATTR_META_DATA_2 dSREPLATTRMETADATA2 = new DS_REPL_ATTR_META_DATA_2();
				Marshal.PtrToStructure(info, dSREPLATTRMETADATA2);
				this.pszAttributeName = Marshal.PtrToStringUni(dSREPLATTRMETADATA2.pszAttributeName);
				this.dwVersion = dSREPLATTRMETADATA2.dwVersion;
				long num1 = (long)dSREPLATTRMETADATA2.ftimeLastOriginatingChange1 + ((long)dSREPLATTRMETADATA2.ftimeLastOriginatingChange2 << 32);
				this.ftimeLastOriginatingChange = DateTime.FromFileTime(num1);
				this.uuidLastOriginatingDsaInvocationID = dSREPLATTRMETADATA2.uuidLastOriginatingDsaInvocationID;
				this.usnOriginatingChange = dSREPLATTRMETADATA2.usnOriginatingChange;
				this.usnLocalChange = dSREPLATTRMETADATA2.usnLocalChange;
				this.pszLastOriginatingDsaDN = Marshal.PtrToStringUni(dSREPLATTRMETADATA2.pszLastOriginatingDsaDN);
			}
			this.server = server;
			this.nameTable = table;
			this.advanced = advanced;
		}
 internal ReplicationOperationCollection(DirectoryServer server)
 {
     this.server = server;
     Hashtable table = new Hashtable();
     this.nameTable = Hashtable.Synchronized(table);
 }
Пример #56
0
		public void Remove (DirectoryServer server)
		{
			throw new NotImplementedException ();
		}
Пример #57
0
		public void Insert (int index, DirectoryServer server)
		{
			throw new NotImplementedException ();
		}
		public bool Contains (DirectoryServer directoryServer)
		{
			throw new NotImplementedException ();
		}
		public void CopyTo (DirectoryServer[] directoryServers, int index)
		{
			throw new NotImplementedException ();
		}
		public int IndexOf (DirectoryServer directoryServer)
		{
			throw new NotImplementedException ();
		}