public ErrorReport Deserialize(global::Omnix.Serialization.RocketPack.RocketPackReader r, int rank) { if (rank > 256) { throw new global::System.FormatException(); } uint propertyCount = r.GetUInt32(); global::Omnix.Serialization.RocketPack.Timestamp p_creationTime = global::Omnix.Serialization.RocketPack.Timestamp.Zero; ErrorReportType p_type = (ErrorReportType)0; for (; propertyCount > 0; propertyCount--) { uint id = r.GetUInt32(); switch (id) { case 0: { p_creationTime = r.GetTimestamp(); break; } case 1: { p_type = (ErrorReportType)r.GetUInt64(); break; } } } return(new ErrorReport(p_creationTime, p_type)); }
public ClusterMetadata(ulong[] sectors, uint length, global::Omnix.Serialization.RocketPack.Timestamp lastAccessTime) { if (sectors is null) { throw new global::System.ArgumentNullException("sectors"); } if (sectors.Length > 256) { throw new global::System.ArgumentOutOfRangeException("sectors"); } this.Sectors = new global::Omnix.DataStructures.ReadOnlyListSlim <ulong>(sectors); this.Length = length; this.LastAccessTime = lastAccessTime; { var __h = new global::System.HashCode(); foreach (var n in this.Sectors) { if (n != default) { __h.Add(n.GetHashCode()); } } if (this.Length != default) { __h.Add(this.Length.GetHashCode()); } if (this.LastAccessTime != default) { __h.Add(this.LastAccessTime.GetHashCode()); } __hashCode = __h.ToHashCode(); } }
public ClusterMetadata Deserialize(global::Omnix.Serialization.RocketPack.RocketPackReader r, int rank) { if (rank > 256) { throw new global::System.FormatException(); } uint propertyCount = r.GetUInt32(); ulong[] p_sectors = global::System.Array.Empty <ulong>(); uint p_length = 0; global::Omnix.Serialization.RocketPack.Timestamp p_lastAccessTime = global::Omnix.Serialization.RocketPack.Timestamp.Zero; for (; propertyCount > 0; propertyCount--) { uint id = r.GetUInt32(); switch (id) { case 0: { var length = r.GetUInt32(); p_sectors = new ulong[length]; for (int i = 0; i < p_sectors.Length; i++) { p_sectors[i] = r.GetUInt64(); } break; } case 1: { p_length = r.GetUInt32(); break; } case 2: { p_lastAccessTime = r.GetTimestamp(); break; } } } return(new ClusterMetadata(p_sectors, p_length, p_lastAccessTime)); }
public ErrorReport(global::Omnix.Serialization.RocketPack.Timestamp creationTime, ErrorReportType type) { this.CreationTime = creationTime; this.Type = type; { var __h = new global::System.HashCode(); if (this.CreationTime != default) { __h.Add(this.CreationTime.GetHashCode()); } if (this.Type != default) { __h.Add(this.Type.GetHashCode()); } __hashCode = __h.ToHashCode(); } }