public byte[] GetData() { using (MemoryStream memoryStream = new MemoryStream()) { using (ZipHelperStream zipHelperStream = new ZipHelperStream(memoryStream)) { zipHelperStream.IsStreamOwner = false; zipHelperStream.WriteByte((byte)_flags); if ((_flags & Flags.ModificationTime) != 0) { int value = (int)(_modificationTime.ToUniversalTime() - new DateTime(1970, 1, 1, 0, 0, 0).ToUniversalTime()).TotalSeconds; zipHelperStream.WriteLEInt(value); } if ((_flags & Flags.AccessTime) != 0) { int value2 = (int)(_lastAccessTime.ToUniversalTime() - new DateTime(1970, 1, 1, 0, 0, 0).ToUniversalTime()).TotalSeconds; zipHelperStream.WriteLEInt(value2); } if ((_flags & Flags.CreateTime) != 0) { int value3 = (int)(_createTime.ToUniversalTime() - new DateTime(1970, 1, 1, 0, 0, 0).ToUniversalTime()).TotalSeconds; zipHelperStream.WriteLEInt(value3); } return(memoryStream.ToArray()); } } }
/// <summary> /// Get the binary data representing this instance. /// </summary> /// <returns>The raw binary data representing this instance.</returns> public byte[] GetData() { using (var ms = new MemoryStream()) using (var helperStream = new ZipHelperStream(ms)) { helperStream.IsStreamOwner = false; helperStream.WriteByte((byte)_flags); // Flags if ((_flags & Flags.ModificationTime) != 0) { TimeSpan span = _modificationTime.ToUniversalTime() - new DateTime(1970, 1, 1, 0, 0, 0).ToUniversalTime(); int seconds = (int)span.TotalSeconds; helperStream.WriteLEInt(seconds); } if ((_flags & Flags.AccessTime) != 0) { TimeSpan span = _lastAccessTime.ToUniversalTime() - new DateTime(1970, 1, 1, 0, 0, 0).ToUniversalTime(); int seconds = (int)span.TotalSeconds; helperStream.WriteLEInt(seconds); } if ((_flags & Flags.CreateTime) != 0) { TimeSpan span = _createTime.ToUniversalTime() - new DateTime(1970, 1, 1, 0, 0, 0).ToUniversalTime(); int seconds = (int)span.TotalSeconds; helperStream.WriteLEInt(seconds); } return(ms.ToArray()); } }
public byte[] GetData() { byte[] result; using (MemoryStream memoryStream = new MemoryStream()) { using (ZipHelperStream zipHelperStream = new ZipHelperStream(memoryStream)) { zipHelperStream.IsStreamOwner = false; zipHelperStream.WriteByte((byte)this._flags); if ((byte)(this._flags & ExtendedUnixData.Flags.ModificationTime) != 0) { DateTime arg_51_0 = this._modificationTime.ToUniversalTime(); DateTime dateTime = new DateTime(1970, 1, 1, 0, 0, 0); int value = (int)(arg_51_0 - dateTime.ToUniversalTime()).TotalSeconds; zipHelperStream.WriteLEInt(value); } if ((byte)(this._flags & ExtendedUnixData.Flags.AccessTime) != 0) { DateTime arg_98_0 = this._lastAccessTime.ToUniversalTime(); DateTime dateTime2 = new DateTime(1970, 1, 1, 0, 0, 0); int value2 = (int)(arg_98_0 - dateTime2.ToUniversalTime()).TotalSeconds; zipHelperStream.WriteLEInt(value2); } if ((byte)(this._flags & ExtendedUnixData.Flags.CreateTime) != 0) { DateTime arg_E2_0 = this._createTime.ToUniversalTime(); DateTime dateTime3 = new DateTime(1970, 1, 1, 0, 0, 0); int value3 = (int)(arg_E2_0 - dateTime3.ToUniversalTime()).TotalSeconds; zipHelperStream.WriteLEInt(value3); } result = memoryStream.ToArray(); } } return(result); }
public byte[] GetData() { byte[] buffer; using (MemoryStream stream = new MemoryStream()) { using (ZipHelperStream stream2 = new ZipHelperStream(stream)) { stream2.IsStreamOwner = false; stream2.WriteByte((byte) this.flags_); if (((byte) (this.flags_ & Flags.ModificationTime)) != 0) { DateTime time = new DateTime(0x7b2, 1, 1, 0, 0, 0); TimeSpan span = (TimeSpan) (this.modificationTime_.ToUniversalTime() - time.ToUniversalTime()); int totalSeconds = (int) span.TotalSeconds; stream2.WriteLEInt(totalSeconds); } if (((byte) (this.flags_ & Flags.AccessTime)) != 0) { DateTime time2 = new DateTime(0x7b2, 1, 1, 0, 0, 0); TimeSpan span2 = (TimeSpan) (this.lastAccessTime_.ToUniversalTime() - time2.ToUniversalTime()); int num2 = (int) span2.TotalSeconds; stream2.WriteLEInt(num2); } if (((byte) (this.flags_ & Flags.CreateTime)) != 0) { DateTime time3 = new DateTime(0x7b2, 1, 1, 0, 0, 0); TimeSpan span3 = (TimeSpan) (this.createTime_.ToUniversalTime() - time3.ToUniversalTime()); int num3 = (int) span3.TotalSeconds; stream2.WriteLEInt(num3); } buffer = stream.ToArray(); } } return buffer; }
public byte[] GetData() { byte[] buffer; using (MemoryStream stream = new MemoryStream()) { using (ZipHelperStream stream2 = new ZipHelperStream(stream)) { stream2.IsStreamOwner = false; stream2.WriteByte((byte) this._flags); if (((byte) (this._flags & Flags.ModificationTime)) != 0) { DateTime time = new DateTime(0x7b2, 1, 1, 0, 0, 0); TimeSpan span = (TimeSpan) (this._modificationTime.ToUniversalTime() - time.ToUniversalTime()); int totalSeconds = (int) span.TotalSeconds; stream2.WriteLEInt(totalSeconds); } if (((byte) (this._flags & Flags.AccessTime)) != 0) { DateTime time2 = new DateTime(0x7b2, 1, 1, 0, 0, 0); TimeSpan span2 = (TimeSpan) (this._lastAccessTime.ToUniversalTime() - time2.ToUniversalTime()); int num2 = (int) span2.TotalSeconds; stream2.WriteLEInt(num2); } if (((byte) (this._flags & Flags.CreateTime)) != 0) { DateTime time3 = new DateTime(0x7b2, 1, 1, 0, 0, 0); TimeSpan span3 = (TimeSpan) (this._createTime.ToUniversalTime() - time3.ToUniversalTime()); int num3 = (int) span3.TotalSeconds; stream2.WriteLEInt(num3); } buffer = stream.ToArray(); } } return buffer; }
public byte[] GetData() { using (MemoryStream ms = new MemoryStream()) using (ZipHelperStream helperStream = new ZipHelperStream(ms)) { helperStream.IsStreamOwner = false; helperStream.WriteByte((byte)flags_); if ((flags_ & Flags.ModificationTime) != 0) { TimeSpan span = modificationTime_.ToUniversalTime() - new System.DateTime(1970, 1, 1, 0, 0, 0).ToUniversalTime(); int seconds = (int)span.TotalSeconds; helperStream.WriteLEInt(seconds); } if ((flags_ & Flags.AccessTime) != 0) { TimeSpan span = lastAccessTime_.ToUniversalTime() - new System.DateTime(1970, 1, 1, 0, 0, 0).ToUniversalTime(); int seconds = (int)span.TotalSeconds; helperStream.WriteLEInt(seconds); } if ((flags_ & Flags.CreateTime) != 0) { TimeSpan span = createTime_.ToUniversalTime() - new System.DateTime(1970, 1, 1, 0, 0, 0).ToUniversalTime(); int seconds = (int)span.TotalSeconds; helperStream.WriteLEInt(seconds); } return(ms.ToArray()); } }
public byte[] GetData() { byte[] result; using (MemoryStream memoryStream = new MemoryStream()) { using (ZipHelperStream zipHelperStream = new ZipHelperStream(memoryStream)) { zipHelperStream.IsStreamOwner = false; zipHelperStream.WriteByte((byte)this._flags); if ((byte)(this._flags & ExtendedUnixData.Flags.ModificationTime) != 0) { int value = (int)(this._modificationTime - new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc)).TotalSeconds; zipHelperStream.WriteLEInt(value); } if ((byte)(this._flags & ExtendedUnixData.Flags.AccessTime) != 0) { int value2 = (int)(this._lastAccessTime - new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc)).TotalSeconds; zipHelperStream.WriteLEInt(value2); } if ((byte)(this._flags & ExtendedUnixData.Flags.CreateTime) != 0) { int value3 = (int)(this._createTime - new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc)).TotalSeconds; zipHelperStream.WriteLEInt(value3); } result = memoryStream.ToArray(); } } return(result); }
public byte[] GetData() { byte[] buffer; using (MemoryStream stream = new MemoryStream()) { using (ZipHelperStream stream2 = new ZipHelperStream(stream)) { stream2.IsStreamOwner = false; stream2.WriteByte((byte)this._flags); if (((int)(this._flags & Flags.ModificationTime)) != 0) { stream2.WriteLEInt((int)(this._modificationTime.ToUniversalTime() - new DateTime(0x7b2, 1, 1, 0, 0, 0).ToUniversalTime()).TotalSeconds); } if (((int)(this._flags & Flags.AccessTime)) != 0) { stream2.WriteLEInt((int)(this._lastAccessTime.ToUniversalTime() - new DateTime(0x7b2, 1, 1, 0, 0, 0).ToUniversalTime()).TotalSeconds); } if (((int)(this._flags & Flags.CreateTime)) != 0) { stream2.WriteLEInt((int)(this._createTime.ToUniversalTime() - new DateTime(0x7b2, 1, 1, 0, 0, 0).ToUniversalTime()).TotalSeconds); } buffer = stream.ToArray(); } } return(buffer); }
public byte[] GetData() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) MemoryStream val = new MemoryStream(); try { ZipHelperStream zipHelperStream = new ZipHelperStream((Stream)(object)val); try { zipHelperStream.IsStreamOwner = false; ((Stream)zipHelperStream).WriteByte((byte)_flags); if ((_flags & Flags.ModificationTime) != 0) { TimeSpan val2 = _modificationTime.ToUniversalTime() - new global::System.DateTime(1970, 1, 1, 0, 0, 0).ToUniversalTime(); int value = (int)((TimeSpan)(ref val2)).get_TotalSeconds(); zipHelperStream.WriteLEInt(value); } if ((_flags & Flags.AccessTime) != 0) { TimeSpan val3 = _lastAccessTime.ToUniversalTime() - new global::System.DateTime(1970, 1, 1, 0, 0, 0).ToUniversalTime(); int value2 = (int)((TimeSpan)(ref val3)).get_TotalSeconds(); zipHelperStream.WriteLEInt(value2); } if ((_flags & Flags.CreateTime) != 0) { TimeSpan val4 = _createTime.ToUniversalTime() - new global::System.DateTime(1970, 1, 1, 0, 0, 0).ToUniversalTime(); int value3 = (int)((TimeSpan)(ref val4)).get_TotalSeconds(); zipHelperStream.WriteLEInt(value3); } return(val.ToArray()); } finally { ((global::System.IDisposable)zipHelperStream)?.Dispose(); } } finally { ((global::System.IDisposable)val)?.Dispose(); } }
public byte[] GetData() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown MemoryStream val = new MemoryStream(); try { ZipHelperStream zipHelperStream = new ZipHelperStream((Stream)(object)val); try { zipHelperStream.IsStreamOwner = false; zipHelperStream.WriteLEInt(0); zipHelperStream.WriteLEShort(1); zipHelperStream.WriteLEShort(24); zipHelperStream.WriteLELong(_lastModificationTime.ToFileTime()); zipHelperStream.WriteLELong(_lastAccessTime.ToFileTime()); zipHelperStream.WriteLELong(_createTime.ToFileTime()); return(val.ToArray()); } finally { ((global::System.IDisposable)zipHelperStream)?.Dispose(); } } finally { ((global::System.IDisposable)val)?.Dispose(); } }
/// <summary> /// Get the binary data representing this instance. /// </summary> /// <returns>The raw binary data representing this instance.</returns> public byte[] GetData() { using (MemoryStream ms = new MemoryStream()) using (ZipHelperStream helperStream = new ZipHelperStream(ms)) { helperStream.IsStreamOwner = false; helperStream.WriteLEInt(0); // Reserved helperStream.WriteLEShort(1); // Tag helperStream.WriteLEShort(24); // Length = 3 x 8. helperStream.WriteLELong(_lastModificationTime.ToFileTimeUtc()); helperStream.WriteLELong(_lastAccessTime.ToFileTimeUtc()); helperStream.WriteLELong(_createTime.ToFileTimeUtc()); return(ms.ToArray()); } }
public byte[] GetData() { using (MemoryStream ms = new MemoryStream()) using (ZipHelperStream helperStream = new ZipHelperStream(ms)) { helperStream.IsStreamOwner = false; helperStream.WriteLEInt(0); helperStream.WriteLEShort(1); helperStream.WriteLEShort(24); helperStream.WriteLELong(lastModificationTime_.ToFileTime()); helperStream.WriteLELong(lastAccessTime_.ToFileTime()); helperStream.WriteLELong(createTime_.ToFileTime()); return(ms.ToArray()); } }
public byte[] GetData() { using (MemoryStream memoryStream = new MemoryStream()) { using (ZipHelperStream zipHelperStream = new ZipHelperStream(memoryStream)) { zipHelperStream.IsStreamOwner = false; zipHelperStream.WriteLEInt(0); zipHelperStream.WriteLEShort(1); zipHelperStream.WriteLEShort(24); zipHelperStream.WriteLELong(_lastModificationTime.ToFileTime()); zipHelperStream.WriteLELong(_lastAccessTime.ToFileTime()); zipHelperStream.WriteLELong(_createTime.ToFileTime()); return(memoryStream.ToArray()); } } }
public byte[] GetData() { byte[] buffer; using (MemoryStream stream = new MemoryStream()) { using (ZipHelperStream stream2 = new ZipHelperStream(stream)) { stream2.IsStreamOwner = false; stream2.WriteLEInt(0); stream2.WriteLEShort(1); stream2.WriteLEShort(0x18); stream2.WriteLELong(this._lastModificationTime.ToFileTime()); stream2.WriteLELong(this._lastAccessTime.ToFileTime()); stream2.WriteLELong(this._createTime.ToFileTime()); buffer = stream.ToArray(); } } return buffer; }
public byte[] GetData() { byte[] buffer; using (MemoryStream stream = new MemoryStream()) { using (ZipHelperStream stream2 = new ZipHelperStream(stream)) { stream2.IsStreamOwner = false; stream2.WriteLEInt(0); stream2.WriteLEShort(1); stream2.WriteLEShort(0x18); stream2.WriteLELong(this.lastModificationTime_.ToFileTime()); stream2.WriteLELong(this.lastAccessTime_.ToFileTime()); stream2.WriteLELong(this.createTime_.ToFileTime()); buffer = stream.ToArray(); } } return(buffer); }
/// <summary> /// Get the binary data representing this instance. /// </summary> /// <returns>The raw binary data representing this instance.</returns> public byte[] GetData() { using (MemoryStream ms = new MemoryStream()) using (ZipHelperStream helperStream = new ZipHelperStream(ms)) { helperStream.IsStreamOwner = false; helperStream.WriteLEInt(0); // Reserved helperStream.WriteLEShort(1); // Tag helperStream.WriteLEShort(24); // Length = 3 x 8. helperStream.WriteLELong(lastModificationTime_.ToFileTime()); helperStream.WriteLELong(lastAccessTime_.ToFileTime()); helperStream.WriteLELong(createTime_.ToFileTime()); return ms.ToArray(); } }
/// <summary> /// Get the binary data representing this instance. /// </summary> /// <returns>The raw binary data representing this instance.</returns> public byte[] GetData() { using (MemoryStream ms = new MemoryStream()) using (ZipHelperStream helperStream = new ZipHelperStream(ms)) { helperStream.IsStreamOwner = false; helperStream.WriteByte((byte)flags_); // Flags if ( (flags_ & Flags.ModificationTime) != 0) { TimeSpan span = modificationTime_.ToUniversalTime() - new System.DateTime(1970, 1, 1, 0, 0, 0).ToUniversalTime(); int seconds = (int)span.TotalSeconds; helperStream.WriteLEInt(seconds); } if ( (flags_ & Flags.AccessTime) != 0) { TimeSpan span = lastAccessTime_.ToUniversalTime() - new System.DateTime(1970, 1, 1, 0, 0, 0).ToUniversalTime(); int seconds = (int)span.TotalSeconds; helperStream.WriteLEInt(seconds); } if ( (flags_ & Flags.CreateTime) != 0) { TimeSpan span = createTime_.ToUniversalTime() - new System.DateTime(1970, 1, 1, 0, 0, 0).ToUniversalTime(); int seconds = (int)span.TotalSeconds; helperStream.WriteLEInt(seconds); } return ms.ToArray(); } }
public byte[] GetData() { byte[] result; using (MemoryStream memoryStream = new MemoryStream()) { using (ZipHelperStream zipHelperStream = new ZipHelperStream(memoryStream)) { zipHelperStream.IsStreamOwner = false; zipHelperStream.WriteLEInt(0); zipHelperStream.WriteLEShort(1); zipHelperStream.WriteLEShort(24); zipHelperStream.WriteLELong(this._lastModificationTime.ToFileTime()); zipHelperStream.WriteLELong(this._lastAccessTime.ToFileTime()); zipHelperStream.WriteLELong(this._createTime.ToFileTime()); result = memoryStream.ToArray(); } } return result; }
/// <summary> /// Get the binary data representing this instance. /// </summary> /// <returns>The raw binary data representing this instance.</returns> public byte[] GetData() { using (var ms=new MemoryStream()) using (var helperStream=new ZipHelperStream(ms)) { helperStream.IsStreamOwner=false; helperStream.WriteByte((byte)_flags); // Flags if ((_flags&Flags.ModificationTime)!=0) { TimeSpan span=_modificationTime.ToUniversalTime()- new DateTime(1970, 1, 1, 0, 0, 0).ToUniversalTime(); var seconds=(int)span.TotalSeconds; helperStream.WriteLEInt(seconds); } if ((_flags&Flags.AccessTime)!=0) { TimeSpan span=_lastAccessTime.ToUniversalTime()- new DateTime(1970, 1, 1, 0, 0, 0).ToUniversalTime(); var seconds=(int)span.TotalSeconds; helperStream.WriteLEInt(seconds); } if ((_flags&Flags.CreateTime)!=0) { TimeSpan span=_createTime.ToUniversalTime()-new DateTime(1970, 1, 1, 0, 0, 0).ToUniversalTime(); var seconds=(int)span.TotalSeconds; helperStream.WriteLEInt(seconds); } return ms.ToArray(); } }