2 instantiations of ComInterfaceContext
Microsoft.Interop.ComInterfaceGenerator (2)
ComInterfaceContext.cs (2)
55
var baselessCtx = DiagnosticOr<ComInterfaceContext>.From(new
ComInterfaceContext
(iface, null, iface.Options) { IsExternallyDefined = iface.IsExternallyDefined });
79
var ctx = DiagnosticOr<ComInterfaceContext>.From(new
ComInterfaceContext
(iface, baseContext.Value, iface.Options) { IsExternallyDefined = iface.IsExternallyDefined });
29 references to ComInterfaceContext
Microsoft.Interop.ComInterfaceGenerator (29)
ComInterfaceAndMethodsContext.cs (1)
13
internal sealed record ComInterfaceAndMethodsContext(
ComInterfaceContext
Interface, SequenceEqualImmutableArray<ComMethodContext> Methods)
ComInterfaceContext.cs (13)
16
internal
ComInterfaceContext
? Base { get; init; }
20
private ComInterfaceContext(ComInterfaceInfo info,
ComInterfaceContext
? @base, ComInterfaceOptions options)
30
public static ImmutableArray<DiagnosticOr<
ComInterfaceContext
>> GetContexts(ImmutableArray<ComInterfaceInfo> data, CancellationToken _)
33
var accumulator = ImmutableArray.CreateBuilder<DiagnosticOr<
ComInterfaceContext
>>(data.Length);
38
Dictionary<string, DiagnosticOr<
ComInterfaceContext
>> nameToContextCache = new();
46
DiagnosticOr<
ComInterfaceContext
> AddContext(ComInterfaceInfo iface)
55
var baselessCtx = DiagnosticOr<
ComInterfaceContext
>.From(new ComInterfaceContext(iface, null, iface.Options) { IsExternallyDefined = iface.IsExternallyDefined });
60
DiagnosticOr<
ComInterfaceContext
> baseReturnedValue;
70
var diagnostic = DiagnosticOr<
ComInterfaceContext
>.From(
77
DiagnosticOr<
ComInterfaceContext
> baseContext = baseCachedValue ?? baseReturnedValue;
79
var ctx = DiagnosticOr<
ComInterfaceContext
>.From(new ComInterfaceContext(iface, baseContext.Value, iface.Options) { IsExternallyDefined = iface.IsExternallyDefined });
85
internal
ComInterfaceContext
GetTopLevelBase()
87
var
currBase = Base;
ComInterfaceGenerator.cs (3)
63
.SelectMany(
ComInterfaceContext
.GetContexts);
412
private static ImmutableArray<ComInterfaceAndMethodsContext> GroupComContextsForInterfaceGeneration(ImmutableArray<ComMethodContext> methods, ImmutableArray<
ComInterfaceContext
> interfaces, CancellationToken ct)
435
foreach (
var
iface in interfaces)
ComMethodContext.cs (12)
32
public sealed record Builder(
ComInterfaceContext
OriginalDeclaringInterface, ComMethodInfo MethodInfo, int Index);
38
ComInterfaceContext
OriginalDeclaringInterface,
39
ComInterfaceContext
OwningInterface,
51
public ComMethodContext(Builder builder,
ComInterfaceContext
owningInterface, IncrementalMethodStubGenerationContext generationContext)
62
public
ComInterfaceContext
OriginalDeclaringInterface => _state.OriginalDeclaringInterface;
64
public
ComInterfaceContext
OwningInterface => _state.OwningInterface;
157
public static List<(
ComInterfaceContext
OwningInterface, Builder Method)> CalculateAllMethods(IEnumerable<(
ComInterfaceContext
, SequenceEqualImmutableArray<ComMethodInfo>)> ifaceAndDeclaredMethods, CancellationToken _)
164
var allMethodsCache = new Dictionary<
ComInterfaceContext
, ImmutableArray<Builder>>();
165
var accumulator = new List<(
ComInterfaceContext
OwningInterface, Builder Method)>();
179
ImmutableArray<Builder> AddMethods(
ComInterfaceContext
iface, IEnumerable<ComMethodInfo> declaredMethods)
191
var
baseComIface = iface.Base;