public override bool Equals(object obj) { SelectablePropertyModel <T> selectablePropertyModel = obj as SelectablePropertyModel <T>; if (selectablePropertyModel != null && this.isSelected == selectablePropertyModel.isSelected) { return(this.propertyModel.Equals((object)selectablePropertyModel.propertyModel)); } return(false); }
public int CompareTo(object obj) { if (obj == null) { return(1); } SelectablePropertyModel <T> selectablePropertyModel = obj as SelectablePropertyModel <T>; if (selectablePropertyModel != null) { BaseResourceModel baseResourceModel1 = (object)this.propertyModel as BaseResourceModel; BaseResourceModel baseResourceModel2 = (object)selectablePropertyModel.propertyModel as BaseResourceModel; if (baseResourceModel1 != null && baseResourceModel2 != null) { return(baseResourceModel1.CompareTo((object)baseResourceModel2)); } } throw new ArgumentException(ExceptionStringTable.CompareToMustBeCalledWithASelectablePropertyModelTOrNull, "obj"); }
public VirtualizingResourceItem(SelectablePropertyModel <T> resourceModel) { this.resourceModel = resourceModel; }
public VirtualizingResourceItem <T> FindItemInCategory <T>(string categoryKey, SelectablePropertyModel <T> resource) where T : BaseResourceModel { ResourceTypeItem resourceTypeItem; if (this.categories.TryGetValue(categoryKey, out resourceTypeItem)) { foreach (VirtualizingResourceItem <T> virtualizingResourceItem in (Collection <ResourceVirtualizingTreeItem>)resourceTypeItem.Children) { if (virtualizingResourceItem.Model.Equals((object)resource)) { return(virtualizingResourceItem); } } } return((VirtualizingResourceItem <T>)null); }