public TcpProxyOptions Deserialize(global::Omnix.Serialization.RocketPack.RocketPackReader r, int rank) { if (rank > 256) { throw new global::System.FormatException(); } uint propertyCount = r.GetUInt32(); TcpProxyType p_type = (TcpProxyType)0; OmniAddress p_address = OmniAddress.Empty; for (; propertyCount > 0; propertyCount--) { uint id = r.GetUInt32(); switch (id) { case 0: { p_type = (TcpProxyType)r.GetUInt64(); break; } case 1: { p_address = OmniAddress.Formatter.Deserialize(r, rank + 1); break; } } } return(new TcpProxyOptions(p_type, p_address)); }
public TcpProxyOptions(TcpProxyType type, OmniAddress address) { if (address is null) { throw new global::System.ArgumentNullException("address"); } this.Type = type; this.Address = address; { var __h = new global::System.HashCode(); if (this.Type != default) { __h.Add(this.Type.GetHashCode()); } if (this.Address != default) { __h.Add(this.Address.GetHashCode()); } __hashCode = __h.ToHashCode(); } }