Пример #1
0
 public override bool Equals(object obj)
 {
     CategoryEditorSet.UniqueTypeToken uniqueTypeToken = obj as CategoryEditorSet.UniqueTypeToken;
     if (uniqueTypeToken != null && uniqueTypeToken.type.Equals(this.type))
     {
         return(object.Equals(uniqueTypeToken.token, this.token));
     }
     return(false);
 }
Пример #2
0
 public void AddCategoryEditor(CategoryEditor editor, object uniqueToken)
 {
     if (editor == null)
     {
         throw new ArgumentNullException("editor");
     }
     CategoryEditorSet.UniqueTypeToken key = new CategoryEditorSet.UniqueTypeToken(editor.GetType(), uniqueToken);
     if (this.editors.ContainsKey(key))
     {
         return;
     }
     this.editors[key] = editor;
 }