Exemplo n.º 1
0
 private LogicSystemClass A()
 {
     if (this.abr == null && !string.IsNullOrEmpty(this.abR))
     {
         this.abr = LogicSystemClasses.Instance.GetByName(this.abR);
     }
     return(this.abr);
 }
Exemplo n.º 2
0
 private Type A()
 {
     if (this.abO == null && !string.IsNullOrEmpty(this.abn))
     {
         LogicSystemClass byName = LogicSystemClasses.Instance.GetByName(this.abn);
         if (byName != null)
         {
             this.abO = byName.ClassType;
         }
     }
     return(this.abO);
 }
Exemplo n.º 3
0
        private void DefineBaseObject()
        {
            LogicSystemClass logicSystemClass = DefineLogicClass(typeof(object));

            logicSystemClass.DefineMethod(logicSystemClass.ClassType.GetMethod("ToString"));
            logicSystemClass = DefineLogicClass(typeof(ValueType));
            logicSystemClass = DefineLogicClass(typeof(string));

            logicSystemClass = DefineLogicClass(typeof(bool));
            logicSystemClass.DefineMethod(logicSystemClass.ClassType.GetMethod("Parse", new Type[]
            {
                typeof(string)
            }));

            logicSystemClass = DefineLogicClass(typeof(int));
            logicSystemClass.DefineMethod(logicSystemClass.ClassType.GetMethod("ToString", new Type[]
            {
                typeof(string)
            }));
            logicSystemClass.DefineMethod(logicSystemClass.ClassType.GetMethod("Parse", new Type[]
            {
                typeof(string)
            }));

            logicSystemClass = DefineLogicClass(typeof(float));
            logicSystemClass.DefineMethod(logicSystemClass.ClassType.GetMethod("ToString", new Type[]
            {
                typeof(string)
            }));
            logicSystemClass.DefineMethod(logicSystemClass.ClassType.GetMethod("Parse", new Type[]
            {
                typeof(string)
            }));

            logicSystemClass = DefineLogicClass(typeof(Log));
            logicSystemClass.DefineMethod(logicSystemClass.ClassType.GetMethod("Info", new Type[]
            {
                typeof(string)
            }));
            logicSystemClass.DefineMethod(logicSystemClass.ClassType.GetMethod("Warning", new Type[]
            {
                typeof(string)
            }));
            logicSystemClass.DefineMethod(logicSystemClass.ClassType.GetMethod("Error", new Type[]
            {
                typeof(string)
            }));
            logicSystemClass.DefineMethod(logicSystemClass.ClassType.GetMethod("Fatal", new Type[]
            {
                typeof(string)
            }));
        }
Exemplo n.º 4
0
 public void Init(Type classType, PropertyInfo propertyInfo)
 {
     this.abr = null;
     this.abS = null;
     this.abR = classType.Name;
     string[]        array           = null;
     ParameterInfo[] indexParameters = propertyInfo.GetIndexParameters();
     if (indexParameters.Length != 0)
     {
         array = new string[indexParameters.Length];
         for (int i = 0; i < indexParameters.Length; i++)
         {
             array[i] = indexParameters[i].ParameterType.Name;
         }
     }
     base.InitPropertyNameAndParameterTypes(propertyInfo.Name, array);
 }
Exemplo n.º 5
0
 public void Init(Type classType, MethodInfo methodInfo)
 {
     this.abr = null;
     this.abS = null;
     this.abR = classType.Name;
     string[]        array      = null;
     ParameterInfo[] parameters = methodInfo.GetParameters();
     if (parameters.Length != 0)
     {
         array = new string[parameters.Length];
         for (int i = 0; i < parameters.Length; i++)
         {
             array[i] = parameters[i].ParameterType.Name;
         }
     }
     base.InitMethodNameAndParameterTypes(methodInfo.Name, array);
 }
Exemplo n.º 6
0
        public override string ToString()
        {
            string str = " .";
            LogicAllowCallDotPathAction logicAllowCallDotPathAction = base.Parent as LogicAllowCallDotPathAction;

            if (logicAllowCallDotPathAction == null)
            {
                return("LogicCallNonStaticMethodAction: ToString: allowCallDotPathAction = null");
            }
            Type returnType = logicAllowCallDotPathAction.GetReturnType();

            if (returnType != null)
            {
                LogicSystemClass byName = LogicSystemClasses.Instance.GetByName(returnType.Name);
                if (byName == null)
                {
                    return(string.Format("Error: System class not defined \"{0}\"", returnType.Name));
                }
                if (!string.IsNullOrEmpty(base.MethodName))
                {
                    if (this.SystemMethod == null)
                    {
                        return(string.Format("Error: Method not exists \"{0}\"", base.MethodName));
                    }
                    string   methodFormatText = byName.GetMethodFormatText(this.SystemMethod, true);
                    string[] args             = base.ForToStringParameterActions();
                    str += string.Format(methodFormatText, args);
                }
                else
                {
                    if (string.IsNullOrEmpty(base.PropertyName))
                    {
                        return("LogicCallNonStaticMethodAction: ToString: MethodName and PropertyName = null");
                    }
                    if (this.SystemProperty == null)
                    {
                        return(string.Format("Error: Property not exists \"{0}\"", base.PropertyName));
                    }
                    string   propertyFormatText = byName.GetPropertyFormatText(this.SystemProperty, true);
                    string[] args2 = base.ForToStringParameterActions();
                    str += string.Format(propertyFormatText, args2);
                }
            }
            return(str + base.ToString());
        }
Exemplo n.º 7
0
        private LogicSystemClass DefineLogicClass(Type classType)
        {
            if (classType == null)
            {
                return(null);
            }

            LogicSystemClass logicSystemClass = new LogicSystemClass(classType);

            if (logicSystemClassNameDic.ContainsKey(logicSystemClass.Name))
            {
                return(logicSystemClassNameDic[logicSystemClass.Name]);
            }

            logicSystemClassNameDic.Add(logicSystemClass.Name, logicSystemClass);
            logicSystemClassTypeNameDic.Add(logicSystemClass.ClassType.FullName, logicSystemClass);
            logicSystemClassTypeDic.Add(logicSystemClass.ClassType, logicSystemClass);
            return(logicSystemClass);
        }