public DS_REPL_VALUE_META_DATA_BLOB( string szAttributeName, string szObjectDn, uint cbData, byte[] bData, _FILETIME ftimeDeleted, _FILETIME ftimeCreated, uint dwVersion, _FILETIME ftimeLastOriginatingChange, Guid uuidLastOriginatingDsaInvocationID, long usnOriginatingChange, long usnLocalChange, string szLastOriginatingDsaDN) { this.data = ArrayUtility.ConcatenateArrays( Encoding.Unicode.GetBytes(szAttributeName), AdtsLdapUtility.nullTerminator, Encoding.Unicode.GetBytes(szObjectDn), AdtsLdapUtility.nullTerminator, Encoding.Unicode.GetBytes(szLastOriginatingDsaDN), AdtsLdapUtility.nullTerminator, bData); this.oszAttributeName = (uint)Marshal.OffsetOf(typeof(DS_REPL_VALUE_META_DATA_BLOB), AdtsLdapUtility.Data); this.oszObjectDn = this.oszAttributeName + (uint)szAttributeName.Length + (uint)AdtsLdapUtility.nullTerminator.Length; this.oszLastOriginatingDsaDN = this.oszObjectDn + (uint)szObjectDn.Length + (uint)AdtsLdapUtility.nullTerminator.Length; this.cbData = cbData; this.ftimeDeleted = ftimeDeleted; this.ftimeCreated = ftimeCreated; this.dwVersion = dwVersion; this.ftimeLastOriginatingChange = ftimeLastOriginatingChange; this.uuidLastOriginatingDsaInvocationID = uuidLastOriginatingDsaInvocationID; this.usnOriginatingChange = usnOriginatingChange; this.usnLocalChange = usnLocalChange; }
/// <summary> /// Converts the value of the current FILETIME object to an equivalent DateTime. /// </summary> /// <param name="fileTime">FILETIME to convert.</param> /// <returns>A DateTime object that represents a UTC time equivalent to the date /// and time represented by the fileTime parameter.</returns> public static DateTime ToDateTime(_FILETIME fileTime) { long fileTimeLong = (((long)fileTime.dwHighDateTime) << 32) | fileTime.dwLowDateTime; if (fileTimeLong > DateTime.MaxValue.ToFileTimeUtc()) { return DateTime.MaxValue.ToUniversalTime(); } return DateTime.FromFileTimeUtc(fileTimeLong); }
/// <summary> /// Constructor /// </summary> /// <param name="ftimeCurrentOpStarted"> /// A FILETIME structure that contains the date and time that the currently running operation started. /// </param> /// <param name="cNumPendingOps"> /// A unsigned integer specifying the number of currently pending operations. /// </param> /// <param name="ftimeOldestSync"> /// A FILETIME structure that contains the date and time of the oldest synchronization operation. /// </param> /// <param name="ftimeOldestAdd"> /// A FILETIME structure that contains the date and time of the oldest add operation. /// </param> /// <param name="ftimeOldestMod"> /// A FILETIME structure that contains the date and time of the oldest modification operation. /// </param> /// <param name="ftimeOldestDel"> /// A FILETIME structure that contains the date and time of the oldest delete operation. /// </param> /// <param name="ftimeOldestUpdRefs"> /// A FILETIME structure that contains the date and time of the oldest reference update operation. /// </param> public DS_REPL_QUEUE_STATISTICSW_BLOB( _FILETIME ftimeCurrentOpStarted, uint cNumPendingOps, _FILETIME ftimeOldestSync, _FILETIME ftimeOldestAdd, _FILETIME ftimeOldestMod, _FILETIME ftimeOldestDel, _FILETIME ftimeOldestUpdRefs ) { this.ftimeCurrentOpStarted = ftimeCurrentOpStarted; this.cNumPendingOps = cNumPendingOps; this.ftimeOldestSync = ftimeOldestSync; this.ftimeOldestAdd = ftimeOldestAdd; this.ftimeOldestMod = ftimeOldestMod; this.ftimeOldestDel = ftimeOldestDel; this.ftimeOldestUpdRefs = ftimeOldestUpdRefs; }
public DS_REPL_OPW_BLOB( _FILETIME ftimeEnqueued, uint ulSerialNumber, uint ulPriority, AdtsOpType opType, uint ulOptions, string szNamingContext, string szDsaDN, string szDsaAddress, Guid uuidNamingContextObjGuid, Guid uuidDsaObjGuid) { this.data = ArrayUtility.ConcatenateArrays( Encoding.Unicode.GetBytes(szNamingContext), AdtsLdapUtility.nullTerminator, Encoding.Unicode.GetBytes(szDsaDN), AdtsLdapUtility.nullTerminator, Encoding.Unicode.GetBytes(szDsaAddress), AdtsLdapUtility.nullTerminator); this.oszNamingContext = (uint)Marshal.OffsetOf(typeof(DS_REPL_OPW_BLOB), AdtsLdapUtility.Data); this.oszDsaDN = this.oszNamingContext + (uint)szNamingContext.Length + (uint)AdtsLdapUtility.nullTerminator.Length; this.oszDsaAddress = this.oszDsaDN + (uint)szDsaDN.Length + (uint)AdtsLdapUtility.nullTerminator.Length; this.ftimeEnqueued = ftimeEnqueued; this.ulSerialNumber = ulSerialNumber; this.ulPriority = ulPriority; this.opType = opType; this.ulOptions = ulOptions; this.uuidNamingContextObjGuid = uuidNamingContextObjGuid; this.uuidDsaObjGuid = uuidDsaObjGuid; }
public DS_REPL_NEIGHBORW_BLOB( string szNamingContext, string szSourceDsaDN, string szSourceDsaAddress, string szAsyncIntersiteTransportDN, uint dwReplicaFlags, uint dwReserved, Guid uuidNamingContextObjGuid, Guid uuidSourceDsaObjGuid, Guid uuidSourceDsaInvocationID, Guid uuidAsyncIntersiteTransportObjGuid, long usnLastObjChangeSynced, long usnAttributeFilter, _FILETIME ftimeLastSyncSuccess, _FILETIME ftimeLastSyncAttempt, uint dwLastSyncResult, uint cNumConsecutiveSyncFailures ) { this.data = ArrayUtility.ConcatenateArrays( Encoding.Unicode.GetBytes(szNamingContext), AdtsLdapUtility.nullTerminator, Encoding.Unicode.GetBytes(szSourceDsaDN), AdtsLdapUtility.nullTerminator, Encoding.Unicode.GetBytes(szSourceDsaAddress), AdtsLdapUtility.nullTerminator, Encoding.Unicode.GetBytes(szAsyncIntersiteTransportDN), AdtsLdapUtility.nullTerminator); this.oszNamingContext = (uint)Marshal.OffsetOf(typeof(DS_REPL_NEIGHBORW_BLOB), AdtsLdapUtility.Data); this.oszSourceDsaDN = this.oszNamingContext + (uint)szNamingContext.Length + (uint)AdtsLdapUtility.nullTerminator.Length; this.oszSourceDsaAddress = this.oszSourceDsaDN + (uint)szSourceDsaDN.Length + (uint)AdtsLdapUtility.nullTerminator.Length; this.oszAsyncIntersiteTransportDN = this.oszSourceDsaAddress + (uint)szSourceDsaAddress.Length + (uint)AdtsLdapUtility.nullTerminator.Length; this.dwReplicaFlags = dwReplicaFlags; this.dwReserved = dwReserved; this.uuidNamingContextObjGuid = uuidNamingContextObjGuid; this.uuidSourceDsaObjGuid = uuidSourceDsaObjGuid; this.uuidSourceDsaInvocationID = uuidSourceDsaInvocationID; this.uuidAsyncIntersiteTransportObjGuid = uuidAsyncIntersiteTransportObjGuid; this.usnLastObjChangeSynced = usnLastObjChangeSynced; this.usnAttributeFilter = usnAttributeFilter; this.ftimeLastSyncSuccess = ftimeLastSyncSuccess; this.ftimeLastSyncAttempt = ftimeLastSyncAttempt; this.dwLastSyncResult = dwLastSyncResult; this.cNumConsecutiveSyncFailures = cNumConsecutiveSyncFailures; }
public DS_REPL_KCC_DSA_FAILUREW_BLOB( string szDsaDN, Guid uuidDsaObjGuid, _FILETIME ftimeFirstFailure, uint cNumFailures, uint dwLastResult) { this.data = ArrayUtility.ConcatenateArrays( Encoding.Unicode.GetBytes(szDsaDN), AdtsLdapUtility.nullTerminator); this.oszDsaDN = (uint)Marshal.OffsetOf(typeof(DS_REPL_KCC_DSA_FAILUREW_BLOB), AdtsLdapUtility.Data); this.uuidDsaObjGuid = uuidDsaObjGuid; this.ftimeFirstFailure = ftimeFirstFailure; this.cNumFailures = cNumFailures; this.dwLastResult = dwLastResult; }
public DS_REPL_CURSOR_BLOB( Guid uuidSourceDsaInvocationID, long usnAttributeFilter, _FILETIME fTimeLastSyncSuccess, string szSourceDsaDN) { this.data = ArrayUtility.ConcatenateArrays( Encoding.Unicode.GetBytes(szSourceDsaDN), AdtsLdapUtility.nullTerminator); this.oszSourceDsaDN = (uint)Marshal.OffsetOf(typeof(DS_REPL_CURSOR_BLOB), AdtsLdapUtility.Data); this.uuidSourceDsaInvocationID = uuidSourceDsaInvocationID; this.usnAttributeFilter = usnAttributeFilter; this.fTimeLastSyncSuccess = fTimeLastSyncSuccess; }