Example #1
0
		protected override void InitializeTypeDescriptor (ScriptTypeDescriptor typeDescriptor)
		{
			base.InitializeTypeDescriptor (typeDescriptor);

			typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("validators", ScriptType.Array, true, "Validators"));
			typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("text", ScriptType.String, false, "Text"));
		}
Example #2
0
		ScriptTypeDescriptor IScriptObject.GetTypeDescriptor ()
		{
			ScriptTypeDescriptor td = new ScriptTypeDescriptor(this);
			InitializeTypeDescriptor (td);
			td.Close();
			return td;
		}
Example #3
0
		protected override void InitializeTypeDescriptor (ScriptTypeDescriptor typeDescriptor)
		{
			base.InitializeTypeDescriptor (typeDescriptor);

			typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("property", ScriptType.String, false, "Property"));
			typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("value", ScriptType.String, false, "Value"));
		}
Example #4
0
		public ScriptTypeDescriptor GetTypeDescriptor ()
		{
			ScriptTypeDescriptor td = new ScriptTypeDescriptor(this);
			InitializeTypeDescriptor (td);
			td.Close();
			return td;
		}
Example #5
0
        ScriptTypeDescriptor IScriptObject.GetTypeDescriptor()
        {
            ScriptTypeDescriptor td = new ScriptTypeDescriptor(this);

            InitializeTypeDescriptor(td);
            td.Close();
            return(td);
        }
Example #6
0
        protected override void InitializeTypeDescriptor(ScriptTypeDescriptor typeDescriptor)
        {
            base.InitializeTypeDescriptor(typeDescriptor);

            typeDescriptor.AddProperty(new ScriptPropertyDescriptor("property", ScriptType.String, false, "Property"));
            typeDescriptor.AddProperty(new ScriptPropertyDescriptor("propertykey", ScriptType.String, false, "PropertyKey"));
            typeDescriptor.AddProperty(new ScriptPropertyDescriptor("value", ScriptType.String, false, "Value"));
        }
Example #7
0
        public ScriptTypeDescriptor GetTypeDescriptor()
        {
            ScriptTypeDescriptor td = new ScriptTypeDescriptor(this);

            InitializeTypeDescriptor(td);
            td.Close();
            return(td);
        }
Example #8
0
		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"));
		}
Example #9
0
        protected override void InitializeTypeDescriptor(ScriptTypeDescriptor typeDescriptor)
        {
            base.InitializeTypeDescriptor(typeDescriptor);

            typeDescriptor.AddProperty(new ScriptPropertyDescriptor("eventArgs", ScriptType.Object));
            typeDescriptor.AddProperty(new ScriptPropertyDescriptor("result", ScriptType.Object));
            typeDescriptor.AddProperty(new ScriptPropertyDescriptor("sender", ScriptType.Object));
            typeDescriptor.AddProperty(new ScriptPropertyDescriptor("sequence", ScriptType.Enum, "Sequence"));
            typeDescriptor.AddProperty(new ScriptPropertyDescriptor("target", ScriptType.Object, "Target"));
        }
Example #10
0
		protected override void InitializeTypeDescriptor (ScriptTypeDescriptor typeDescriptor)
		{
			base.InitializeTypeDescriptor (typeDescriptor);

			typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("eventArgs", ScriptType.Object));
			typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("result", ScriptType.Object));
			typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("sender", ScriptType.Object));
			typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("sequence", ScriptType.Enum, "Sequence"));
			typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("target", ScriptType.Object, "Target"));
		}
Example #11
0
 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"));
 }
Example #12
0
		protected override void InitializeTypeDescriptor (ScriptTypeDescriptor typeDescriptor)
		{
			base.InitializeTypeDescriptor (typeDescriptor);

			typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("alternatingItemCssClass", ScriptType.String, false, "AlternatingItemCssClass"));
			typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("data", ScriptType.Object, false, ""));
			typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("length", ScriptType.Number, true, ""));
			typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("layoutTemplate", ScriptType.Object, false, ""));
			typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("itemCssClass", ScriptType.String, false, "ItemCssClass"));
			typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("itemTemplateParentElementId", ScriptType.String, false, ""));
			typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("separatorTemplate", ScriptType.Object, false, ""));
			typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("emptyTemplate", ScriptType.Object, false, ""));
		}
		public void EmptyLists () {
			ActionPoker a = new ActionPoker();
			ScriptTypeDescriptor td = new ScriptTypeDescriptor (a);

			IEnumerable<ScriptEventDescriptor> events;
			IEnumerable<ScriptMethodDescriptor> methods;
			IEnumerable<ScriptPropertyDescriptor> props;

			events = td.GetEvents();
			Assert.IsNotNull (events, "A1");
			Assert.IsFalse (events.GetEnumerator().MoveNext(), "A2");

			methods = td.GetMethods();
			Assert.IsNotNull (methods, "A3");
			Assert.IsFalse (methods.GetEnumerator().MoveNext(), "A4");

			props = td.GetProperties();
			Assert.IsNotNull (props, "A5");
			Assert.IsFalse (props.GetEnumerator().MoveNext(), "A6");
		}
Example #14
0
        protected override void InitializeTypeDescriptor(ScriptTypeDescriptor typeDescriptor)
        {
            base.InitializeTypeDescriptor(typeDescriptor);

            string[] args = new string[1];
            args[0] = "className";

            typeDescriptor.AddMethod(new ScriptMethodDescriptor("addCssClass", args));
            typeDescriptor.AddMethod(new ScriptMethodDescriptor("focus"));
            typeDescriptor.AddMethod(new ScriptMethodDescriptor("scrollIntoView"));
            typeDescriptor.AddMethod(new ScriptMethodDescriptor("removeCssClass", args));
            typeDescriptor.AddMethod(new ScriptMethodDescriptor("toggleCssClass", args));

            typeDescriptor.AddProperty(new ScriptPropertyDescriptor("associatedElement", ScriptType.Object, true, ""));
            typeDescriptor.AddProperty(new ScriptPropertyDescriptor("behaviors", ScriptType.Array, true, "Behaviors"));
            typeDescriptor.AddProperty(new ScriptPropertyDescriptor("cssClass", ScriptType.String, false, "CssClass"));
            typeDescriptor.AddProperty(new ScriptPropertyDescriptor("enabled", ScriptType.Boolean, false, "Enabled"));
            typeDescriptor.AddProperty(new ScriptPropertyDescriptor("style", ScriptType.Object, true, ""));
            typeDescriptor.AddProperty(new ScriptPropertyDescriptor("visible", ScriptType.Boolean, false, "Visible"));
            typeDescriptor.AddProperty(new ScriptPropertyDescriptor("visibilityMode", ScriptType.Enum, false, "VisibilityMode"));
        }
Example #15
0
		protected override void InitializeTypeDescriptor (ScriptTypeDescriptor typeDescriptor)
		{
			base.InitializeTypeDescriptor (typeDescriptor);

			string[] args = new string[1];
			args[0] = "className";

			typeDescriptor.AddMethod (new ScriptMethodDescriptor ("addCssClass", args));
			typeDescriptor.AddMethod (new ScriptMethodDescriptor ("focus"));
			typeDescriptor.AddMethod (new ScriptMethodDescriptor ("scrollIntoView"));
			typeDescriptor.AddMethod (new ScriptMethodDescriptor ("removeCssClass", args));
			typeDescriptor.AddMethod (new ScriptMethodDescriptor ("toggleCssClass", args));

			typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("associatedElement", ScriptType.Object, true, ""));
			typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("behaviors", ScriptType.Array, true, "Behaviors"));
			typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("cssClass", ScriptType.String, false, "CssClass"));
			typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("enabled", ScriptType.Boolean, false, "Enabled"));
			typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("style", ScriptType.Object, true, ""));
			typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("visible", ScriptType.Boolean, false, "Visible"));
			typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("visibilityMode", ScriptType.Enum, false, "VisibilityMode"));
		}
Example #16
0
        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 ScriptObject() {
			ActionPoker a = new ActionPoker();
			ScriptTypeDescriptor td = new ScriptTypeDescriptor (a);
			Assert.AreEqual (a, td.ScriptObject, "A1");
		}
Example #18
0
		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;
		}
Example #19
0
		protected override void InitializeTypeDescriptor (ScriptTypeDescriptor typeDescriptor)
		{
			base.InitializeTypeDescriptor (typeDescriptor);

			typeDescriptor.AddProperty (new ScriptPropertyDescriptor ("method", ScriptType.String, false, "Method"));
		}
Example #20
0
 protected StandardValuesCollection GetStandardValues(ScriptTypeDescriptor targetTypeDescriptor)
 {
     throw new NotImplementedException();
 }
		public void CloseAfterClose () {
			ActionPoker a = new ActionPoker();
			ScriptTypeDescriptor td = new ScriptTypeDescriptor (a);

			td.Close ();
			td.Close ();
		}
		public void AddAfterClose () {
			ActionPoker a = new ActionPoker();
			ScriptTypeDescriptor td = new ScriptTypeDescriptor (a);

			td.Close ();

			td.AddEvent (new ScriptEventDescriptor ("testEvent", true));
		}
		public void NullScriptObject() {
			ScriptTypeDescriptor td = new ScriptTypeDescriptor (null);
			Assert.AreEqual (null, td.ScriptObject, "A1");
		}
Example #24
0
		protected override void InitializeTypeDescriptor (ScriptTypeDescriptor typeDescriptor)
		{
			base.InitializeTypeDescriptor (typeDescriptor);
		}
		protected StandardValuesCollection GetStandardValues (ScriptTypeDescriptor targetTypeDescriptor)
		{
			throw new NotImplementedException ();
		}
Example #26
0
        protected override void InitializeTypeDescriptor(ScriptTypeDescriptor typeDescriptor)
        {
            base.InitializeTypeDescriptor(typeDescriptor);

            typeDescriptor.AddProperty(new ScriptPropertyDescriptor("method", ScriptType.String, false, "Method"));
        }