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)
31
31
{
32
32
if ( assemblyPath is not null )
33
33
{
34
- var isBuildlessOutputAssembly = isOutputAssembly && Context . ExtractionContext . Mode . HasFlag ( ExtractorMode . Standalone ) ;
34
+ var isBuildlessOutputAssembly = isOutputAssembly && Context . ExtractionContext . IsStandalone ;
35
35
var identifier = isBuildlessOutputAssembly
36
36
? ""
37
37
: assembly . ToString ( ) ?? "" ;
@@ -72,7 +72,7 @@ public static Assembly CreateOutputAssembly(Context cx)
72
72
73
73
public override void WriteId ( EscapingTextWriter trapFile )
74
74
{
75
- if ( isOutputAssembly && Context . ExtractionContext . Mode . HasFlag ( ExtractorMode . Standalone ) )
75
+ if ( isOutputAssembly && Context . ExtractionContext . IsStandalone )
76
76
{
77
77
trapFile . Write ( "buildlessOutputAssembly" ) ;
78
78
}
Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ public IMethodSymbol? TargetSymbol
133
133
. Where ( method => method . Parameters . Length >= Syntax . ArgumentList . Arguments . Count )
134
134
. Where ( method => method . Parameters . Count ( p => ! p . HasExplicitDefaultValue ) <= Syntax . ArgumentList . Arguments . Count ) ;
135
135
136
- return Context . ExtractionContext . Mode . HasFlag ( ExtractorMode . Standalone ) ?
136
+ return Context . ExtractionContext . IsStandalone ?
137
137
candidates . FirstOrDefault ( ) :
138
138
candidates . SingleOrDefault ( ) ;
139
139
}
Original file line number Diff line number Diff line change @@ -376,7 +376,7 @@ private void ExtractionError(InternalError error)
376
376
377
377
private void ReportError ( InternalError error )
378
378
{
379
- if ( ! ExtractionContext . Mode . HasFlag ( ExtractorMode . Standalone ) )
379
+ if ( ! ExtractionContext . IsStandalone )
380
380
throw error ;
381
381
382
382
ExtractionError ( error ) ;
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ public class ExtractionContext
15
15
public ExtractorMode Mode { get ; }
16
16
public string OutputPath { get ; }
17
17
public IEnumerable < CompilationInfo > CompilationInfos { get ; }
18
+ public bool IsStandalone => Mode . HasFlag ( ExtractorMode . Standalone ) ;
18
19
19
20
/// <summary>
20
21
/// Creates a new extractor instance for one compilation unit.
You can’t perform that action at this time.
0 commit comments