コード例 #1
0
ファイル: ArrayAssignmentFrame.cs プロジェクト: yuzd/lamar
        public ArrayAssignmentFrame(ArrayInstance <T> instance, Variable[] elements)
        {
            Elements = elements;
            Variable = new ServiceVariable(instance, this);

            ElementType = typeof(T);
        }
コード例 #2
0
        public ListAssignmentFrame(ListInstance <T> instance, Variable[] elements) : base(false)
        {
            ElementType = typeof(T);
            Variable    = new ServiceVariable(instance, this);

            Elements = elements;
        }
コード例 #3
0
        public ArrayAssignmentFrame(ArrayInstance <T> instance, Variable[] elements)
        {
            Elements = elements;
            Variable = new ServiceVariable(instance, this);
            if (typeof(T).MustBeBuiltWithFunc())
            {
                Variable.OverrideType(typeof(object[]));
            }

            ElementType = typeof(T);
        }
コード例 #4
0
        public void Add(ServiceVariable variable)
        {
            // TODO -- have to do more on naming too
            var index = AllFor(variable.Instance).Length + 1;

            if (index > 1)
            {
                variable.OverrideName(variable.Usage + "_" + index);
            }

            _cached.Add(variable);
        }
コード例 #5
0
        public ListAssignmentFrame(ListInstance <T> instance, Variable[] elements) : base(false)
        {
            ElementType = typeof(T);
            Variable    = new ServiceVariable(instance, this);

            if (ElementType.MustBeBuiltWithFunc())
            {
                Variable.OverrideType(typeof(object[]));
            }

            Elements = elements;
        }
コード例 #6
0
        public GetInstanceFrame(Instance instance)
        {
            Variable = new ServiceVariable(instance, this, ServiceDeclaration.ServiceType);

            _name = instance.Name;
        }