Esempio n. 1
0
		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;
		}
Esempio n. 2
0
        public Dictionary <int, SerialObject> GetDictionary(ESerialType eSerialType)
        {
            if (mUnits.ContainsKey(eSerialType) == false)
            {
                mUnits.Add(eSerialType, new Dictionary <int, SerialObject>());
            }

            return(mUnits[eSerialType]);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
 public Dictionary <int, SerialObject> this[ESerialType Type] {
     get { return(GetDictionary(Type)); }
 }
Esempio n. 5
0
        public int Count(ESerialType Type)
        {
            Dictionary <int, SerialObject> dic = GetDictionary(Type);

            return(dic.Count);
        }
Esempio n. 6
0
 public SerialObject this[ESerialType Type, int Serial] {
     get { return(mUnits[Type][Serial]); }
 }
Esempio n. 7
0
 /// <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)
 {
 }
Esempio n. 8
0
 /// <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)
 {
 }
Esempio n. 9
0
 /// <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;
 }
Esempio n. 10
0
		public Dictionary<int, SerialObject> GetDictionary( ESerialType eSerialType ) {
			if( mUnits.ContainsKey( eSerialType ) == false )
				mUnits.Add( eSerialType, new Dictionary<int, SerialObject>() );

			return mUnits[ eSerialType ];
		}
Esempio n. 11
0
		public int Count( ESerialType Type ) {
			Dictionary<int, SerialObject> dic = GetDictionary( Type );
			return dic.Count;
		}
Esempio n. 12
0
		public Dictionary<int, SerialObject> this[ ESerialType Type ] {
			get { return GetDictionary( Type ); }
		}
Esempio n. 13
0
		public SerialObject this[ ESerialType Type, int Serial ] {
			get { return mUnits[ Type ][ Serial ]; }
		}