File tree Expand file tree Collapse file tree 4 files changed +5
-4
lines changed
Expand file tree Collapse file tree 4 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ public override void Populate(TextWriter trapFile)
3131 {
3232 if ( assemblyPath is not null )
3333 {
34- var isBuildlessOutputAssembly = isOutputAssembly && Context . ExtractionContext . Mode . HasFlag ( ExtractorMode . Standalone ) ;
34+ var isBuildlessOutputAssembly = isOutputAssembly && Context . ExtractionContext . IsStandalone ;
3535 var identifier = isBuildlessOutputAssembly
3636 ? ""
3737 : assembly . ToString ( ) ?? "" ;
@@ -72,7 +72,7 @@ public static Assembly CreateOutputAssembly(Context cx)
7272
7373 public override void WriteId ( EscapingTextWriter trapFile )
7474 {
75- if ( isOutputAssembly && Context . ExtractionContext . Mode . HasFlag ( ExtractorMode . Standalone ) )
75+ if ( isOutputAssembly && Context . ExtractionContext . IsStandalone )
7676 {
7777 trapFile . Write ( "buildlessOutputAssembly" ) ;
7878 }
Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ public IMethodSymbol? TargetSymbol
133133 . Where ( method => method . Parameters . Length >= Syntax . ArgumentList . Arguments . Count )
134134 . Where ( method => method . Parameters . Count ( p => ! p . HasExplicitDefaultValue ) <= Syntax . ArgumentList . Arguments . Count ) ;
135135
136- return Context . ExtractionContext . Mode . HasFlag ( ExtractorMode . Standalone ) ?
136+ return Context . ExtractionContext . IsStandalone ?
137137 candidates . FirstOrDefault ( ) :
138138 candidates . SingleOrDefault ( ) ;
139139 }
Original file line number Diff line number Diff line change @@ -376,7 +376,7 @@ private void ExtractionError(InternalError error)
376376
377377 private void ReportError ( InternalError error )
378378 {
379- if ( ! ExtractionContext . Mode . HasFlag ( ExtractorMode . Standalone ) )
379+ if ( ! ExtractionContext . IsStandalone )
380380 throw error ;
381381
382382 ExtractionError ( error ) ;
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ public class ExtractionContext
1515 public ExtractorMode Mode { get ; }
1616 public string OutputPath { get ; }
1717 public IEnumerable < CompilationInfo > CompilationInfos { get ; }
18+ public bool IsStandalone => Mode . HasFlag ( ExtractorMode . Standalone ) ;
1819
1920 /// <summary>
2021 /// Creates a new extractor instance for one compilation unit.
You can’t perform that action at this time.
0 commit comments