protected virtual void InitializeTypeDescriptor (ScriptTypeDescriptor typeDescriptor) { foreach (ScriptEvent ev in ((IEnumerable<ScriptEvent>)ScriptEvents)) typeDescriptor.AddEvent (new ScriptEventDescriptor (ev.Name, ev.SupportsActions)); typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("bindings", ScriptType.Array, true, "Bindings")); typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("dataContext", ScriptType.Object)); typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("id", ScriptType.String, "ID")); }
protected virtual void InitializeTypeDescriptor(ScriptTypeDescriptor typeDescriptor) { foreach (ScriptEvent ev in ((IEnumerable <ScriptEvent>)ScriptEvents)) { typeDescriptor.AddEvent(new ScriptEventDescriptor(ev.Name, ev.SupportsActions)); } typeDescriptor.AddProperty(new ScriptPropertyDescriptor("bindings", ScriptType.Array, true, "Bindings")); typeDescriptor.AddProperty(new ScriptPropertyDescriptor("dataContext", ScriptType.Object)); typeDescriptor.AddProperty(new ScriptPropertyDescriptor("id", ScriptType.String, "ID")); }
ScriptTypeDescriptor IScriptObject.GetTypeDescriptor() { ScriptTypeDescriptor d = new ScriptTypeDescriptor(this); d.AddEvent(new ScriptEventDescriptor("transform", false)); d.AddMethod(new ScriptMethodDescriptor("evaluateIn", new string[0])); d.AddMethod(new ScriptMethodDescriptor("evaluateOut", new string[0])); d.AddProperty(new ScriptPropertyDescriptor("automatic", ScriptType.Boolean, false, "Automatic")); d.AddProperty(new ScriptPropertyDescriptor("dataContext", ScriptType.Object, false, "DataContext")); d.AddProperty(new ScriptPropertyDescriptor("dataPath", ScriptType.String, false, "DataPath")); d.AddProperty(new ScriptPropertyDescriptor("direction", ScriptType.Enum, false, "Direction")); d.AddProperty(new ScriptPropertyDescriptor("id", ScriptType.String, false, "ID")); d.AddProperty(new ScriptPropertyDescriptor("property", ScriptType.String, false, "Property")); d.AddProperty(new ScriptPropertyDescriptor("propertyKey", ScriptType.String, false, "PropertyKey")); d.AddProperty(new ScriptPropertyDescriptor("transformerArgument", ScriptType.String, false, "TransformerArgument")); d.Close(); return(d); }
ScriptTypeDescriptor IScriptObject.GetTypeDescriptor () { ScriptTypeDescriptor d = new ScriptTypeDescriptor (this); d.AddEvent (new ScriptEventDescriptor ("transform", false)); d.AddMethod (new ScriptMethodDescriptor ("evaluateIn", new string[0])); d.AddMethod (new ScriptMethodDescriptor ("evaluateOut", new string[0])); d.AddProperty (new ScriptPropertyDescriptor ("automatic", ScriptType.Boolean, false, "Automatic")); d.AddProperty (new ScriptPropertyDescriptor ("dataContext", ScriptType.Object, false, "DataContext")); d.AddProperty (new ScriptPropertyDescriptor ("dataPath", ScriptType.String, false, "DataPath")); d.AddProperty (new ScriptPropertyDescriptor ("direction", ScriptType.Enum, false, "Direction")); d.AddProperty (new ScriptPropertyDescriptor ("id", ScriptType.String, false, "ID")); d.AddProperty (new ScriptPropertyDescriptor ("property", ScriptType.String, false, "Property")); d.AddProperty (new ScriptPropertyDescriptor ("propertyKey", ScriptType.String, false, "PropertyKey")); d.AddProperty (new ScriptPropertyDescriptor ("transformerArgument", ScriptType.String, false, "TransformerArgument")); d.Close (); return d; }
public void AddAfterClose () { ActionPoker a = new ActionPoker(); ScriptTypeDescriptor td = new ScriptTypeDescriptor (a); td.Close (); td.AddEvent (new ScriptEventDescriptor ("testEvent", true)); }