/// <summary> /// Lock if group token is configured for auto add /// </summary> /// <param name="device"></param> /// <returns>True if device is controlled by this group token</returns> public bool LockAndGetDataFromDevice(IOwnedDevice device) { if (MemberTokens.ContainsKey(device)) { return(true); } if (!AutoAddDevices) { return(false); } // Add MemberTokens.Add(device, device.TakeControl(Priority, Name)); return(true); }
public void Add(IOwnedDevice device, IControlToken token) { MemberTokens.Add(device, token); }