public SessionErrorMessage Deserialize(Omnix.Serialization.RocketPack.RocketPackReader r, int rank) { if (rank > 256) { throw new System.FormatException(); } // Read property count uint propertyCount = r.GetUInt32(); ulong p_sessionId = 0; SessionErrorType p_errorType = (SessionErrorType)0; for (; propertyCount > 0; propertyCount--) { uint id = r.GetUInt32(); switch (id) { case 0: // SessionId { p_sessionId = r.GetUInt64(); break; } case 1: // ErrorType { p_errorType = (SessionErrorType)r.GetUInt64(); break; } } } return(new SessionErrorMessage(p_sessionId, p_errorType)); }
public SessionErrorMessage(ulong sessionId, SessionErrorType errorType) { this.SessionId = sessionId; this.ErrorType = errorType; { var __h = new System.HashCode(); if (this.SessionId != default) { __h.Add(this.SessionId.GetHashCode()); } if (this.ErrorType != default) { __h.Add(this.ErrorType.GetHashCode()); } __hashCode = __h.ToHashCode(); } }