本文整理汇总了C#中VariableScope类的典型用法代码示例。如果您正苦于以下问题:C# VariableScope类的具体用法?C# VariableScope怎么用?C# VariableScope使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VariableScope类属于命名空间,在下文中一共展示了VariableScope类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: TalDefine
public TalDefine(Tag tag, VariableScope scope, string name, string expression)
: base(tag, CommandType.TalDefine)
{
Scope = scope;
Name = name;
Expression = expression;
}
开发者ID:kooboo-jifeng,项目名称:SharpTAL,代码行数:7,代码来源:TalDefine.cs
示例2: AssignStringLiteral
public AssignStringLiteral(Int32 destinationDestIndex, VariableScope destinationDestScope, Int32 sourceIndex,
VariableScope sourceScope)
{
m_DestIndex = destinationDestIndex;
m_DestScope = destinationDestScope;
m_SourceIndex = sourceIndex;
m_SourceScope = sourceScope;
}
开发者ID:RainsSoft,项目名称:GossipScript,代码行数:8,代码来源:AssignStringLiteral.cs
示例3: VariablesHierarchyInfoDto
public VariablesHierarchyInfoDto(VariableScope scope, int scopeID, string scopeName)
{
this.ScopeKey = scope.GetName();
this.ScopeID = scopeID;
this.ScopeName = scopeName;
this.Variables = new List<VariableDto>();
this.Children = new List<VariablesHierarchyInfoDto>();
}
开发者ID:besmirzanaj,项目名称:DeploymentCockpit,代码行数:8,代码来源:VariablesHierarchyInfoDto.cs
示例4: VariableResolver
public VariableResolver(IVariableStorage varStorage, AnalysisScope scope = AnalysisScope.File)
{
Preconditions.NotNull(varStorage, "varStorage");
this._variableStorage = varStorage;
this._scope = scope;
variableScope = scope == AnalysisScope.File ? VariableScope.File : VariableScope.Function;
}
开发者ID:jtvn,项目名称:Eir-CTLLTL,代码行数:8,代码来源:VariableResolver.cs
示例5: Create
public static Scope Create(VariableScope scope)
{
return new Scope
{
Name = scope.Name,
VariablesReference = scope.Id
};
}
开发者ID:modulexcite,项目名称:PowerShellEditorServices,代码行数:8,代码来源:Scope.cs
示例6: AssignString
public AssignString(Int32 destIndex, VariableScope destScope, Expression expression)
{
m_DestIndex = destIndex;
m_DestScope = destScope;
m_Expression = expression;
if (expression.ReturnType != GossipType.String)
throw new GossipScriptException("Expression must return type string");
}
开发者ID:RainsSoft,项目名称:GossipScript,代码行数:9,代码来源:AssignString.cs
示例7: MTSSetTransactionStatement
public MTSSetTransactionStatement(VariableScope scope, IsolationLevel level)
{
if (level == IsolationLevel.None)
{
throw new ArgumentException("isolation level is null");
}
Level = level;
Scope = scope;
}
开发者ID:tupunco,项目名称:Tup.Cobar4Net,代码行数:10,代码来源:MTSSetTransactionStatement.cs
示例8: AstHelper
public AstHelper(ModuleBuilder moduleBuilder)
{
ModuleBuilder = moduleBuilder;
Expecting = new Expecting();
Functions = new FunctionScope();
Variables = new VariableScope();
Types = new TypeScope();
Errors = new ErrorSet();
ReturnScope = new ReturnScope();
}
开发者ID:dayanruben,项目名称:TigerConverters,代码行数:11,代码来源:AstHelper.cs
示例9: DefineLocal
public LocalDefinition DefineLocal(ParameterExpression variable, int start)
{
VariableScope scope;
VariableScope scope2;
LocalVariable variable2 = new LocalVariable(this._localCount++, false, false);
this._maxLocalCount = Math.Max(this._localCount, this._maxLocalCount);
if (this._variables.TryGetValue(variable, out scope))
{
scope2 = new VariableScope(variable2, start, scope);
if (scope.ChildScopes == null)
{
scope.ChildScopes = new List<VariableScope>();
}
scope.ChildScopes.Add(scope2);
}
else
{
scope2 = new VariableScope(variable2, start, null);
}
this._variables[variable] = scope2;
return new LocalDefinition(variable2.Index, variable);
}
开发者ID:nickchal,项目名称:pash,代码行数:22,代码来源:LocalVariables.cs
示例10: LeaveMethodDefinition
public void LeaveMethodDefinition() {
Debug.Assert(_currentElement == _currentMethod);
MethodScope oldMethod = _currentMethod;
_currentElement = oldMethod.Parent;
_currentRescue = oldMethod.ParentRescue;
_currentLoop = oldMethod.ParentLoop;
_currentBlock = oldMethod.ParentBlock;
_currentVariableScope = oldMethod.ParentVariableScope;
_currentMethod = oldMethod.ParentMethod;
}
开发者ID:jxnmaomao,项目名称:ironruby,代码行数:11,代码来源:AstGenerator.cs
示例11: EnterMethodDefinition
public void EnterMethodDefinition(
ScopeBuilder/*!*/ locals,
MSA.Expression/*!*/ selfParameter,
MSA.ParameterExpression/*!*/ runtimeScopeVariable,
MSA.Expression blockParameter,
string/*!*/ methodName,
Parameters parameters) {
Assert.NotNull(locals, selfParameter, runtimeScopeVariable);
MethodScope method = new MethodScope(
locals,
selfParameter,
runtimeScopeVariable,
blockParameter,
methodName,
parameters
);
method.Parent = _currentElement;
method.ParentRescue = _currentRescue;
method.ParentLoop = _currentLoop;
method.ParentBlock = _currentBlock;
method.ParentVariableScope = _currentVariableScope;
method.ParentMethod = _currentMethod;
_currentElement = method;
_currentRescue = null;
_currentLoop = null;
_currentBlock = null;
_currentVariableScope = method;
_currentMethod = method;
}
开发者ID:jxnmaomao,项目名称:ironruby,代码行数:32,代码来源:AstGenerator.cs
示例12: LeaveBlockDefinition
public void LeaveBlockDefinition() {
Debug.Assert(_currentElement == _currentBlock);
BlockScope oldBlock = _currentBlock;
_currentElement = oldBlock.Parent;
_currentRescue = oldBlock.ParentRescue;
_currentLoop = oldBlock.ParentLoop;
_currentVariableScope = oldBlock.ParentVariableScope;
_currentBlock = oldBlock.ParentBlock;
}
开发者ID:jxnmaomao,项目名称:ironruby,代码行数:10,代码来源:AstGenerator.cs
示例13: EnterBlockDefinition
public void EnterBlockDefinition(
ScopeBuilder/*!*/ locals,
MSA.Expression/*!*/ bfcVariable,
MSA.Expression/*!*/ selfVariable,
MSA.ParameterExpression/*!*/ runtimeScopeVariable,
MSA.LabelTarget/*!*/ redoLabel) {
Assert.NotNull(locals, bfcVariable, selfVariable);
Assert.NotNull(redoLabel);
BlockScope block = new BlockScope(locals, selfVariable, runtimeScopeVariable, bfcVariable, redoLabel);
block.Parent = _currentElement;
block.ParentRescue = _currentRescue;
block.ParentLoop = _currentLoop;
block.ParentBlock = _currentBlock;
block.ParentVariableScope = _currentVariableScope;
_currentElement = block;
_currentRescue = null;
_currentLoop = null;
_currentBlock = block;
_currentVariableScope = block;
}
开发者ID:jxnmaomao,项目名称:ironruby,代码行数:22,代码来源:AstGenerator.cs
示例14: Append
/// <summary>
/// Append a variable parameter encoded Int32
/// </summary>
/// <param name="value">Value to append</param>
/// <param name="scope">Select either global or local scope</param>
/// <param name="type">Select either value or handle scope</param>
public void Append(Int32 value, VariableScope scope, VariableType type){
Append(scope, type, FollowType.FourBytes);
Append(value);
}
开发者ID:seipekm,项目名称:MonoBrick-Communication-Software,代码行数:10,代码来源:Commands.cs
示例15: LeaveSourceUnit
public void LeaveSourceUnit() {
Debug.Assert(_currentElement == _currentMethod && _currentVariableScope == _currentMethod);
Debug.Assert(_currentLoop == null && _currentRescue == null);
Debug.Assert(_currentBlock == null);
_currentElement = null;
_currentMethod = null;
_currentVariableScope = null;
}
开发者ID:jxnmaomao,项目名称:ironruby,代码行数:9,代码来源:AstGenerator.cs
示例16: DefineLocal
public LocalDefinition DefineLocal(ParameterExpression variable, int start)
{
LocalVariable result = new LocalVariable(_localCount++, false, false);
_maxLocalCount = System.Math.Max(_localCount, _maxLocalCount);
VariableScope existing, newScope;
if (_variables.TryGetValue(variable, out existing))
{
newScope = new VariableScope(result, start, existing);
if (existing.ChildScopes == null)
{
existing.ChildScopes = new List<VariableScope>();
}
existing.ChildScopes.Add(newScope);
}
else
{
newScope = new VariableScope(result, start, null);
}
_variables[variable] = newScope;
return new LocalDefinition(result.Index, variable);
}
开发者ID:noahfalk,项目名称:corefx,代码行数:23,代码来源:LocalVariables.cs
示例17: LeaveFileInitializer
public void LeaveFileInitializer() {
Debug.Assert(_currentElement == _currentVariableScope);
VariableScope oldScope = _currentVariableScope;
_currentElement = oldScope.Parent;
_currentVariableScope = oldScope.ParentVariableScope;
}
开发者ID:kevinkeeney,项目名称:ironruby,代码行数:7,代码来源:AstGenerator.cs
示例18: GetModel
private IModel GetModel(VariableScope scope)
{
switch (scope)
{
case VariableScope.Global:
return GLOBAL;
case VariableScope.Model:
return _model;
case VariableScope.Page:
return _page;
case VariableScope.Request:
return _session;
case VariableScope.Session:
return _session;
case VariableScope.Tag:
return _hasTags ? _tagVariables.Peek() : null;
default:
throw new NotImplementedException("GetModel not implemented for " + scope);
}
}
开发者ID:rslijp,项目名称:sharptiles,代码行数:20,代码来源:TagModel.cs
示例19: EnterFileInitializer
public void EnterFileInitializer(
ScopeBuilder/*!*/ locals,
MSA.Expression/*!*/ selfVariable,
MSA.ParameterExpression/*!*/ runtimeScopeVariable) {
VariableScope scope = new VariableScope(locals, selfVariable, runtimeScopeVariable);
scope.Parent = _currentElement;
scope.ParentVariableScope = _currentVariableScope;
_currentElement = scope;
_currentVariableScope = scope;
}
开发者ID:kevinkeeney,项目名称:ironruby,代码行数:13,代码来源:AstGenerator.cs
示例20: SysVarPrimary
public SysVarPrimary(VariableScope scope, string varText, string varTextUp)
{
Scope = scope;
this.varText = varText;
VarTextUp = varTextUp;
}
开发者ID:tupunco,项目名称:Tup.Cobar4Net,代码行数:6,代码来源:SysVarPrimary.cs
注:本文中的VariableScope类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论