/// <summary>Initializes a new instance of the <see cref="T:DfsInfo"/> class, /// <para>which acts as a wrapper for a DFS root or link target.</para> /// </summary> /// <param name="transaction">The transaction.</param> /// <param name="structure">An initialized <see cref="T:NativeMethods.DfsInfo4"/> instance.</param> private DfsInfo(KernelTransaction transaction, NativeMethods.DfsInfo4 structure) { Transaction = transaction; Comment = structure.Comment; EntryPath = structure.EntryPath; State = structure.State; Timeout = structure.Timeout; Guid = structure.Guid; _numberOfStorages = new List <DfsStorage>(); for (int i = 0; i < structure.NumberOfStorages; i++) { _numberOfStorages.Add(new DfsStorage(Utils.MarshalPtrToStructure <NativeMethods.DfsStorageInfo>(i, structure.Storage))); } }
/// <summary>Initializes a new instance of the <see cref="DfsInfo"/> class, which acts as a wrapper for a DFS root or link target.</summary> /// <param name="structure">An initialized <see cref="NativeMethods.DfsInfo4"/> instance.</param> internal DfsInfo(NativeMethods.DfsInfo4 structure) { Comment = structure.Comment; EntryPath = structure.EntryPath; State = structure.State; Timeout = structure.Timeout; Guid = structure.Guid; _storageInfoCollection = new List <DfsStorageInfo>(); for (int i = 0; i < structure.NumberOfStorages; i++) { _storageInfoCollection.Add(new DfsStorageInfo(Utils.MarshalPtrToStructure <NativeMethods.DfsStorageInfo>(i, structure.Storage))); } }
/// <summary>Initializes a new instance of the <see cref="T:DfsInfo"/> class, /// <para>which acts as a wrapper for a DFS root or link target.</para> /// </summary> /// <param name="structure">An initialized <see cref="T:NativeMethods.DfsInfo4"/> instance.</param> internal DfsInfo(NativeMethods.DfsInfo4 structure) : this(null, structure) { }