Пример #1
0
        public ResolvedClipboardTrigger CreateResolvedCustomClipboardTrigger(ClipboardTrigger trigger, ClipboardObject?linked = null, Guid?id = null)
        {
            if (!(trigger.Type is CustomClipboardTriggerType))
            {
                throw new ArgumentException($"It is not allowed to use {nameof(CreateResolvedCustomClipboardTrigger)} with a {nameof(ClipboardTrigger)} that has a {nameof(ClipboardTrigger.Type)} that is not a {nameof(CustomClipboardTriggerType)}", nameof(trigger));
            }
            if (id.HasValue && _allCollection.ContainsKey(id.Value))
            {
                throw new ArgumentException($"There is already an {nameof(ClipboardObject)} with this id", nameof(id));
            }


            return(CreateResolvedCustomClipboardTriggerInternal(trigger, id ?? NewWClipboardId(), linked));
        }
Пример #2
0
 public bool ContainsKey(TKey key)
 {
     return(_collection.ContainsKey(key));
 }