Esempio n. 1
0
        internal ReplicationOperationInformation ConstructPendingOperations(IntPtr info, DirectoryServer server, LoadLibrarySafeHandle libHandle)
        {
            ReplicationOperationInformation replicationInfo = new ReplicationOperationInformation();
            ReplicationOperationCollection  collection      = new ReplicationOperationCollection(server);

            replicationInfo.collection = collection;
            int count = 0;

            try
            {
                if (info != (IntPtr)0)
                {
                    DS_REPL_PENDING_OPS operations = new DS_REPL_PENDING_OPS();
                    Marshal.PtrToStructure(info, operations);
                    count = operations.cNumPendingOps;
                    if (count > 0)
                    {
                        collection.AddHelper(operations, info);
                        replicationInfo.startTime = DateTime.FromFileTime(operations.ftimeCurrentOpStarted);
                        replicationInfo.currentOp = collection.GetFirstOperation();
                    }
                }
            }
            finally
            {
                FreeReplicaInfo(DS_REPL_INFO_TYPE.DS_REPL_INFO_PENDING_OPS, info, libHandle);
            }
            return(replicationInfo);
        }
        internal ReplicationOperationInformation ConstructPendingOperations(IntPtr info, DirectoryServer server, LoadLibrarySafeHandle libHandle)
        {
            ReplicationOperationInformation information = new ReplicationOperationInformation();
            ReplicationOperationCollection  operations  = new ReplicationOperationCollection(server);

            information.collection = operations;
            try
            {
                if (info != IntPtr.Zero)
                {
                    DS_REPL_PENDING_OPS structure = new DS_REPL_PENDING_OPS();
                    Marshal.PtrToStructure(info, structure);
                    if (structure.cNumPendingOps > 0)
                    {
                        operations.AddHelper(structure, info);
                        information.startTime = DateTime.FromFileTime(structure.ftimeCurrentOpStarted);
                        information.currentOp = operations.GetFirstOperation();
                    }
                }
            }
            finally
            {
                this.FreeReplicaInfo(DS_REPL_INFO_TYPE.DS_REPL_INFO_PENDING_OPS, info, libHandle);
            }
            return(information);
        }
Esempio n. 3
0
        internal ReplicationOperationInformation ConstructPendingOperations(IntPtr info, DirectoryServer server, LoadLibrarySafeHandle libHandle)
        {
            ReplicationOperationInformation replicationOperationInformation = new ReplicationOperationInformation();
            ReplicationOperationCollection  replicationOperationCollection  = new ReplicationOperationCollection(server);

            replicationOperationInformation.collection = replicationOperationCollection;
            try
            {
                if (info != (IntPtr)0)
                {
                    DS_REPL_PENDING_OPS dSREPLPENDINGOP = new DS_REPL_PENDING_OPS();
                    Marshal.PtrToStructure(info, dSREPLPENDINGOP);
                    int num = dSREPLPENDINGOP.cNumPendingOps;
                    if (num > 0)
                    {
                        replicationOperationCollection.AddHelper(dSREPLPENDINGOP, info);
                        replicationOperationInformation.startTime = DateTime.FromFileTime(dSREPLPENDINGOP.ftimeCurrentOpStarted);
                        replicationOperationInformation.currentOp = replicationOperationCollection.GetFirstOperation();
                    }
                }
            }
            finally
            {
                this.FreeReplicaInfo(DS_REPL_INFO_TYPE.DS_REPL_INFO_PENDING_OPS, info, libHandle);
            }
            return(replicationOperationInformation);
        }
Esempio n. 4
0
        internal ReplicationOperationInformation ConstructPendingOperations(IntPtr info, DirectoryServer server, LoadLibrarySafeHandle libHandle)
        {
            ReplicationOperationInformation replicationInfo = new ReplicationOperationInformation();
            ReplicationOperationCollection collection = new ReplicationOperationCollection(server);
            replicationInfo.collection = collection;
            int count = 0;

            try
            {
                if (info != (IntPtr)0)
                {
                    DS_REPL_PENDING_OPS operations = new DS_REPL_PENDING_OPS();
                    Marshal.PtrToStructure(info, operations);
                    count = operations.cNumPendingOps;
                    if (count > 0)
                    {
                        collection.AddHelper(operations, info);
                        replicationInfo.startTime = DateTime.FromFileTime(operations.ftimeCurrentOpStarted);
                        replicationInfo.currentOp = collection.GetFirstOperation();
                    }
                }
            }
            finally
            {
                FreeReplicaInfo(DS_REPL_INFO_TYPE.DS_REPL_INFO_PENDING_OPS, info, libHandle);
            }
            return replicationInfo;
        }
Esempio n. 5
0
		internal ReplicationOperationInformation ConstructPendingOperations(IntPtr info, DirectoryServer server, LoadLibrarySafeHandle libHandle)
		{
			ReplicationOperationInformation replicationOperationInformation = new ReplicationOperationInformation();
			ReplicationOperationCollection replicationOperationCollection = new ReplicationOperationCollection(server);
			replicationOperationInformation.collection = replicationOperationCollection;
			try
			{
				if (info != (IntPtr)0)
				{
					DS_REPL_PENDING_OPS dSREPLPENDINGOP = new DS_REPL_PENDING_OPS();
					Marshal.PtrToStructure(info, dSREPLPENDINGOP);
					int num = dSREPLPENDINGOP.cNumPendingOps;
					if (num > 0)
					{
						replicationOperationCollection.AddHelper(dSREPLPENDINGOP, info);
						replicationOperationInformation.startTime = DateTime.FromFileTime(dSREPLPENDINGOP.ftimeCurrentOpStarted);
						replicationOperationInformation.currentOp = replicationOperationCollection.GetFirstOperation();
					}
				}
			}
			finally
			{
				this.FreeReplicaInfo(DS_REPL_INFO_TYPE.DS_REPL_INFO_PENDING_OPS, info, libHandle);
			}
			return replicationOperationInformation;
		}
 internal ReplicationOperationInformation ConstructPendingOperations(IntPtr info, DirectoryServer server, LoadLibrarySafeHandle libHandle)
 {
     ReplicationOperationInformation information = new ReplicationOperationInformation();
     ReplicationOperationCollection operations = new ReplicationOperationCollection(server);
     information.collection = operations;
     try
     {
         if (info != IntPtr.Zero)
         {
             DS_REPL_PENDING_OPS structure = new DS_REPL_PENDING_OPS();
             Marshal.PtrToStructure(info, structure);
             if (structure.cNumPendingOps > 0)
             {
                 operations.AddHelper(structure, info);
                 information.startTime = DateTime.FromFileTime(structure.ftimeCurrentOpStarted);
                 information.currentOp = operations.GetFirstOperation();
             }
         }
     }
     finally
     {
         this.FreeReplicaInfo(DS_REPL_INFO_TYPE.DS_REPL_INFO_PENDING_OPS, info, libHandle);
     }
     return information;
 }