本文整理汇总了C#中Analyzer.AnalyzeMembers方法的典型用法代码示例。如果您正苦于以下问题:C# Analyzer.AnalyzeMembers方法的具体用法?C# Analyzer.AnalyzeMembers怎么用?C# Analyzer.AnalyzeMembers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Analyzer
的用法示例。
在下文中一共展示了Analyzer.AnalyzeMembers方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Compile
/// <summary>
/// Compiles the transient unit. 'PreCompile' should be called first!
/// </summary>
internal bool Compile(CompilationContext/*!*/ context, EvalKinds kind)
{
Analyzer analyzer = null;
try
{
analyzer = new Analyzer(context);
// perform pre-analysis on types and functions:
if (types != null)
analyzer.PreAnalyze(types.Values);
if (functions != null)
analyzer.PreAnalyze(functions.Values);
// perform member analysis on types and functions:
if (types != null)
analyzer.AnalyzeMembers(types.Values);
if (functions != null)
analyzer.AnalyzeMembers(functions.Values);
if (context.Errors.AnyFatalError) return false;
// perform full analysis:
analyzer.Analyze(sourceUnit);
if (context.Errors.AnyFatalError) return false;
// perform post analysis:
analyzer.PostAnalyze();
}
catch (CompilerException)
{
return false;
}
finally
{
resolvingScriptContext = null;
referringType = null;
}
// do not emit anything if there was parse/analysis error:
if (context.Errors.AnyError) return false;
DefineBuilders();
// define constructed types:
analyzer.DefineConstructedTypeBuilders();
CodeGenerator cg = new CodeGenerator(context);
sourceUnit.Emit(cg);
return true;
}