public static HomeKitCondition CreateCharacteristic (HMCharacteristic characteristic, INSCopying value)
		{
			return new HomeKitCondition {
				CharacteristicData = new Tuple<HMCharacteristic, INSCopying> (characteristic, value),
				Type = HomeKitConditionType.Characteristic
			};
		}
Beispiel #2
0
        // Saves a characteristic and value into the pending map of characteristic events.
        void UpdateEventValue(INSCopying value, HMCharacteristic characteristic)
        {
            for (int index = 0; index < removalCharacteristicEvents.Count; index++)
            {
                var e = removalCharacteristicEvents [index];

                // We have this event pending for deletion, but we are going to want to update it.
                // remove it from the removal array.
                if (e.Characteristic == characteristic)
                {
                    removalCharacteristicEvents.RemoveAt(index);
                    break;
                }
            }
            targetValueMap [characteristic] = value;
        }
Beispiel #3
0
 public static HomeKitCondition CreateCharacteristic(HMCharacteristic characteristic, INSCopying value)
 {
     return(new HomeKitCondition {
         CharacteristicData = new Tuple <HMCharacteristic, INSCopying> (characteristic, value),
         Type = HomeKitConditionType.Characteristic
     });
 }
		// Saves a characteristic and value into the pending map of characteristic events.
		void UpdateEventValue (INSCopying value, HMCharacteristic characteristic)
		{
			for (int index = 0; index < removalCharacteristicEvents.Count; index++) {
				var e = removalCharacteristicEvents [index];

				// We have this event pending for deletion, but we are going to want to update it.
				// remove it from the removal array.
				if (e.Characteristic == characteristic) {
					removalCharacteristicEvents.RemoveAt (index);
					break;
				}
			}
			targetValueMap [characteristic] = value;
		}