public SerialObject Get( ESerialType Type, int Key ) { SerialObject u; Dictionary<int, SerialObject> dic = GetDictionary( Type ); if( dic.TryGetValue( Key, out u ) == true ) return u; return null; }
public Dictionary <int, SerialObject> GetDictionary(ESerialType eSerialType) { if (mUnits.ContainsKey(eSerialType) == false) { mUnits.Add(eSerialType, new Dictionary <int, SerialObject>()); } return(mUnits[eSerialType]); }
public SerialObject Get(ESerialType Type, int Key) { SerialObject u; Dictionary <int, SerialObject> dic = GetDictionary(Type); if (dic.TryGetValue(Key, out u) == true) { return(u); } return(null); }
public Dictionary <int, SerialObject> this[ESerialType Type] { get { return(GetDictionary(Type)); } }
public int Count(ESerialType Type) { Dictionary <int, SerialObject> dic = GetDictionary(Type); return(dic.Count); }
public SerialObject this[ESerialType Type, int Serial] { get { return(mUnits[Type][Serial]); } }
/// <summary> /// Main Constructor /// <para>NOTE: use <see cref="Serial.NewItem"/> and <see cref="Serial.NewUnit"/>!</para> /// </summary> /// <param name="serial"></param> /// <param name="type"></param> public Serial(long serial, ESerialType type) : this((int)serial, type) { }
/// <summary> /// Main Constructor /// <para>NOTE: use <see cref="Serial.NewItem"/> and <see cref="Serial.NewUnit"/>!</para> /// </summary> /// <param name="serial"></param> /// <param name="type"></param> public Serial(uint serial, ESerialType type) : this((int)serial, type) { }
/// <summary> /// Main Constructor /// <para>NOTE: use <see cref="Serial.NewItem"/> and <see cref="Serial.NewUnit"/>!</para> /// </summary> /// <param name="serial"></param> /// <param name="type"></param> public Serial(int serial, ESerialType type) { mSerial = serial; mUnitType = type; }
public Dictionary<int, SerialObject> GetDictionary( ESerialType eSerialType ) { if( mUnits.ContainsKey( eSerialType ) == false ) mUnits.Add( eSerialType, new Dictionary<int, SerialObject>() ); return mUnits[ eSerialType ]; }
public int Count( ESerialType Type ) { Dictionary<int, SerialObject> dic = GetDictionary( Type ); return dic.Count; }
public Dictionary<int, SerialObject> this[ ESerialType Type ] { get { return GetDictionary( Type ); } }
public SerialObject this[ ESerialType Type, int Serial ] { get { return mUnits[ Type ][ Serial ]; } }