• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ILocalDefinition类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: GetPrimarySourceLocationsForDefinitionOf

 /// <summary>
 /// Return zero or more locations in primary source documents that correspond to the definition of the given local.
 /// </summary>
 public IEnumerable<IPrimarySourceLocation> GetPrimarySourceLocationsForDefinitionOf(ILocalDefinition localDefinition) {
   ISourceLocationProvider/*?*/ provider = this.GetProvider(localDefinition);
   if (provider == null)
     return Enumerable<IPrimarySourceLocation>.Empty;
   else
     return provider.GetPrimarySourceLocationsForDefinitionOf(localDefinition);
 }
开发者ID:RUB-SysSec,项目名称:Probfuscator,代码行数:10,代码来源:SourceModelHelper.cs


示例2: Visit

 public override void Visit(ILocalDefinition localDefinition)
 {
     NewLineAddIndent();
     AppendElementType(localDefinition);
     //output.Append(localDefinition.Name.Value);
     //AppendSpace();
     base.Visit(localDefinition);
 }
开发者ID:jamarchist,项目名称:SharpMock,代码行数:8,代码来源:CodePrinter.cs


示例3: GetSourceNameFor

 /// <summary>
 /// Returns the source name of the given local definition, if this is available.
 /// Otherwise returns the value of the Name property and sets isCompilerGenerated to true.
 /// </summary>
 public string GetSourceNameFor(ILocalDefinition localDefinition, out bool isCompilerGenerated) {
   ISourceLocationProvider/*?*/ provider = this.GetProvider(localDefinition);
   if (provider == null) {
     isCompilerGenerated = false;
     return "";
   } else {
     return provider.GetSourceNameFor(localDefinition, out isCompilerGenerated);
   }
 }
开发者ID:RUB-SysSec,项目名称:Probfuscator,代码行数:13,代码来源:SourceModelHelper.cs


示例4: FindOrCreateLocalVariable

 /// <summary>
 /// 
 /// </summary>
 /// <param name="local"></param>
 /// <returns></returns>
 public Bpl.Variable FindOrCreateLocalVariable(ILocalDefinition local) {
   Bpl.LocalVariable v;
   Bpl.IToken tok = local.Token();
   Bpl.Type t = TranslationHelper.CciTypeToBoogie(local.Type.ResolvedType);
   if (!localVarMap.TryGetValue(local, out v)) {
     v = new Bpl.LocalVariable(tok, new Bpl.TypedIdent(tok, local.Name.Value, t));
     localVarMap.Add(local, v);
   }
   return v;
 }
开发者ID:hesam,项目名称:SketchSharp,代码行数:15,代码来源:Sink.cs


示例5: Visit

 /// <summary>
 /// Visits the specified local definition.
 /// </summary>
 /// <param name="localDefinition">The local definition.</param>
 public virtual void Visit(ILocalDefinition localDefinition)
 {
     if (this.stopTraversal) return;
       //^ int oldCount = this.path.Count;
       this.path.Push(localDefinition);
       if (localDefinition.IsModified)
     this.Visit(localDefinition.CustomModifiers);
       this.Visit(localDefinition.Type);
       //^ assume this.path.Count == oldCount+1; //True because all of the virtual methods of this class promise not to decrease this.path.Count.
       this.path.Pop();
 }
开发者ID:rasiths,项目名称:visual-profiler,代码行数:15,代码来源:Visitors.cs


示例6: Visit

 public virtual void Visit(ILocalDefinition localDefinition)
 {
     this.Visit(localDefinition.CustomModifiers);
     this.Visit(localDefinition.Type);
 }
开发者ID:elemk0vv,项目名称:roslyn-1,代码行数:5,代码来源:MetadataVisitor.cs


示例7: GetLocalWithSourceName

 private ILocalDefinition GetLocalWithSourceName(ILocalDefinition localDef) {
   Contract.Requires(localDef != null);
   Contract.Ensures(Contract.Result<ILocalDefinition>() != null);
   return this.sourceMethodBody.GetLocalWithSourceName(localDef);
 }
开发者ID:Refresh06,项目名称:visualmutator,代码行数:5,代码来源:InstructionParser.cs


示例8: GetProvider

 /*?*/
 private ILocalScopeProvider GetProvider(ILocalDefinition localDefinition)
 {
     return this.GetProvider(localDefinition.MethodDefinition);
 }
开发者ID:harib,项目名称:Afterthought,代码行数:5,代码来源:SourceModelHelper.cs


示例9: TraverseChildren

 public override void TraverseChildren(ILocalDefinition localDefinition)
 {
     if (!foundLocals.Contains(localDefinition)) foundLocals.Add(localDefinition);
     base.TraverseChildren(localDefinition);
 }
开发者ID:riverar,项目名称:devtools,代码行数:5,代码来源:DeclarationAdder.cs


示例10: VisitReference

 /// <summary>
 /// Performs some computation with the given local definition.
 /// </summary>
 public void VisitReference(ILocalDefinition localDefinition)
 {
 }
开发者ID:rasiths,项目名称:visual-profiler,代码行数:6,代码来源:Validator.cs


示例11: GetLocalWithSourceName

 private ILocalDefinition GetLocalWithSourceName(ILocalDefinition localDef)
 {
     if (this.sourceLocationProvider == null) return localDef;
       var mutableLocal = this.localMap[localDef];
       if (mutableLocal != null) return mutableLocal;
       mutableLocal = localDef as LocalDefinition;
       if (mutableLocal == null) {
     mutableLocal = new LocalDefinition();
     mutableLocal.Copy(localDef, this.host.InternFactory);
       }
       this.localMap.Add(localDef, mutableLocal);
       bool isCompilerGenerated;
       var sourceName = this.sourceLocationProvider.GetSourceNameFor(localDef, out isCompilerGenerated);
       if (sourceName != localDef.Name.Value) {
     mutableLocal.Name = this.host.NameTable.GetNameFor(sourceName);
       }
       return mutableLocal;
 }
开发者ID:riverar,项目名称:devtools,代码行数:18,代码来源:SourceMethodBody.cs


示例12: GetTypesOfVariable

 private static IEnumerable<string> GetTypesOfVariable(ILocalDefinition variable)
 {
     return from t in variable.Type.GetAllRealTypeReferences()
            select t.ToString();
 }
开发者ID:halllo,项目名称:MTSS12,代码行数:5,代码来源:TypeDependenciesOfVariables.cs


示例13: TraverseChildren

 /// <summary>
 /// Traverses the children of the specified local definition.
 /// </summary>
 public virtual void TraverseChildren(ILocalDefinition localDefinition)
 {
     Contract.Requires(localDefinition != null);
       if (localDefinition.IsConstant)
     this.Traverse(localDefinition.CompileTimeValue);
       if (localDefinition.IsModified)
     this.Traverse(localDefinition.CustomModifiers);
       if (this.stopTraversal) return;
       this.Traverse(localDefinition.Type);
 }
开发者ID:rasiths,项目名称:visual-profiler,代码行数:13,代码来源:Visitors.cs


示例14: Traverse

 /// <summary>
 /// Traverses the specified local definition.
 /// </summary>
 public void Traverse(ILocalDefinition localDefinition)
 {
     Contract.Requires(localDefinition != null);
       if (!this.objectsThatHaveAlreadyBeenTraversed.Add(localDefinition)) return;
       if (this.preorderVisitor != null) this.preorderVisitor.Visit(localDefinition);
       if (this.stopTraversal) return;
       this.TraverseChildren(localDefinition);
       if (this.stopTraversal) return;
       if (this.postorderVisitor != null) this.postorderVisitor.Visit(localDefinition);
 }
开发者ID:rasiths,项目名称:visual-profiler,代码行数:13,代码来源:Visitors.cs


示例15: GetPdbFunctionFor

 private PdbFunction GetPdbFunctionFor(ILocalDefinition localDefinition)
 {
     PdbFunction/*?*/ result = null;
       foreach (ILocation location in localDefinition.Locations) {
     MethodBodyLocation/*?*/ mbLocation = location as MethodBodyLocation;
     if (mbLocation != null) {
       this.pdbFunctionMap.TryGetValue(mbLocation.Document.MethodToken, out result);
       break;
     }
       }
       return result;
 }
开发者ID:harib,项目名称:Afterthought,代码行数:12,代码来源:SourceLocationProvider.cs


示例16: GetSourceNameFor

 /// <summary>
 /// 
 /// </summary>
 /// <param name="localDefinition"></param>
 /// <param name="isCompilerGenerated"></param>
 /// <returns></returns>
 public string GetSourceNameFor(ILocalDefinition localDefinition, out bool isCompilerGenerated)
 {
     isCompilerGenerated = true;
       PdbFunction/*?*/ pdbFunction = this.GetPdbFunctionFor(localDefinition);
       if (pdbFunction != null) {
     uint index = 0;
     foreach (ILocation location in localDefinition.Locations) {
       MethodBodyLocation/*?*/ mbLocation = location as MethodBodyLocation;
       if (mbLocation != null) {
     index = mbLocation.Offset;
     break;
       }
     }
     PdbSlot/*?*/ slot = this.GetSlotFor(pdbFunction.scopes, index);
     if (slot != null) {
       isCompilerGenerated = (slot.flags & 0x4) != 0;
       return slot.name;
     }
       }
       return localDefinition.Name.Value;
 }
开发者ID:harib,项目名称:Afterthought,代码行数:27,代码来源:SourceLocationProvider.cs


示例17: GetPrimarySourceLocationsForDefinitionOf

 /// <summary>
 /// Return zero or more locations in primary source documents that correspond to the definition of the given local.
 /// </summary>
 public IEnumerable<IPrimarySourceLocation> GetPrimarySourceLocationsForDefinitionOf(ILocalDefinition localDefinition)
 {
     PdbFunction/*?*/ pdbFunction = this.GetPdbFunctionFor(localDefinition);
       if (pdbFunction != null) {
     uint index = 0;
     foreach (ILocation location in localDefinition.Locations) {
       MethodBodyLocation/*?*/ mbLocation = location as MethodBodyLocation;
       if (mbLocation != null) {
     index = mbLocation.Offset;
     break;
       }
     }
     PdbSlot/*?*/ slot = this.GetSlotFor(pdbFunction.scopes, index);
     if (slot != null && (slot.flags & 0x4) == 0)
       return IteratorHelper.GetSingletonEnumerable<IPrimarySourceLocation>(new LocalNameSourceLocation(slot.name));
       }
       return IteratorHelper.GetEmptyEnumerable<IPrimarySourceLocation>();
 }
开发者ID:harib,项目名称:Afterthought,代码行数:21,代码来源:SourceLocationProvider.cs


示例18: VisitReference

 public void VisitReference(ILocalDefinition localDefinition)
 {
     Contract.Assume(false);
 }
开发者ID:rasiths,项目名称:visual-profiler,代码行数:4,代码来源:Visitors.cs


示例19: Visit

 /// <summary>
 /// Performs some computation with the given local definition.
 /// </summary>
 public void Visit(ILocalDefinition localDefinition)
 {
 }
开发者ID:rasiths,项目名称:visual-profiler,代码行数:6,代码来源:Validator.cs


示例20: PrintLocalName

 public virtual void PrintLocalName(ILocalDefinition local) {
   this.sourceEmitterOutput.Write(local.Name.Value);
 }
开发者ID:Refresh06,项目名称:visualmutator,代码行数:3,代码来源:ExpressionSourceEmitter.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ILocalNode类代码示例发布时间:2022-05-24
下一篇:
C# ILocalChunkCache类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap