-
Notifications
You must be signed in to change notification settings - Fork 9
SourceGenerator Options
<FastNew_MaxParameterCount>16</FastNew_MaxParameterCount>
Type: Int32
Default:16
Indicates the maximum number of parameters supported by FastNew.CreateInstance
<FastNew_PublicFastNewCore>false</FastNew_PublicFastNewCore>
Type: Boolean
Default:false
Indicates whether internal classes FastNew<...>
should be marked as public or internal
<FastNew_PublicFastNew>false</FastNew_PublicFastNew>
Type: Boolean
Default:false
Indicates whether FastNew
class should be marked as public or internal
<FastNew_GenerateCreateInstance>true</FastNew_GenerateCreateInstance>
Type: Boolean
Default:true
Indicates whether FastNew.CreateInstance
should be generated
<FastNew_GenerateTryCreateInstance>true</FastNew_GenerateTryCreateInstance>
Type: Boolean
Default:true
Indicates whether FastNew.TryCreateInstance
should be generated
<FastNew_GenerateTypeCreateInstance>true</FastNew_GenerateTypeCreateInstance>
Type: Boolean
Default:true
Indicates whether FastNew.GetCreateInstance
should be generated
<FastNew_NonPublicConstructorSupport>true</FastNew_NonPublicConstructorSupport>
Type: Boolean
Default:true
Indicates whether CreateInstance
can use the non-public constructors.
This also affects trimmable related attributes.
<FastNew_Namespace>FastGenericNew</FastNew_Namespace>
Type: String
Default:FastGenericNew
Specifies the namespace of the generated code.
Could be set to %EMPTY%
to use global namespace (No namespace)
<FastNew_ForceFastNewDelegate>false</FastNew_ForceFastNewDelegate>
Type: Boolean
Default:false
Indicates whether FastGenericNew should create&use its own delegate even the corresponding Func<>
is available.
<FastNew_AlertGeneratedFile>true</FastNew_AlertGeneratedFile>
Type: Boolean
Default:true
Indicates whether FastGenericNew should write an alert in the header of generated files that the file is generated by SourceGenerator.
<FastNew_DisableGeneratorCache>false</FastNew_DisableGeneratorCache>
Type: Boolean
Default:false
Indicates whether FastGenericNew should disable the aggressive caching strategy.
This option doesn't affect the basic caching strategy of Incremental Generator.
<FastNew_PrettyOutput>false</FastNew_PrettyOutput>
Type: Boolean
Default:false
Indicates whether FastGenericNew should try to generate pretty code.
<FastNew_MultiThreadedGeneration>true</FastNew_MultiThreadedGeneration>
Type: Boolean
Default:true
Indicates whether FastGenericNew should run in parallel.
This can significantly improve build performance on a multi-core processor.
<FastNew_OutputGenerationInfo>false</FastNew_OutputGenerationInfo>
Type: Boolean
Default:false
Indicates whether FastGenericNew should generate a file that contains current SourceGenerator options.
This option is used to debug the library.
<FastNew_AllowUnsafeImplementation>false</FastNew_AllowUnsafeImplementation>
Type: Boolean
Default:false
Indicates whether FastGenericNew is allowed to use unsafe implementation.
Enables FastNew.CreateInstance<T>
to call CLR API RuntimeTypeHandle_GetActivationInfo
if available at runtime.
This can significantly improve first-call initialization speed (Almost the same as Activator
)
But may also slightly decrease the performance of FastNew.CreateInstance<T>
(about 1ns per call, still much faster than Activator
)