当前位置: 首页>>代码示例>>C#>>正文


C# VariableDef类代码示例

本文整理汇总了C#中VariableDef的典型用法代码示例。如果您正苦于以下问题:C# VariableDef类的具体用法?C# VariableDef怎么用?C# VariableDef使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


VariableDef类属于命名空间,在下文中一共展示了VariableDef类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ReplaceVariable

 internal override void ReplaceVariable(string name, VariableDef def) {
     if (_name != name) {
         Parent.ReplaceVariable(name, def);
     } else {
         _variable = def;
     }
 }
开发者ID:lioaphy,项目名称:nodejstools,代码行数:7,代码来源:DefinitiveAssignmentEnvironmentRecord.cs

示例2: TryGetVariable

 public override bool TryGetVariable(string name, out VariableDef variable) {
     if (name == _name) {
         variable = _variable;
         return true;
     }
     return base.TryGetVariable(name, out variable);
 }
开发者ID:lioaphy,项目名称:nodejstools,代码行数:7,代码来源:DefinitiveAssignmentEnvironmentRecord.cs

示例3: FunctionInfo

 internal FunctionInfo(AnalysisUnit unit, ProjectEntry entry)
     : base(unit)
 {
     _entry = entry;
     _returnValue = new VariableDef();
     _declVersion = entry.Version;
     // TODO: pass NoneInfo if we can't determine the function always returns
 }
开发者ID:TerabyteX,项目名称:main,代码行数:8,代码来源:FunctionInfo.cs

示例4: GeneratorInfo

 public GeneratorInfo(JAnalyzer projectState, Node node)
     : base(projectState._generatorType)
 {
     _node = node;
     Yields = new VariableDef();
     Sends = new VariableDef();
     Returns = new VariableDef();
 }
开发者ID:borota,项目名称:JTVS,代码行数:8,代码来源:GeneratorInfo.cs

示例5: SetVariable

        public override void SetVariable(VariableDef value, object obj) {
            base.SetVariable(value, obj);

            if (value != null)
            { setProperty(value.Value, "", false, obj); }

            else
            { update(); }
        }
开发者ID:675492062,项目名称:behaviac,代码行数:9,代码来源:DesignerCompositeEditor.cs

示例6: GeneratorInfo

 public GeneratorInfo(PythonAnalyzer projectState, IPythonProjectEntry entry)
     : base(projectState.ClassInfos[BuiltinTypeId.Generator]) {
     
     _declaringModule = entry;
     _declaringVersion = entry.AnalysisVersion;
     Yields = new VariableDef();
     Sends = new VariableDef();
     Returns = new VariableDef();
 }
开发者ID:CforED,项目名称:Node.js-Tools-for-Visual-Studio,代码行数:9,代码来源:GeneratorInfo.cs

示例7: FunctionScope

 public FunctionScope(FunctionInfo function, Node node, InterpreterScope declScope)
     : base(function, node, declScope)
 {
     ReturnValue = new VariableDef();
     if (Function.FunctionDefinition.IsGenerator) {
         Generator = new GeneratorInfo(function.ProjectState, Function.FunctionDefinition);
         ReturnValue.AddTypes(function.ProjectEntry, Generator.SelfSet, false);
     }
 }
开发者ID:borota,项目名称:JTVS,代码行数:9,代码来源:FunctionScope.cs

示例8: SetVariable

        public override void SetVariable(VariableDef variable, object obj) {
            base.SetVariable(variable, obj);

            if (variable != null) {
                Type valueType = variable.GetValueType();

                if (valueType == typeof(bool))
                { checkBox.Checked = (bool)variable.Value; }
            }
        }
开发者ID:675492062,项目名称:behaviac,代码行数:10,代码来源:DesignerBooleanEditor.cs

示例9: CopyVariableDef

 private static VariableDef CopyVariableDef(VariableDef original) {
     LocatedVariableDef locVarDef = original as LocatedVariableDef;
     if (locVarDef != null) {
         return new LocatedVariableDef(
             locVarDef.Entry,
             locVarDef.Node
         );
     }
     return new VariableDef();
 }
开发者ID:lioaphy,项目名称:nodejstools,代码行数:10,代码来源:CarteseanProductFunctionAnalysisUnit.cs

示例10: CoroutineInfo

        public CoroutineInfo(PythonAnalyzer projectState, IPythonProjectEntry entry)
            : base(projectState.ClassInfos[BuiltinTypeId.Generator]) {
            // Internally, coroutines are represented by generators with a CO_*
            // flag on the code object. Here we represent it as a separate info,
            // but reuse the underlying class info.

            _declaringModule = entry;
            _declaringVersion = entry.AnalysisVersion;
            Returns = new VariableDef();
        }
开发者ID:wenh123,项目名称:PTVS,代码行数:10,代码来源:CoroutineInfo.cs

示例11: CreateVariable

 public VariableDef CreateVariable(Node node, AnalysisUnit unit, string name, bool addRef = true)
 {
     var res = GetVariable(node, unit, name, addRef);
     if (res == null) {
         _variables[name] = res = new VariableDef();
         if (addRef) {
             res.AddReference(node, unit);
         }
     }
     return res;
 }
开发者ID:TerabyteX,项目名称:main,代码行数:11,代码来源:InterpreterScope.cs

示例12: GeneratorInfo

        public GeneratorInfo(FunctionInfo functionInfo)
            : base(functionInfo.ProjectState._generatorType)
        {
            _functionInfo = functionInfo;
            var nextMeth = VariableDict["next"];
            var sendMeth = VariableDict["send"];

            _nextMethod = new GeneratorNextBoundBuiltinMethodInfo(this, (BuiltinMethodInfo)nextMeth.First());
            _sendMethod = new GeneratorSendBoundBuiltinMethodInfo(this, (BuiltinMethodInfo)sendMeth.First());

            _sends = new VariableDef();
        }
开发者ID:TerabyteX,项目名称:main,代码行数:12,代码来源:GeneratorInfo.cs

示例13: CartesianProductFunctionAnalysisUnit

        public CartesianProductFunctionAnalysisUnit(UserFunctionValue funcInfo, EnvironmentRecord environment, AnalysisUnit outerUnit, UserFunctionValue.CallArgs callArgs, VariableDef returnValue)
            : base(funcInfo, outerUnit, environment.Parent, outerUnit.ProjectEntry, environment) {
            _callArgs = callArgs;
            _returnValue = returnValue;
            _this = new VariableDef();

            var funcScope = environment as FunctionEnvironmentRecord;

            var specLocals = new List<CartesianLocalVariable>();
            ProcessVariablesForScope(funcScope, specLocals);
            _specializedLocals = specLocals.ToArray();
        }
开发者ID:lioaphy,项目名称:nodejstools,代码行数:12,代码来源:CarteseanProductFunctionAnalysisUnit.cs

示例14: SetVariable

        public override void SetVariable(VariableDef value, object obj)
        {
            base.SetVariable(value, obj);

            string selectionName = "";
            if (value != null)
            {
                ParInfo par = value.Value as ParInfo;
                if (par != null)
                    selectionName = par.Name;
            }

            setComboBox(selectionName);
        }
开发者ID:KeyleXiao,项目名称:behaviac,代码行数:14,代码来源:DesignerParEnumEditor.cs

示例15: FunctionScope

 public FunctionScope(
     FunctionInfo function,
     Node node,
     InterpreterScope declScope,
     IPythonProjectEntry declModule
 )
     : base(function, node, declScope) {
     ReturnValue = new VariableDef();
     if (Function.FunctionDefinition.IsCoroutine) {
         Coroutine = new CoroutineInfo(function.ProjectState, declModule);
         ReturnValue.AddTypes(function.ProjectEntry, Coroutine.SelfSet, false);
     } else if (Function.FunctionDefinition.IsGenerator) {
         Generator = new GeneratorInfo(function.ProjectState, declModule);
         ReturnValue.AddTypes(function.ProjectEntry, Generator.SelfSet, false);
     }
 }
开发者ID:wenh123,项目名称:PTVS,代码行数:16,代码来源:FunctionScope.cs


注:本文中的VariableDef类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。