Пример #1
0
        protected override void OnClone(Entity source)
        {
            base.OnClone(source);
            LogicAllowCallDotPathAction logicAllowCallDotPathAction = (LogicAllowCallDotPathAction)source;

            if (logicAllowCallDotPathAction.abg != null)
            {
                this.abg = (LogicDotPathAction)logicAllowCallDotPathAction.abg.CloneWithCopyBrowsableProperties(false, this);
            }
        }
Пример #2
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());
        }