コード例 #1
0
        public EntryPointVariable Clone(string newName)
        {
            var v = new EntryPointVariable(_ectx, newName, Type);

            v.MarkUsage(HasInputs);
            v.IsValueSet = IsValueSet;
            v.Value      = Value;
            return(v);
        }
コード例 #2
0
        public EntryPointVariable CreateTempOutputVar <T>(string varPrefix)
        {
            _ectx.CheckValue(varPrefix, nameof(varPrefix));

            int id = 0;
            EntryPointVariable v;
            string             name = $"{varPrefix}_{id}";

            while (_vars.TryGetValue(name, out v))
            {
                name = $"{varPrefix}_{id}";
                id++;
            }

            Type type = typeof(T);

            v           = new EntryPointVariable(_ectx, name, type);
            _vars[name] = v;
            v.MarkUsage(false);
            return(v);
        }