コード例 #1
0
        public int Add(_Device value)
        {
            int index = base.Add(value);

            // ASM code needs to go here!
            FireASMc("Devices", "Add", index);

            return(index);
        }
コード例 #2
0
        // Searches the Devices in the collection for a Device with the specified ID.
        // Returns the Device if it finds it, otherwise 'null'.
        public _Device Find_ID(long id)
        {
            for (int i = 0; i < List.Count; i++)
            {
                _Device Device = (_Device)List[i];
                if (Device.ID == id)
                {
                    return(Device);
                }
            }

            return(null); // If reaches here then a Device with the specified ID was not found
        }
コード例 #3
0
        // Searches the Devices in the collection for a Device with the specified ID.
        // Returns 'true' if found, 'false' otherwise.
        public bool ContainsID(long id)
        {
            for (int i = 0; i < List.Count; i++)
            {
                _Device Device = (_Device)List[i];
                if (Device.ID == id)
                {
                    return(true);
                }
            }

            return(false); // If reaches here then a Device with the specified ID was not found
        }
コード例 #4
0
        // Searches the Devices in the collection for a Device with the specified GUID.
        // Returns the Device if it finds it, otherwise 'null'.
        public _Device Find_Guid(string guid)
        {
            if (guid == null)
            {
                return(null);
            }

            for (int i = 0; i < List.Count; i++)
            {
                _Device Device = (_Device)List[i];
                if (Device.Guid == guid)
                {
                    return(Device);
                }
            }

            return(null); // If reaches here then a Device with the specified GUID was not found
        }
コード例 #5
0
 // Returns the index position that the 'value' occupies in the collection.
 public int IndexOf(_Device value)
 {
     return(base.IndexOf(value));
 }
コード例 #6
0
 public bool Contains(_Device value)
 {
     return(base.Contains(value));
 }
コード例 #7
0
 public void Remove(_Device value)
 {
     base.Remove(value);
     // ASM code needs to go here!
 }
コード例 #8
0
 public void Insert(int index, _Device value)
 {
     base.Insert(index, value);
     // ASM code needs to go here!
 }