Exemplo n.º 1
0
        public override void GetAccessedLocalVariables(LogicAction downToChildAction, List <LogicLocalVariable> variables)
        {
            base.GetAccessedLocalVariables(downToChildAction, variables);
            int num;

            if (downToChildAction != null)
            {
                num = this.abG.IndexOf(downToChildAction);
            }
            else
            {
                num = this.abG.Count;
            }
            if (num != -1)
            {
                for (int i = 0; i < num; i++)
                {
                    LogicDeclareLocalVariableAction logicDeclareLocalVariableAction = this.abG[i] as LogicDeclareLocalVariableAction;
                    if (logicDeclareLocalVariableAction != null)
                    {
                        variables.Add(new LogicLocalVariable(logicDeclareLocalVariableAction));
                    }
                }
            }
        }
Exemplo n.º 2
0
        protected override void OnClone(Entity source)
        {
            base.OnClone(source);
            LogicDeclareLocalVariableAction logicDeclareLocalVariableAction = (LogicDeclareLocalVariableAction)source;

            this.abC = logicDeclareLocalVariableAction.VariableTypeName;
            this.abc = logicDeclareLocalVariableAction.VariableName;
            if (logicDeclareLocalVariableAction.ValueAction != null)
            {
                this.abD = (LogicAction)logicDeclareLocalVariableAction.ValueAction.CloneWithCopyBrowsableProperties(false, this);
            }
        }
Exemplo n.º 3
0
        public LogicLocalVariable DeclareLocalVariable(LogicDeclareLocalVariableAction declareVariableAction)
        {
            LogicLocalVariable logicLocalVariable = this.GetLocalVariable(declareVariableAction.VariableName);

            if (logicLocalVariable == null)
            {
                logicLocalVariable = new LogicLocalVariable(declareVariableAction);
                this.aAR.Add(declareVariableAction.VariableName, logicLocalVariable);
                return(logicLocalVariable);
            }
            if (logicLocalVariable.DeclareAction == declareVariableAction)
            {
                return(logicLocalVariable);
            }
            Log.Error("Declare Local Variable: name already defined \"{0}\" by local variable", declareVariableAction.VariableName);
            return(null);
        }
Exemplo n.º 4
0
 internal bool A(TextBlock textBlock)
 {
     if (textBlock.IsAttributeExist("methodParameter"))
     {
         this.aAu = (Entities.Instance.GetLoadingEntityBySerializedUIN(uint.Parse(textBlock.GetAttribute("methodParameter"))) as LogicParameter);
     }
     if (textBlock.IsAttributeExist("declareAction"))
     {
         this.aAV = (Entities.Instance.GetLoadingEntityBySerializedUIN(uint.Parse(textBlock.GetAttribute("declareAction"))) as LogicDeclareLocalVariableAction);
     }
     if (textBlock.IsAttributeExist("type"))
     {
         string     attribute  = textBlock.GetAttribute("type");
         Type       left       = null;
         Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
         for (int i = 0; i < assemblies.Length; i++)
         {
             Assembly assembly = assemblies[i];
             left = assembly.GetType(attribute);
             if (left != null)
             {
                 break;
             }
         }
         if (left == null)
         {
             Log.Warning("Entity System: Serialization error. The type is not found \"{0}\".", attribute);
             return(false);
         }
         this.aAv = left;
     }
     if (textBlock.IsAttributeExist("name"))
     {
         this.aAW = textBlock.GetAttribute("name");
     }
     if (textBlock.IsAttributeExist("value"))
     {
         string attribute2 = textBlock.GetAttribute("value");
         EntityHelper.ConvertFromString(this.aAv, attribute2, null, out this.aAw);
     }
     return(true);
 }
Exemplo n.º 5
0
        private void A(LogicAction logicAction, List <LogicLocalVariable> list)
        {
            LogicDeclareLocalVariableAction logicDeclareLocalVariableAction = logicAction as LogicDeclareLocalVariableAction;

            if (logicDeclareLocalVariableAction != null)
            {
                list.Add(new LogicLocalVariable(logicDeclareLocalVariableAction));
            }
            List <object> childBrowsableItems = logicAction.GetChildBrowsableItems();

            if (childBrowsableItems != null)
            {
                foreach (object current in childBrowsableItems)
                {
                    LogicAction logicAction2 = current as LogicAction;
                    if (logicAction2 != null)
                    {
                        this.A(logicAction2, list);
                    }
                }
            }
        }
Exemplo n.º 6
0
 internal LogicLocalVariable(LogicDeclareLocalVariableAction logicDeclareLocalVariableAction)
 {
     this.aAV = logicDeclareLocalVariableAction;
     this.aAv = logicDeclareLocalVariableAction.VariableType;
     this.aAW = logicDeclareLocalVariableAction.VariableName;
 }