public CswNbtSearchFilter(string inFilterName, CswEnumNbtSearchFilterType inType, string inFilterId, string inFilterValue, Int32 inCount, string inIcon, bool inRemoveable, CswEnumNbtSearchPropOrderSourceType inSource) { FilterName = inFilterName; Type = inType; FilterId = inFilterId; FilterValue = inFilterValue; Count = inCount; Icon = inIcon; Removeable = inRemoveable; Source = inSource; }
} // ToJObject() public JObject FromJObject(JObject FilterObj) { FilterName = FilterObj["filtername"].ToString(); Type = (CswEnumNbtSearchFilterType)FilterObj["filtertype"].ToString(); FilterId = FilterObj["filterid"].ToString(); Count = CswConvert.ToInt32(FilterObj["count"]); Icon = FilterObj["icon"].ToString(); Removeable = CswConvert.ToBoolean(FilterObj["removeable"]); Source = (CswEnumNbtSearchPropOrderSourceType)FilterObj["source"].ToString(); FilterValue = FilterObj["filtervalue"].ToString(); FirstVersionId = CswConvert.ToInt32(FilterObj["firstversionid"]); FirstPropVersionId = CswConvert.ToInt32(FilterObj["firstpropversionid"]); ObjectClassId = CswConvert.ToInt32(FilterObj["objectclassid"]); PropertySetId = CswConvert.ToInt32(FilterObj["propertysetid"]); return(FilterObj); } // FromJObject()
private CswNbtSearchFilter makeFilter(CswNbtMetaDataNodeTypeProp NodeTypeProp, string Value, Int32 ResultCount, bool Removeable, CswEnumNbtSearchPropOrderSourceType Source) { CswNbtSearchFilter ret = new CswNbtSearchFilter(NodeTypeProp.PropName, CswEnumNbtSearchFilterType.propval, NodeTypeProp.PropId.ToString() + "_" + Value, Value, ResultCount, string.Empty, Removeable, Source); ret.FirstPropVersionId = NodeTypeProp.FirstPropVersionId; return(ret); }
private CswNbtSearchFilter makeFilter(CswNbtMetaDataPropertySet PropertySet, Int32 ResultCount, bool Removeable, CswEnumNbtSearchPropOrderSourceType Source) { CswNbtSearchFilter ret = new CswNbtSearchFilter("Filter To", CswEnumNbtSearchFilterType.propertyset, "PS_" + PropertySet.PropertySetId.ToString(), "All " + PropertySet.Name, ResultCount, PropertySet.IconFileName, Removeable, Source); ret.PropertySetId = PropertySet.PropertySetId; ret.UseMoreLink = false; return(ret); }
private CswNbtSearchFilter makeFilter(CswNbtMetaDataObjectClass ObjectClass, Int32 ResultCount, bool Removeable, CswEnumNbtSearchPropOrderSourceType Source) { CswNbtSearchFilter ret = new CswNbtSearchFilter("Filter To", CswEnumNbtSearchFilterType.objectclass, "OC_" + ObjectClass.ObjectClassId.ToString(), "All " + ObjectClass.ObjectClass.ToString(), ResultCount, ObjectClass.IconFileName, Removeable, Source); ret.ObjectClassId = ObjectClass.ObjectClassId; ret.UseMoreLink = false; return(ret); }
} // FilterOptions() private CswNbtSearchFilter makeFilter(CswNbtMetaDataNodeType NodeType, Int32 ResultCount, bool Removeable, CswEnumNbtSearchPropOrderSourceType Source) { CswNbtSearchFilter ret = new CswNbtSearchFilter("Filter To", CswEnumNbtSearchFilterType.nodetype, "NT_" + NodeType.NodeTypeId.ToString(), NodeType.NodeTypeName, ResultCount, NodeType.IconFileName, Removeable, Source); ret.FirstVersionId = NodeType.FirstVersionNodeTypeId; ret.UseMoreLink = false; return(ret); }