示例#1
0
        /// <summary>
        /// Get name of object factory.
        /// </summary>
        /// <param name="telem_work"></param>
        /// <param name="isCollection"></param>
        /// <param name="functionReference"></param>
        /// <param name="objectFullName"></param>
        /// <returns></returns>
        public override string GetObjectFactoryName(Type telem_work, bool isCollection, bool functionReference, string objectFullName)
        {
            string jsvalue;

            if (telem_work == t_system_object || objectFullName.Contains("System."))
            {
                if (isCollection)
                {
                    jsvalue = "[]";
                }
                else
                {
                    jsvalue = "{}";
                }
            }
            else
            {
                jsvalue = string.Format("{0}()", objectFullName);
                if (isCollection)
                {
                    jsvalue = JSArrayFactory.FunctionDefinitionCall(jsvalue);
                }
                if (functionReference)
                {
                    jsvalue = jsvalue.Replace("()", null);
                }
            }

            return(jsvalue);
        }
示例#2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="T"></param>
 /// <returns></returns>
 public override string TArrayFactoryFunctionDefinitionCall(string T)
 {
     return(JSArrayFactory.FunctionDefinitionCall(T));
 }