Пример #1
0
 public DynamicHeader(long dataOffset, long tableOffset, uint blockSize, long diskSize)
 {
     Cookie = HeaderCookie;
     DataOffset = dataOffset;
     TableOffset = tableOffset;
     HeaderVersion = Version1;
     BlockSize = blockSize;
     MaxTableEntries = (int)((diskSize + blockSize - 1) / blockSize);
     ParentTimestamp = Footer.EpochUtc;
     ParentUnicodeName = string.Empty;
     ParentLocators = new ParentLocator[8];
     for (int i = 0; i < 8; ++i)
     {
         ParentLocators[i] = new ParentLocator();
     }
 }
Пример #2
0
 public DynamicHeader(DynamicHeader toCopy)
 {
     Cookie = toCopy.Cookie;
     DataOffset = toCopy.DataOffset;
     TableOffset = toCopy.TableOffset;
     HeaderVersion = toCopy.HeaderVersion;
     MaxTableEntries = toCopy.MaxTableEntries;
     BlockSize = toCopy.BlockSize;
     Checksum = toCopy.Checksum;
     ParentUniqueId = toCopy.ParentUniqueId;
     ParentTimestamp = toCopy.ParentTimestamp;
     ParentUnicodeName = toCopy.ParentUnicodeName;
     ParentLocators = new ParentLocator[toCopy.ParentLocators.Length];
     for (int i = 0; i < ParentLocators.Length; ++i)
     {
         ParentLocators[i] = new ParentLocator(toCopy.ParentLocators[i]);
     }
 }