Пример #1
0
        /// <remarks>
        /// By convention, some script objects are designed to support a particular
        ///	type and so are always constructed with that type's name.
        ///	Specifically, asynchronous method calls need a type against which
        ///	to invoke the method by reflection (see IDCL.Controls.Asynchronous).
        /// <see cref="IDCL.Controls.Asynchronous"/>
        /// </remarks>
        public static string CreateObject(string name, string typeName, Type t, object[] arguments)
        {
            int length = arguments.Length;

            object[] transfer = new object[length + 1];
            // type name needs to be first argument
            transfer[0] = t.QualifiedName();
            for (int x = 1; x <= length; x++)
            {
                transfer[x] = arguments[x - 1];
            }
            return(EcmaScript.CreateObject(name, typeName, transfer, null));
        }
Пример #2
0
 public static string CreateObject(string name, string typeName)
 {
     return(EcmaScript.CreateObject(name, typeName, new string[] { }, null));
 }
Пример #3
0
 public static string CreateObject(string name, string typeName, string[] arguments)
 {
     return(EcmaScript.CreateObject(name, typeName, arguments, null));
 }
Пример #4
0
 public static string CreateObject(string name, string typeName, Dictionary <string, object> properties)
 {
     return(EcmaScript.CreateObject(name, typeName, new string[] { }, properties));
 }
Пример #5
0
 public static string CreateObject(Type t, object[] arguments)
 {
     return(EcmaScript.CreateObject(t.Name, t, arguments));
 }
Пример #6
0
 public static string CreateObject(Type t)
 {
     return(EcmaScript.CreateObject(t.Name, t));
 }
Пример #7
0
 public static string CreateObject(string name, Type t)
 {
     return(EcmaScript.CreateObject(name, name + "Object", t));
 }
Пример #8
0
 // by convention, JS object function names end with "Object"
 public static string CreateObject(string name, Type t, object[] arguments)
 {
     return(EcmaScript.CreateObject(name, name + "Object", t, arguments));
 }
Пример #9
0
 public static string CreateObject(string name, string typeName, Type t)
 {
     return(EcmaScript.CreateObject(name, typeName, new string[] {
         t.QualifiedName()
     }, null));
 }