public static Direction GetLinkDirection(Serialization.Node node, string name) { if (node.nodeType == NodeType.Variable && (name == Runtime.Variable.ValueLinkName || name == string.Empty)) { return(Direction.InOut); } string fieldName = FieldName(name); VariableAttribute variable = GetVariableAttribute(node.RuntimeType, fieldName); if (variable != null) { return(variable.Direction); } // test for trigger TriggerAttribute trigger = GetTriggerAttribute(node.RuntimeType, fieldName); if (trigger != null) { return(Direction.Out); } // entry EntryAttribute entry = GetEntryAttribute(node.RuntimeType, fieldName); if (entry != null) { return(Direction.In); } return(Direction.InOut); }
public static string EditorName(string name, System.Type type) { TriggerAttribute attribute = GetTriggerAttribute(type, name); if (attribute != null && string.IsNullOrEmpty(attribute.EditorName) == false) { return(attribute.EditorName); } return(NiceName(name)); }