protected static StaticProperty <TObj, TVal> RegisterProperty <TObj, TVal>(Expression <Func <TObj, TVal> > property, TVal defaultValue) where TObj : GraphObject { var graphProperty = new StaticProperty <TObj, TVal>(property, defaultValue); propertyRegister.RegisterProperty <TObj>(graphProperty); return(graphProperty); }
public TVal GetValue <TObj, TVal>(StaticProperty <TObj, TVal> property, Node node, int minDepth = 1) where TObj : GraphObject { var result = Get(property, node, minDepth); if (null != result) { return((TVal)result); } else { return(property.Default); } }
public void SetValue <TObj, TVal>(StaticProperty <TObj, TVal> property, TVal value) where TObj : GraphObject { Set(property, graph.CurrentNode, value); }
public TVal GetValue <TObj, TVal>(StaticProperty <TObj, TVal> property, int minDepth = 1) where TObj : GraphObject { return(GetValue(property, graph.CurrentNode, minDepth)); }
public void SetValue <TObj, TVal>(StaticProperty <TObj, TVal> property, Node node, TVal value) where TObj : GraphObject { Set(property, node, value); }