38 references to EnvironmentFlags
Microsoft.Interop.ComInterfaceGenerator (19)
ComInterfaceGeneratorHelpers.cs (7)
13
private static readonly IMarshallingGeneratorResolver s_managedToUnmanagedDisabledMarshallingGeneratorResolver = CreateGeneratorResolver(
EnvironmentFlags
.DisableRuntimeMarshalling, MarshalDirection.ManagedToUnmanaged);
14
private static readonly IMarshallingGeneratorResolver s_unmanagedToManagedDisabledMarshallingGeneratorResolver = CreateGeneratorResolver(
EnvironmentFlags
.DisableRuntimeMarshalling, MarshalDirection.UnmanagedToManaged);
15
private static readonly IMarshallingGeneratorResolver s_managedToUnmanagedEnabledMarshallingGeneratorResolver = CreateGeneratorResolver(
EnvironmentFlags
.None, MarshalDirection.ManagedToUnmanaged);
16
private static readonly IMarshallingGeneratorResolver s_unmanagedToManagedEnabledMarshallingGeneratorResolver = CreateGeneratorResolver(
EnvironmentFlags
.None, MarshalDirection.UnmanagedToManaged);
18
private static IMarshallingGeneratorResolver CreateGeneratorResolver(
EnvironmentFlags
env, MarshalDirection direction)
26
public static IMarshallingGeneratorResolver GetGeneratorResolver(
EnvironmentFlags
env, MarshalDirection direction)
27
=> (env.HasFlag(
EnvironmentFlags
.DisableRuntimeMarshalling), direction) switch
IncrementalMethodStubGenerationContext.cs (1)
20
EnvironmentFlags
EnvironmentFlags,
VirtualMethodPointerStubGenerator.cs (4)
25
Func<
EnvironmentFlags
, MarshalDirection, IMarshallingGeneratorResolver> generatorResolverCreator)
132
Func<
EnvironmentFlags
, MarshalDirection, IMarshallingGeneratorResolver> generatorResolverCreator)
237
Func<
EnvironmentFlags
, MarshalDirection, IMarshallingGeneratorResolver> generatorResolverCreator)
262
Func<
EnvironmentFlags
, MarshalDirection, IMarshallingGeneratorResolver> generatorResolverCreator)
VtableIndexStubGeneratorHelpers.cs (7)
13
private static readonly IMarshallingGeneratorResolver s_managedToUnmanagedDisabledMarshallingGeneratorResolver = CreateGeneratorResolver(
EnvironmentFlags
.DisableRuntimeMarshalling, MarshalDirection.ManagedToUnmanaged);
14
private static readonly IMarshallingGeneratorResolver s_unmanagedToManagedDisabledMarshallingGeneratorResolver = CreateGeneratorResolver(
EnvironmentFlags
.DisableRuntimeMarshalling, MarshalDirection.UnmanagedToManaged);
15
private static readonly IMarshallingGeneratorResolver s_managedToUnmanagedEnabledMarshallingGeneratorResolver = CreateGeneratorResolver(
EnvironmentFlags
.None, MarshalDirection.ManagedToUnmanaged);
16
private static readonly IMarshallingGeneratorResolver s_unmanagedToManagedEnabledMarshallingGeneratorResolver = CreateGeneratorResolver(
EnvironmentFlags
.None, MarshalDirection.UnmanagedToManaged);
18
private static IMarshallingGeneratorResolver CreateGeneratorResolver(
EnvironmentFlags
env, MarshalDirection direction)
24
public static IMarshallingGeneratorResolver GetGeneratorResolver(
EnvironmentFlags
env, MarshalDirection direction)
25
=> (env.HasFlag(
EnvironmentFlags
.DisableRuntimeMarshalling), direction) switch
Microsoft.Interop.LibraryImportGenerator (1)
LibraryImportGenerator.cs (1)
31
EnvironmentFlags
EnvironmentFlags,
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
DownlevelLibraryImportGenerator.cs (1)
30
EnvironmentFlags
EnvironmentFlags,
Microsoft.Interop.SourceGeneration (17)
CompilationExtensions.cs (5)
14
public static
EnvironmentFlags
GetEnvironmentFlags(this Compilation compilation)
16
EnvironmentFlags
flags =
EnvironmentFlags
.None;
19
flags |=
EnvironmentFlags
.SkipLocalsInit;
23
flags |=
EnvironmentFlags
.DisableRuntimeMarshalling;
IncrementalGeneratorInitializationContextExtensions.cs (5)
17
public static IncrementalValueProvider<
EnvironmentFlags
> CreateEnvironmentFlagsProvider(this IncrementalGeneratorInitializationContext context)
28
.Select((topLevelAttrs, ct) => !topLevelAttrs.IsEmpty ?
EnvironmentFlags
.SkipLocalsInit :
EnvironmentFlags
.None);
40
.Select((topLevelAttrs, ct) => !topLevelAttrs.IsEmpty ?
EnvironmentFlags
.DisableRuntimeMarshalling :
EnvironmentFlags
.None);
Marshalling\DefaultMarshallingGeneratorResolver.cs (5)
22
EnvironmentFlags
env,
30
new BlittableMarshallerResolver(env.HasFlag(
EnvironmentFlags
.DisableRuntimeMarshalling)),
48
env.HasFlag(
EnvironmentFlags
.DisableRuntimeMarshalling),
62
env.HasFlag(
EnvironmentFlags
.DisableRuntimeMarshalling),
75
new CharMarshallingGeneratorResolver(useBlittableMarshallerForUtf16: env.HasFlag(
EnvironmentFlags
.DisableRuntimeMarshalling), stringMarshallingAttribute),
SignatureContext.cs (1)
151
if (env.EnvironmentFlags.HasFlag(
EnvironmentFlags
.SkipLocalsInit))
StubEnvironment.cs (1)
19
EnvironmentFlags
EnvironmentFlags)