public void Add(MessageQuery key, TItem value) { if (key == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("key"); } Type queryType = key.GetType(); MessageQueryCollection collection; if (!this.collectionsByType.TryGetValue(queryType, out collection)) { collection = key.CreateMessageQueryCollection(); if (collection == null) { collection = new SequentialMessageQueryCollection(); } this.collectionsByType.Add(queryType, collection); } collection.Add(key); this.dictionary.Add(key, value); }
public TItem this [MessageQuery key] { get { return(default(TItem)); } set { } }
public TItem this[MessageQuery key] { get { return(this.dictionary[key]); } set { this.Add(key, value); } }
protected override void SetItem(int index, MessageQuery item) { if (!(item is XPathMessageQuery)) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("item"); } this.matcher.Remove((XPathMessageQuery) base[index]); XPathMessageQuery query = (XPathMessageQuery)item; base.SetItem(index, item); this.matcher.Add(query.Expression, query.Namespaces, query, false); }
protected override void InsertItem(int index, MessageQuery item) { if (item == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("item"); } if (!(item is XPathMessageQuery)) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("item"); } base.InsertItem(index, item); XPathMessageQuery query = (XPathMessageQuery)item; this.matcher.Add(query.Expression, query.Namespaces, query, false); }
public bool Remove(MessageQuery key) { if (!this.dictionary.Remove(key)) { return(false); } System.Type type = key.GetType(); MessageQueryCollection querys = this.collectionsByType[type]; querys.Remove(key); if (querys.Count == 0) { this.collectionsByType.Remove(type); } return(true); }
public void Add(MessageQuery key, TItem value) { MessageQueryCollection querys; if (key == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("key"); } System.Type type = key.GetType(); if (!this.collectionsByType.TryGetValue(type, out querys)) { querys = key.CreateMessageQueryCollection(); if (querys == null) { querys = new SequentialMessageQueryCollection <TItem>(); } this.collectionsByType.Add(type, querys); } querys.Add(key); this.dictionary.Add(key, value); }
public bool Remove(MessageQuery key) { if (this.dictionary.Remove(key)) { MessageQueryCollection collection; Type queryType = key.GetType(); collection = this.collectionsByType[queryType]; collection.Remove(key); if (collection.Count == 0) { this.collectionsByType.Remove(queryType); } return(true); } else { return(false); } }
public bool Remove(MessageQuery key) { return(default(bool)); }
protected override TResult Evaluate(MessageQuery query) { return(query.Evaluate <TResult>(this.Source)); }
protected abstract TResult Evaluate(MessageQuery query);
public bool TryGetValue(MessageQuery key, out TItem value) { return(this.dictionary.TryGetValue(key, out value)); }
public bool ContainsKey(MessageQuery key) { return(this.dictionary.ContainsKey(key)); }
protected override void SetItem(int index, MessageQuery item) { }
public bool ContainsKey(MessageQuery key) { return(default(bool)); }
public void Add(MessageQuery key, TItem value) { }
public bool TryGetValue(MessageQuery key, out TItem value) { value = default(TItem); return(default(bool)); }