public IMessage Add(MType name, out ushort value) { MType value2; value = name.TypeID; if (name.TypeID == 0) { ushort val = 0; for (int i = 1; i <= 99; i++) { val = (ushort)Runner.Network.Random.Next(0, 65535); if (this._ByID.TryGetValue(val, out value2) == false) { break; } } name.TypeID = val; value = val; } else { } if (this._ByName.TryGetValue(name.Name, out value2) == false) { lock (this._ByID) { lock (this._ByName) { _ByID.Add(name.TypeID, name); _ByName.Add(name.Name, name); } } } return(new Message()); }
public TypeList() { this._ByID = new Dictionary <ushort, MType>(); this._ByName = new Dictionary <string, MType>(); MType scratch; scratch = new MType(); scratch.Name = "Control.GetTypeID"; scratch.TypeID = 57005; scratch.Static = true; this.Add(scratch); scratch = new MType(); scratch.Name = "Control.TypeID"; scratch.TypeID = 48879; scratch.Static = true; this.Add(scratch); scratch = new MType(); scratch.Name = "Control.PreAuth"; scratch.TypeID = 6500; this.Add(scratch); scratch = new MType(); scratch.Name = "Control.Auth.Challenge"; scratch.TypeID = 6501; this.Add(scratch); scratch = new MType(); scratch.Name = "Control.Auth.Response"; scratch.TypeID = 6502; this.Add(scratch); scratch = new MType(); scratch.Name = "Control.Auth.OK"; scratch.TypeID = 6503; this.Add(scratch); scratch = new MType(); scratch.Name = "Control.Auth.Failed"; scratch.TypeID = 6504; this.Add(scratch); scratch = new MType(); scratch.Name = "Control.Ping"; scratch.TypeID = 1; scratch.Static = true; this.Add(scratch); scratch = new MType(); scratch.Name = "Control.Pong"; scratch.TypeID = 2; scratch.Static = true; this.Add(scratch); /* * scratch = new Type(); * scratch.Name = "Control.Auth.Types"; * scratch.TypeID = 6505; * this.Add(scratch); */ }
public TypeList() { this._ByID = new Dictionary<ushort, MType>(); this._ByName = new Dictionary<string, MType>(); MType scratch; scratch = new MType(); scratch.Name = "Control.GetTypeID"; scratch.TypeID = 57005; scratch.Static = true; this.Add(scratch); scratch = new MType(); scratch.Name = "Control.TypeID"; scratch.TypeID = 48879; scratch.Static = true; this.Add(scratch); scratch = new MType(); scratch.Name = "Control.PreAuth"; scratch.TypeID = 6500; this.Add(scratch); scratch = new MType(); scratch.Name = "Control.Auth.Challenge"; scratch.TypeID = 6501; this.Add(scratch); scratch = new MType(); scratch.Name = "Control.Auth.Response"; scratch.TypeID = 6502; this.Add(scratch); scratch = new MType(); scratch.Name = "Control.Auth.OK"; scratch.TypeID = 6503; this.Add(scratch); scratch = new MType(); scratch.Name = "Control.Auth.Failed"; scratch.TypeID = 6504; this.Add(scratch); scratch = new MType(); scratch.Name = "Control.Ping"; scratch.TypeID = 1; scratch.Static = true; this.Add(scratch); scratch = new MType(); scratch.Name = "Control.Pong"; scratch.TypeID = 2; scratch.Static = true; this.Add(scratch); /* scratch = new Type(); scratch.Name = "Control.Auth.Types"; scratch.TypeID = 6505; this.Add(scratch); */ }
public bool ContainsID(MType type) { MType type2; if (this._ByID.TryGetValue(type.TypeID, out type2) == true) { return(true); } else { return(false); } }
public bool Contains(MType type) { MType type2; if (this._ByName.TryGetValue(type.Name, out type2) == true) { return(true); } else { return(false); } }
public bool ContainsID(MType type) { MType type2; if (this._ByID.TryGetValue(type.TypeID, out type2) == true) { return true; } else { return false; } }
public bool Contains(MType type) { MType type2; if (this._ByName.TryGetValue(type.Name,out type2) == true) { return true; } else { return false; } }
public IMessage Remove(MType name) { return new Message(); }
public IMessage Add(MType name, out ushort value) { MType value2; value = name.TypeID; if (name.TypeID == 0) { ushort val = 0; for (int i = 1; i <= 99; i++) { val = (ushort) Runner.Network.Random.Next(0, 65535); if (this._ByID.TryGetValue(val, out value2) == false) { break; } } name.TypeID = val; value = val; } else { } if (this._ByName.TryGetValue(name.Name, out value2) == false) { lock (this._ByID) { lock (this._ByName) { _ByID.Add(name.TypeID, name); _ByName.Add(name.Name, name); } } } return new Message(); }
public IMessage Add(MType name) { ushort val; return this.Add(name, out val); }
public IMessage Remove(MType name) { return(new Message()); }
public IMessage Add(MType name) { ushort val; return(this.Add(name, out val)); }