From ffe7c65ca31bd692f6c12170a5149df9922b35b5 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Wed, 21 Jun 2023 14:19:49 -0700 Subject: [PATCH] Implement unidirectional GeneratedComInterface options (#87831) --- .../gen/ComInterfaceGenerator/ComClassGenerator.cs | 9 ++- .../ComInterfaceGenerator/ComInterfaceContext.cs | 6 +- .../ComInterfaceGenerator/ComInterfaceGenerator.cs | 83 +++++++++++++++------- .../ComInterfaceGenerator.csproj | 2 + .../gen/ComInterfaceGenerator/ComInterfaceInfo.cs | 58 +++++++++++++-- .../GeneratedComInterfaceAttributeData.cs | 13 +++- .../ComInterfaceGenerator/GeneratorDiagnostics.cs | 11 +++ .../ComInterfaceGenerator/Resources/Strings.resx | 68 ++++++++++-------- .../Resources/xlf/Strings.cs.xlf | 20 ++++++ .../Resources/xlf/Strings.de.xlf | 20 ++++++ .../Resources/xlf/Strings.es.xlf | 20 ++++++ .../Resources/xlf/Strings.fr.xlf | 20 ++++++ .../Resources/xlf/Strings.it.xlf | 20 ++++++ .../Resources/xlf/Strings.ja.xlf | 20 ++++++ .../Resources/xlf/Strings.ko.xlf | 20 ++++++ .../Resources/xlf/Strings.pl.xlf | 20 ++++++ .../Resources/xlf/Strings.pt-BR.xlf | 20 ++++++ .../Resources/xlf/Strings.ru.xlf | 20 ++++++ .../Resources/xlf/Strings.tr.xlf | 20 ++++++ .../Resources/xlf/Strings.zh-Hans.xlf | 20 ++++++ .../Resources/xlf/Strings.zh-Hant.xlf | 20 ++++++ .../ref/System.Runtime.InteropServices.cs | 13 +++- .../src/System.Runtime.InteropServices.csproj | 1 + .../Marshalling/ComInterfaceOptions.cs | 32 +++++++++ .../Marshalling/GeneratedComInterfaceAttribute.cs | 8 +++ .../CompileFails.cs | 2 + .../ComInterfaceGenerator.Unit.Tests/Compiles.cs | 5 ++ .../GeneratedComInterfaceAttributeProvider.cs | 27 +++++-- .../GeneratorKind.cs | 2 + 29 files changed, 528 insertions(+), 72 deletions(-) create mode 100644 src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/Marshalling/ComInterfaceOptions.cs diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComClassGenerator.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComClassGenerator.cs index 9a5f235..250ef20 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComClassGenerator.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComClassGenerator.cs @@ -49,9 +49,14 @@ namespace Microsoft.Interop ImmutableArray.Builder names = ImmutableArray.CreateBuilder(); foreach (INamedTypeSymbol iface in type.AllInterfaces) { - if (iface.GetAttributes().Any(attr => attr.AttributeClass?.ToDisplayString() == TypeNames.GeneratedComInterfaceAttribute)) + AttributeData? generatedComInterfaceAttribute = iface.GetAttributes().FirstOrDefault(attr => attr.AttributeClass?.ToDisplayString() == TypeNames.GeneratedComInterfaceAttribute); + if (generatedComInterfaceAttribute is not null) { - names.Add(iface.ToDisplayString()); + var attributeData = GeneratedComInterfaceCompilationData.GetDataFromAttribute(generatedComInterfaceAttribute); + if (attributeData.Options.HasFlag(ComInterfaceOptions.ManagedObjectWrapper)) + { + names.Add(iface.ToDisplayString()); + } } } diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceContext.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceContext.cs index 46040b4..0fc2d26 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceContext.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceContext.cs @@ -9,7 +9,7 @@ using Microsoft.CodeAnalysis; namespace Microsoft.Interop { - internal sealed record ComInterfaceContext(ComInterfaceInfo Info, ComInterfaceContext? Base) + internal sealed record ComInterfaceContext(ComInterfaceInfo Info, ComInterfaceContext? Base, ComInterfaceOptions Options) { /// /// Takes a list of ComInterfaceInfo, and creates a list of ComInterfaceContext. @@ -39,7 +39,7 @@ namespace Microsoft.Interop if (iface.BaseInterfaceKey is null) { - var baselessCtx = DiagnosticOr.From(new ComInterfaceContext(iface, null)); + var baselessCtx = DiagnosticOr.From(new ComInterfaceContext(iface, null, iface.Options)); nameToContextCache[iface.ThisInterfaceKey] = baselessCtx; return baselessCtx; } @@ -63,7 +63,7 @@ namespace Microsoft.Interop } DiagnosticOr baseContext = baseCachedValue ?? baseReturnedValue; Debug.Assert(baseContext.HasValue); - var ctx = DiagnosticOr.From(new ComInterfaceContext(iface, baseContext.Value)); + var ctx = DiagnosticOr.From(new ComInterfaceContext(iface, baseContext.Value, iface.Options)); nameToContextCache[iface.ThisInterfaceKey] = ctx; return ctx; } diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceGenerator.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceGenerator.cs index 4b25e43..9a97005 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceGenerator.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceGenerator.cs @@ -312,7 +312,7 @@ namespace Microsoft.Interop var declaringType = ManagedTypeInfo.CreateTypeInfoForTypeSymbol(symbol.ContainingType); - var virtualMethodIndexData = new VirtualMethodIndexData(index, ImplicitThisParameter: true, MarshalDirection.Bidirectional, true, ExceptionMarshalling.Com); + var virtualMethodIndexData = new VirtualMethodIndexData(index, ImplicitThisParameter: true, GetDirectionFromOptions(generatedComInterfaceAttributeData.Options), true, ExceptionMarshalling.Com); return new IncrementalMethodStubGenerationContext( signatureContext, @@ -330,6 +330,23 @@ namespace Microsoft.Interop ComInterfaceDispatchMarshallingInfo.Instance); } + private static MarshalDirection GetDirectionFromOptions(ComInterfaceOptions options) + { + if (options.HasFlag(ComInterfaceOptions.ManagedObjectWrapper | ComInterfaceOptions.ComObjectWrapper)) + { + return MarshalDirection.Bidirectional; + } + if (options.HasFlag(ComInterfaceOptions.ManagedObjectWrapper)) + { + return MarshalDirection.UnmanagedToManaged; + } + if (options.HasFlag(ComInterfaceOptions.ComObjectWrapper)) + { + return MarshalDirection.ManagedToUnmanaged; + } + throw new ArgumentOutOfRangeException(nameof(options), "No-wrapper options should have been filtered out before calling this method."); + } + private static ImmutableArray GroupComContextsForInterfaceGeneration(ImmutableArray methods, ImmutableArray interfaces, CancellationToken ct) { ct.ThrowIfCancellationRequested(); @@ -410,6 +427,11 @@ namespace Microsoft.Interop private static InterfaceDeclarationSyntax GenerateImplementationVTable(ComInterfaceAndMethodsContext interfaceMethods, CancellationToken _) { + if (!interfaceMethods.Interface.Options.HasFlag(ComInterfaceOptions.ManagedObjectWrapper)) + { + return ImplementationInterfaceTemplate; + } + const string vtableLocalName = "vtable"; var interfaceType = interfaceMethods.Interface.Info.Type; var interfaceMethodStubs = interfaceMethods.DeclaredMethods.Select(m => m.GenerationContext); @@ -573,8 +595,7 @@ namespace Microsoft.Interop private static ClassDeclarationSyntax GenerateInterfaceInformation(ComInterfaceInfo context, CancellationToken _) { - const string vtableFieldName = "_vtable"; - return InterfaceInformationTypeTemplate + ClassDeclarationSyntax interfaceInformationType = InterfaceInformationTypeTemplate .AddMembers( // public static System.Guid Iid { get; } = new(); PropertyDeclaration(ParseTypeName(TypeNames.System_Guid), "Iid") @@ -586,29 +607,41 @@ namespace Microsoft.Interop ImplicitObjectCreationExpression() .AddArgumentListArguments( Argument(CreateEmbeddedDataBlobCreationStatement(context.InterfaceId.ToByteArray()))))) - .WithSemicolonToken(Token(SyntaxKind.SemicolonToken)), - // private static void** _vtable; - FieldDeclaration(VariableDeclaration(VoidStarStarSyntax, SingletonSeparatedList(VariableDeclarator(vtableFieldName)))) - .AddModifiers(Token(SyntaxKind.PrivateKeyword), Token(SyntaxKind.StaticKeyword)), - // public static void* VirtualMethodTableManagedImplementation => _vtable != null ? _vtable : (_vtable = InterfaceImplementation.CreateManagedVirtualMethodTable()); - PropertyDeclaration(VoidStarStarSyntax, "ManagedVirtualMethodTable") - .AddModifiers(Token(SyntaxKind.PublicKeyword), Token(SyntaxKind.StaticKeyword)) - .WithExpressionBody( - ArrowExpressionClause( - ConditionalExpression( - BinaryExpression(SyntaxKind.NotEqualsExpression, - IdentifierName(vtableFieldName), - LiteralExpression(SyntaxKind.NullLiteralExpression)), - IdentifierName(vtableFieldName), - ParenthesizedExpression( - AssignmentExpression(SyntaxKind.SimpleAssignmentExpression, + .WithSemicolonToken(Token(SyntaxKind.SemicolonToken))); + + if (context.Options.HasFlag(ComInterfaceOptions.ManagedObjectWrapper)) + { + const string vtableFieldName = "_vtable"; + return interfaceInformationType.AddMembers( + // private static void** _vtable; + FieldDeclaration(VariableDeclaration(VoidStarStarSyntax, SingletonSeparatedList(VariableDeclarator(vtableFieldName)))) + .AddModifiers(Token(SyntaxKind.PrivateKeyword), Token(SyntaxKind.StaticKeyword)), + // public static void* VirtualMethodTableManagedImplementation => _vtable != null ? _vtable : (_vtable = InterfaceImplementation.CreateManagedVirtualMethodTable()); + PropertyDeclaration(VoidStarStarSyntax, "ManagedVirtualMethodTable") + .AddModifiers(Token(SyntaxKind.PublicKeyword), Token(SyntaxKind.StaticKeyword)) + .WithExpressionBody( + ArrowExpressionClause( + ConditionalExpression( + BinaryExpression(SyntaxKind.NotEqualsExpression, IdentifierName(vtableFieldName), - InvocationExpression( - MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, - IdentifierName("InterfaceImplementation"), - IdentifierName(CreateManagedVirtualFunctionTableMethodName)))))))) - .WithSemicolonToken(Token(SyntaxKind.SemicolonToken)) - ); + LiteralExpression(SyntaxKind.NullLiteralExpression)), + IdentifierName(vtableFieldName), + ParenthesizedExpression( + AssignmentExpression(SyntaxKind.SimpleAssignmentExpression, + IdentifierName(vtableFieldName), + InvocationExpression( + MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, + IdentifierName("InterfaceImplementation"), + IdentifierName(CreateManagedVirtualFunctionTableMethodName)))))))) + .WithSemicolonToken(Token(SyntaxKind.SemicolonToken))); + } + + return interfaceInformationType.AddMembers( + PropertyDeclaration(VoidStarStarSyntax, "ManagedVirtualMethodTable") + .AddModifiers(Token(SyntaxKind.PublicKeyword), Token(SyntaxKind.StaticKeyword)) + .WithExpressionBody(ArrowExpressionClause(LiteralExpression(SyntaxKind.NullLiteralExpression))) + .WithSemicolonToken(Token(SyntaxKind.SemicolonToken))); + static ExpressionSyntax CreateEmbeddedDataBlobCreationStatement(ReadOnlySpan bytes) { diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceGenerator.csproj b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceGenerator.csproj index c8d1f18..a8fb656 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceGenerator.csproj +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceGenerator.csproj @@ -10,6 +10,7 @@ Diagnostics in runtime use a different mechanism (docs/project/list-of-diagnostics.md) --> RS2008;$(NoWarn) cs + $(DefineConstants);MICROSOFT_INTEROP_COMINTERFACEGENERATOR @@ -18,6 +19,7 @@ + diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs index 4f207ce..30c0e66 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs @@ -22,6 +22,7 @@ namespace Microsoft.Interop ContainingSyntaxContext TypeDefinitionContext, ContainingSyntax ContainingSyntax, Guid InterfaceId, + ComInterfaceOptions Options, Location DiagnosticLocation) { public static DiagnosticOrInterfaceInfo From(INamedTypeSymbol symbol, InterfaceDeclarationSyntax syntax, StubEnvironment env, CancellationToken _) @@ -57,9 +58,15 @@ namespace Microsoft.Interop if (!TryGetBaseComInterface(symbol, syntax, out INamedTypeSymbol? baseSymbol, out DiagnosticInfo? baseDiagnostic)) return DiagnosticOrInterfaceInfo.From(baseDiagnostic); - if (!StringMarshallingIsValid(symbol, syntax, baseSymbol, out DiagnosticInfo? stringMarshallingDiagnostic)) + var interfaceAttributeData = GeneratedComInterfaceCompilationData.GetAttributeDataFromInterfaceSymbol(symbol); + var baseAttributeData = baseSymbol is not null ? GeneratedComInterfaceCompilationData.GetAttributeDataFromInterfaceSymbol(baseSymbol) : null; + + if (!StringMarshallingIsValid(symbol, syntax, interfaceAttributeData, baseAttributeData, out DiagnosticInfo? stringMarshallingDiagnostic)) return DiagnosticOrInterfaceInfo.From(stringMarshallingDiagnostic); + if (!OptionsAreValid(symbol, syntax, interfaceAttributeData, baseAttributeData, out DiagnosticInfo? optionsDiagnostic)) + return DiagnosticOrInterfaceInfo.From(optionsDiagnostic); + return DiagnosticOrInterfaceInfo.From( (new ComInterfaceInfo( ManagedTypeInfo.CreateTypeInfoForTypeSymbol(symbol), @@ -69,6 +76,7 @@ namespace Microsoft.Interop new ContainingSyntaxContext(syntax), new ContainingSyntax(syntax.Modifiers, syntax.Kind(), syntax.Identifier, syntax.TypeParameterList), guid ?? Guid.Empty, + interfaceAttributeData.Options, syntax.Identifier.GetLocation()), symbol)); } @@ -92,10 +100,10 @@ namespace Microsoft.Interop private static bool StringMarshallingIsValid( INamedTypeSymbol interfaceSymbol, InterfaceDeclarationSyntax syntax, - INamedTypeSymbol? baseInterfaceSymbol, + GeneratedComInterfaceCompilationData attrSymbolInfo, + GeneratedComInterfaceCompilationData? baseAttrInfo, [NotNullWhen(false)] out DiagnosticInfo? stringMarshallingDiagnostic) { - var attrSymbolInfo = GeneratedComInterfaceCompilationData.GetAttributeDataFromInterfaceSymbol(interfaceSymbol); var attrInfo = GeneratedComInterfaceData.From(attrSymbolInfo); if (attrInfo.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshalling) || attrInfo.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshallingCustomType)) { @@ -130,12 +138,12 @@ namespace Microsoft.Interop return false; } } - if (baseInterfaceSymbol is not null) + if (baseAttrInfo is not null) { - var baseAttrInfo = GeneratedComInterfaceData.From(GeneratedComInterfaceCompilationData.GetAttributeDataFromInterfaceSymbol(baseInterfaceSymbol)); + var baseAttr = GeneratedComInterfaceData.From(baseAttrInfo); // The base can be undefined string marshalling - if ((baseAttrInfo.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshalling) || baseAttrInfo.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshallingCustomType)) - && baseAttrInfo != attrInfo) + if ((baseAttr.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshalling) || baseAttr.IsUserDefined.HasFlag(InteropAttributeMember.StringMarshallingCustomType)) + && (baseAttr.StringMarshalling, baseAttr.StringMarshallingCustomType) != (attrInfo.StringMarshalling, attrInfo.StringMarshallingCustomType)) { stringMarshallingDiagnostic = DiagnosticInfo.Create( GeneratorDiagnostics.InvalidStringMarshallingMismatchBetweenBaseAndDerived, @@ -149,6 +157,42 @@ namespace Microsoft.Interop return true; } + private static bool OptionsAreValid( + INamedTypeSymbol interfaceSymbol, + InterfaceDeclarationSyntax syntax, + GeneratedComInterfaceCompilationData attrSymbolInfo, + GeneratedComInterfaceCompilationData? baseAttrInfo, + [NotNullWhen(false)] out DiagnosticInfo? optionsDiagnostic) + { + var attrInfo = GeneratedComInterfaceData.From(attrSymbolInfo); + if (attrInfo.Options == ComInterfaceOptions.None) + { + optionsDiagnostic = DiagnosticInfo.Create( + GeneratorDiagnostics.InvalidOptionsOnInterface, + syntax.Identifier.GetLocation(), + interfaceSymbol.ToDisplayString(), + SR.OneWrapperMustBeGenerated); + return false; + } + if (baseAttrInfo is not null) + { + var baseAttr = GeneratedComInterfaceData.From(baseAttrInfo); + // The base type must specify at least the same wrappers as the derived type. + if ((attrInfo.Options.HasFlag(ComInterfaceOptions.ManagedObjectWrapper) && !baseAttr.Options.HasFlag(ComInterfaceOptions.ManagedObjectWrapper)) + || (attrInfo.Options.HasFlag(ComInterfaceOptions.ManagedObjectWrapper) && !baseAttr.Options.HasFlag(ComInterfaceOptions.ComObjectWrapper))) + { + optionsDiagnostic = DiagnosticInfo.Create( + GeneratorDiagnostics.InvalidOptionsOnInterface, + syntax.Identifier.GetLocation(), + interfaceSymbol.ToDisplayString(), + SR.BaseInterfaceMustGenerateAtLeastSameWrappers); + return false; + } + } + optionsDiagnostic = null; + return true; + } + /// /// Returns true if there is 0 or 1 base Com interfaces (i.e. the inheritance is valid), and returns false when there are 2 or more base Com interfaces and sets . /// diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratedComInterfaceAttributeData.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratedComInterfaceAttributeData.cs index 36095b7..b062e24 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratedComInterfaceAttributeData.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratedComInterfaceAttributeData.cs @@ -14,6 +14,7 @@ namespace Microsoft.Interop /// internal sealed record GeneratedComInterfaceData : InteropAttributeData { + public ComInterfaceOptions Options { get; init; } public static GeneratedComInterfaceData From(GeneratedComInterfaceCompilationData generatedComInterfaceAttr) => new GeneratedComInterfaceData() with { @@ -22,7 +23,8 @@ namespace Microsoft.Interop StringMarshalling = generatedComInterfaceAttr.StringMarshalling, StringMarshallingCustomType = generatedComInterfaceAttr.StringMarshallingCustomType is not null ? ManagedTypeInfo.CreateTypeInfoForTypeSymbol(generatedComInterfaceAttr.StringMarshallingCustomType) - : null + : null, + Options = generatedComInterfaceAttr.Options }; } @@ -32,6 +34,8 @@ namespace Microsoft.Interop /// internal sealed record GeneratedComInterfaceCompilationData : InteropAttributeCompilationData { + public ComInterfaceOptions Options { get; init; } = ComInterfaceOptions.ManagedObjectWrapper | ComInterfaceOptions.ComObjectWrapper; + public static bool TryGetGeneratedComInterfaceAttributeFromInterface(INamedTypeSymbol interfaceSymbol, [NotNullWhen(true)] out AttributeData? generatedComInterfaceAttribute) { generatedComInterfaceAttribute = null; @@ -59,6 +63,13 @@ namespace Microsoft.Interop var generatedComInterfaceAttributeData = new GeneratedComInterfaceCompilationData(); var args = attr.NamedArguments.ToImmutableDictionary(); generatedComInterfaceAttributeData = generatedComInterfaceAttributeData.WithValuesFromNamedArguments(args); + if (args.TryGetValue(nameof(Options), out var options)) + { + generatedComInterfaceAttributeData = generatedComInterfaceAttributeData with + { + Options = (ComInterfaceOptions)options.Value + }; + } return generatedComInterfaceAttributeData; } } diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs index 1944f4c..8727a53 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs @@ -97,6 +97,17 @@ namespace Microsoft.Interop isEnabledByDefault: true, description: GetResourceString(nameof(SR.GeneratedComInterfaceStringMarshallingMustMatchBase))); + /// + public static readonly DiagnosticDescriptor InvalidOptionsOnInterface = + new DiagnosticDescriptor( + Ids.InvalidGeneratedComInterfaceAttributeUsage, + GetResourceString(nameof(SR.InvalidGeneratedComInterfaceAttributeUsageTitle)), + GetResourceString(nameof(SR.InvalidOptionsOnInterfaceMessage)), + Category, + DiagnosticSeverity.Error, + isEnabledByDefault: true, + description: GetResourceString(nameof(SR.InvalidOptionsOnInterfaceDescription))); + /// public static readonly DiagnosticDescriptor InvalidStringMarshallingConfigurationOnMethod = new DiagnosticDescriptor( diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/Strings.resx b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/Strings.resx index 576a94a..04e1f42 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/Strings.resx +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/Strings.resx @@ -1,17 +1,17 @@  - @@ -377,4 +377,16 @@ Declaring an instance property in a type with the 'GeneratedComInterfaceAttribute' is not supported - + + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. + + + The specified 'ComInterfaceOptions' are invalid. + + + The specified 'ComInterfaceOptions' on '{0}' are invalid. {1} + + + Either 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' must be specified. + + \ No newline at end of file diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.cs.xlf b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.cs.xlf index 1f2c366..0093b3a 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.cs.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.cs.xlf @@ -57,6 +57,11 @@ Základnímu rozhraní COM se nepodařilo vygenerovat zdroj. Kód se pro toto rozhraní nevygeneruje. + + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. + + Casting between a 'ComImport' type and a source-generated COM type is not supported and will fail at runtime Převod mezi typem „ComImport“ a typem COM generovaným zdrojem není podporováno a za běhu selže. @@ -297,6 +302,16 @@ V rozhraní „{0}“ nebo jednom z jeho obsahujících typů chybí klíčové slovo „partial“. Pro „{0}“ se nevygeneruje kód. + + The specified 'ComInterfaceOptions' are invalid. + The specified 'ComInterfaceOptions' are invalid. + + + + The specified 'ComInterfaceOptions' on '{0}' are invalid. {1} + The specified 'ComInterfaceOptions' on '{0}' are invalid. {1} + + The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid. Konfigurace StringMarshalling a StringMarshallingCustomType je neplatná. @@ -357,6 +372,11 @@ Zadané rozhraní je odvozeno ze dvou nebo více rozhraní s atributem GeneratedComInterfaceAttribute. + + Either 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' must be specified. + Either 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' must be specified. + + 'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. GeneratedComInterfaceAttribute a GeneratedComClassAttribute vyžadují nebezpečný kód. Projekt se musí aktualizovat na <AllowUnsafeBlocks>true</AllowUnsafeBlocks>. diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.de.xlf b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.de.xlf index 1d7059d..a44b2ac 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.de.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.de.xlf @@ -57,6 +57,11 @@ Die Basis-COM-Schnittstelle konnte die Quelle nicht generieren. Für diese Schnittstelle wird kein Code generiert. + + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. + + Casting between a 'ComImport' type and a source-generated COM type is not supported and will fail at runtime Die Umwandlung zwischen einem ComImport-Typ und einem quellgenerierten COM-Typ wird nicht unterstützt und wird zur Laufzeit fehlschlagen. @@ -297,6 +302,16 @@ In der Schnittstelle "{0}" oder einem der enthaltenden Typen fehlt das Schlüsselwort "Partiell". Für "{0}" wird kein Code generiert. + + The specified 'ComInterfaceOptions' are invalid. + The specified 'ComInterfaceOptions' are invalid. + + + + The specified 'ComInterfaceOptions' on '{0}' are invalid. {1} + The specified 'ComInterfaceOptions' on '{0}' are invalid. {1} + + The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid. Die Konfiguration von \"StringMarshalling\" und \"StringMarshallingCustomType\" ist ungültig. @@ -357,6 +372,11 @@ Die angegebene Schnittstelle wird von mindestens zwei Schnittstellen abgeleitet, die "GeneratedComInterfaceAttribute" zugeordnet sind. + + Either 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' must be specified. + Either 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' must be specified. + + 'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. 'GeneratedComInterfaceAttribute' und 'GeneratedComClassAttribute' erfordern unsicheren Code. Das Projekt muss mit '<AllowUnsafeBlocks>wahr</AllowUnsafeBlocks>' aktualisiert werden. diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.es.xlf b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.es.xlf index 0060645..e881ba2 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.es.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.es.xlf @@ -57,6 +57,11 @@ La interfaz COM base no pudo generar el origen. No se generará código para esta interfaz. + + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. + + Casting between a 'ComImport' type and a source-generated COM type is not supported and will fail at runtime No se admite la conversión entre un tipo "ComImport" y un tipo COM generado por el origen y se producirá un error en tiempo de ejecución. @@ -297,6 +302,16 @@ Falta la palabra clave 'partial' en la interfaz '{0}' o en uno de sus tipos contenedores. No se generará código para '{0}'. + + The specified 'ComInterfaceOptions' are invalid. + The specified 'ComInterfaceOptions' are invalid. + + + + The specified 'ComInterfaceOptions' on '{0}' are invalid. {1} + The specified 'ComInterfaceOptions' on '{0}' are invalid. {1} + + The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid. La configuración de “StringMarshalling” y “StringMarshallingCustomType” no es válida. @@ -357,6 +372,11 @@ La interfaz especificada deriva de dos o más interfaces con atributos "GeneratedComInterfaceAttribute". + + Either 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' must be specified. + Either 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' must be specified. + + 'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. "GeneratedComInterfaceAttribute" y "GeneratedComClassAttribute" requieren código no seguro. El proyecto debe actualizarse con "<AllowUnsafeBlocks>true</AllowUnsafeBlocks>". diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.fr.xlf b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.fr.xlf index 04c1fab..832ad7d 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.fr.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.fr.xlf @@ -57,6 +57,11 @@ L’interface COM de base n’a pas réussi à générer le code source. Le code ne sera pas généré pour cette interface. + + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. + + Casting between a 'ComImport' type and a source-generated COM type is not supported and will fail at runtime La conversion entre un type 'ComImport' et un type COM généré par la source n’est pas prise en charge et échouera au moment de l’exécution. @@ -297,6 +302,16 @@ Le mot clé 'partial' est manquant dans l’interface '{0}' ou l’un de ses types conteneurs. Le code ne sera pas généré pour '{0}'. + + The specified 'ComInterfaceOptions' are invalid. + The specified 'ComInterfaceOptions' are invalid. + + + + The specified 'ComInterfaceOptions' on '{0}' are invalid. {1} + The specified 'ComInterfaceOptions' on '{0}' are invalid. {1} + + The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid. La configuration de « StringMarshalling » et de « StringMarshallingCustomType » n’est pas valide. @@ -357,6 +372,11 @@ L’interface spécifiée dérive de deux ou plusieurs interfaces avec attribut 'GeneratedComInterfaceAttribute'. + + Either 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' must be specified. + Either 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' must be specified. + + 'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. « GeneratedComInterfaceAttribute » et « GeneratedComClassAttribute » nécessitent du code non sécurisé. Le projet doit être mis à jour avec « <AllowUnsafeBlocks>true</AllowUnsafeBlocks> ». diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.it.xlf b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.it.xlf index 35a7dac..6615062 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.it.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.it.xlf @@ -57,6 +57,11 @@ L'interfaccia COM di base non è riuscita a generare l'origine. Il codice non verrà generato per questa interfaccia. + + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. + + Casting between a 'ComImport' type and a source-generated COM type is not supported and will fail at runtime Il cast tra un tipo 'ComImport' e un tipo COM generato dall'origine non è supportato e avrà esito negativo in fase di esecuzione @@ -297,6 +302,16 @@ Nell'interfaccia '{0}' o in uno dei tipi che lo contengono manca la parola chiave 'partial'. Il codice non verrà generato per '{0}'. + + The specified 'ComInterfaceOptions' are invalid. + The specified 'ComInterfaceOptions' are invalid. + + + + The specified 'ComInterfaceOptions' on '{0}' are invalid. {1} + The specified 'ComInterfaceOptions' on '{0}' are invalid. {1} + + The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid. La configurazione di 'StringMarshalling' e 'StringMarshallingCustomType' non è valida. @@ -357,6 +372,11 @@ L'interfaccia specificata deriva da due o più interfacce con attributi 'GeneratedComInterfaceAttribute'. + + Either 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' must be specified. + Either 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' must be specified. + + 'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. GeneratedComInterfaceAttribute e 'GeneratedComClassAttribute' richiedono codice non gestito. Il progetto deve essere aggiornato con '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.ja.xlf b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.ja.xlf index 2c7c7bf..957e4fb 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.ja.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.ja.xlf @@ -57,6 +57,11 @@ ベース COM インターフェイスはソースを生成できませんでした。このインターフェイスのコードは生成されません。 + + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. + + Casting between a 'ComImport' type and a source-generated COM type is not supported and will fail at runtime 'ComImport' 型とソース生成 COM 型の間でのキャストはサポートされていないため、実行時に失敗します @@ -297,6 +302,16 @@ インターフェイス '{0}' またはそのインターフェイスを含む型の 1 つに 'partial' キーワード (keyword) がありません。'{0}'のコードは生成されません。 + + The specified 'ComInterfaceOptions' are invalid. + The specified 'ComInterfaceOptions' are invalid. + + + + The specified 'ComInterfaceOptions' on '{0}' are invalid. {1} + The specified 'ComInterfaceOptions' on '{0}' are invalid. {1} + + The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid. 'StringMarshalling' と 'StringMarshallingCustomType' の構成が無効です。 @@ -357,6 +372,11 @@ 指定されたインターフェイスは、2 つ以上の 'GeneratedComInterfaceAttribute' 属性インターフェイスから派生しています。 + + Either 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' must be specified. + Either 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' must be specified. + + 'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. 'GeneratedComInterfaceAttribute' および 'GeneratedComClassAttribute' にはアンセーフ コードが必要です。プロジェクトは '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>' で更新する必要があります。 diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.ko.xlf b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.ko.xlf index 691b3bd..c76909c 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.ko.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.ko.xlf @@ -57,6 +57,11 @@ 베이스 COM 인터페이스에서 소스를 생성하지 못했습니다. 이 인터페이스에 대한 코드가 생성되지 않습니다. + + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. + + Casting between a 'ComImport' type and a source-generated COM type is not supported and will fail at runtime 'ComImport' 형식과 소스 생성 COM 형식 간의 캐스팅은 지원되지 않으며 런타임에 실패합니다. @@ -297,6 +302,16 @@ '{0}' 인터페이스 또는 해당 포함된 형식 중 하나에 'partial' 키워드가 없습니다. '{0}'에 대한 코드가 생성되지 않습니다. + + The specified 'ComInterfaceOptions' are invalid. + The specified 'ComInterfaceOptions' are invalid. + + + + The specified 'ComInterfaceOptions' on '{0}' are invalid. {1} + The specified 'ComInterfaceOptions' on '{0}' are invalid. {1} + + The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid. 'StringMarshalling' 및 'StringMarshallingCustomType'의 구성이 잘못되었습니다. @@ -357,6 +372,11 @@ 지정한 인터페이스는 두 개 이상의 'GeneratedComInterfaceAttribute' 특성 인터페이스에서 파생됩니다. + + Either 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' must be specified. + Either 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' must be specified. + + 'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. 'GeneratedComInterfaceAttribute' 및 'GeneratedComClassAttribute'에는 안전하지 않은 코드가 필요합니다. 프로젝트를 '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'로 업데이트해야 합니다. diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.pl.xlf b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.pl.xlf index 15c6aac..2d4af70 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.pl.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.pl.xlf @@ -57,6 +57,11 @@ Podstawowy interfejs COM nie może wygenerować źródła. Kod nie zostanie wygenerowany dla tego interfejsu. + + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. + + Casting between a 'ComImport' type and a source-generated COM type is not supported and will fail at runtime Rzutowanie między typem „ComImport” i wygenerowanym przez źródło typem COM nie jest obsługiwane i zakończy się niepowodzeniem w czasie wykonywania @@ -297,6 +302,16 @@ W interfejsie „{0}” lub jednym z jego typów zawierających brakuje słowa kluczowego „partial”. Kod nie zostanie wygenerowany dla „{0}”. + + The specified 'ComInterfaceOptions' are invalid. + The specified 'ComInterfaceOptions' are invalid. + + + + The specified 'ComInterfaceOptions' on '{0}' are invalid. {1} + The specified 'ComInterfaceOptions' on '{0}' are invalid. {1} + + The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid. Konfiguracja elementów „StringMarshalling” i „StringMarshallingCustomType” jest nieprawidłowa. @@ -357,6 +372,11 @@ Określony interfejs pochodzi z co najmniej dwóch interfejsów z atrybutem „GeneratedComInterfaceAttribute”. + + Either 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' must be specified. + Either 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' must be specified. + + 'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. Atrybut „GeneratedComInterfaceAttribute” i „GeneratedComClassAttribute” wymagają niebezpiecznego kodu. Projekt musi zostać zaktualizowany za pomocą polecenia „<AllowUnsafeBlocks>true</AllowUnsafeBlocks>”. diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.pt-BR.xlf b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.pt-BR.xlf index 88aefa4..4c0e853 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.pt-BR.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.pt-BR.xlf @@ -57,6 +57,11 @@ A interface COM base falhou ao gerar a fonte. O código não será gerado para esta interface. + + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. + + Casting between a 'ComImport' type and a source-generated COM type is not supported and will fail at runtime A conversão entre um tipo 'ComImport' e um tipo COM gerado pela fonte não é suportada e falhará no tempo de execução @@ -297,6 +302,16 @@ A interface '{0}' ou um de seus tipos contém a palavra-chave 'parcial' ausente. O código não será gerado para '{0}'. + + The specified 'ComInterfaceOptions' are invalid. + The specified 'ComInterfaceOptions' are invalid. + + + + The specified 'ComInterfaceOptions' on '{0}' are invalid. {1} + The specified 'ComInterfaceOptions' on '{0}' are invalid. {1} + + The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid. A configuração de 'StringMarshalling' e 'StringMarshallingCustomType' é inválida. @@ -357,6 +372,11 @@ A interface especificada deriva de duas ou mais interfaces atribuídas a 'GeneratedComInterfaceAttribute'. + + Either 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' must be specified. + Either 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' must be specified. + + 'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. "GeneratedComInterfaceAttribute" e "GeneratedComClassAttribute" exigem código não seguro. O projeto deve ser atualizado com "<AllowUnsafeBlocks>true</AllowUnsafeBlocks>". diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.ru.xlf b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.ru.xlf index bc06648..9ea5b4e 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.ru.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.ru.xlf @@ -57,6 +57,11 @@ Базовому COM-интерфейсу не удалось создать источник. Код не будет создан для этого интерфейса. + + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. + + Casting between a 'ComImport' type and a source-generated COM type is not supported and will fail at runtime Приведение типа "ComImport" к типу COM, созданному источником, не поддерживается и завершится ошибкой во время выполнения. @@ -297,6 +302,16 @@ В интерфейсе "{0}" или одном из его содержащих типов отсутствует ключевое слово "partial". Код не будет создан для "{0}". + + The specified 'ComInterfaceOptions' are invalid. + The specified 'ComInterfaceOptions' are invalid. + + + + The specified 'ComInterfaceOptions' on '{0}' are invalid. {1} + The specified 'ComInterfaceOptions' on '{0}' are invalid. {1} + + The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid. Конфигурация \"StringMarshalling\" и \"StringMarshallingCustomType\" недопустима. @@ -357,6 +372,11 @@ Указанный интерфейс является производным от двух или более интерфейсов с атрибутом "GeneratedComInterfaceAttribute". + + Either 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' must be specified. + Either 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' must be specified. + + 'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. Для "GeneratedComInterfaceAttribute" и "GeneratedComClassAttribute" требуется небезопасный код. Проект необходимо обновить с использованием значения "<AllowUnsafeBlocks>true</AllowUnsafeBlocks>". diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.tr.xlf b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.tr.xlf index 6121d74..efa75b3 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.tr.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.tr.xlf @@ -57,6 +57,11 @@ Temel COM arabirimi, kaynak oluşturamadı. Bu arabirim için kod oluşturulmayacak. + + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. + + Casting between a 'ComImport' type and a source-generated COM type is not supported and will fail at runtime 'ComImport' türü ile kaynak tarafından oluşturulan COM türü arasında dönüştürme desteklenmiyor ve çalışma zamanında başarısız olacak @@ -297,6 +302,16 @@ '{0}' arabirimi veya kapsayan türlerden birinde 'partial' anahtar sözcüğü eksik. '{0}' için kod üretilmeyecek. + + The specified 'ComInterfaceOptions' are invalid. + The specified 'ComInterfaceOptions' are invalid. + + + + The specified 'ComInterfaceOptions' on '{0}' are invalid. {1} + The specified 'ComInterfaceOptions' on '{0}' are invalid. {1} + + The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid. 'StringMarshalling' ve 'StringMarshallingCustomType' yapılandırması geçersiz. @@ -357,6 +372,11 @@ Belirtilen arabirim 'GeneratedComInterfaceAttribute' özniteliğine sahip iki veya daha fazla arabirimden türetildi. + + Either 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' must be specified. + Either 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' must be specified. + + 'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. 'GeneratedComInterfaceAttribute' ve 'GeneratedComClassAttribute' güvenli olmayan kod gerektiriyor. Projenin '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>' ile güncelleştirilmiş olması gerekiyor. diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.zh-Hans.xlf b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.zh-Hans.xlf index d9dc987..fae9234 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.zh-Hans.xlf @@ -57,6 +57,11 @@ 基本 COM 接口无法生成源。不会为此接口生成代码。 + + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. + + Casting between a 'ComImport' type and a source-generated COM type is not supported and will fail at runtime 不支持在“ComImport”类型和源生成的 COM 类型之间强制转换,并且会在运行时失败 @@ -297,6 +302,16 @@ 接口“{0}”或其包含类型之一缺少“partial”关键字。不会为“{0}”生成代码。 + + The specified 'ComInterfaceOptions' are invalid. + The specified 'ComInterfaceOptions' are invalid. + + + + The specified 'ComInterfaceOptions' on '{0}' are invalid. {1} + The specified 'ComInterfaceOptions' on '{0}' are invalid. {1} + + The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid. “StringMarshalling” 和 “StringMarshallingCustomType” 的配置无效。 @@ -357,6 +372,11 @@ 指定的接口派生自两个或更多“GeneratedComInterfaceAttribute”特性化接口。 + + Either 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' must be specified. + Either 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' must be specified. + + 'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. “GeneratedComInterfaceAttribute”和“GeneratedComClassAttribute”需要不安全代码。必须将项目更新为“<AllowUnsafeBlocks>true</AllowUnsafeBlocks>”。 diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.zh-Hant.xlf b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.zh-Hant.xlf index a3d4669..f9d90ed 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/Resources/xlf/Strings.zh-Hant.xlf @@ -57,6 +57,11 @@ 基底 COM 介面無法產生來源。將不會產生此介面的程式碼。 + + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. + + Casting between a 'ComImport' type and a source-generated COM type is not supported and will fail at runtime 不支援在 'ComImport' 類型與來源產生的 COM 類型之間轉換,且將在執行階段失敗 @@ -297,6 +302,16 @@ 介面 '{0}' 或其中一個包含類型的介面遺漏 'partial' 關鍵字。將不會為 '{0}' 產生程式碼。 + + The specified 'ComInterfaceOptions' are invalid. + The specified 'ComInterfaceOptions' are invalid. + + + + The specified 'ComInterfaceOptions' on '{0}' are invalid. {1} + The specified 'ComInterfaceOptions' on '{0}' are invalid. {1} + + The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid. 'StringMarshalling' 和 'StringMarshallingCustomType' 的設定無效。 @@ -357,6 +372,11 @@ 指定的介面衍生自兩個或兩個以上的 'GeneratedComInterfaceAttribute'-屬性介面。 + + Either 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' must be specified. + Either 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' must be specified. + + 'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. 'GeneratedComInterfaceAttribute' 和 'GeneratedComClassAttribute' 需要不安全的程式碼。專案必須以 '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>' 更新。 diff --git a/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs b/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs index 24fb2b3..5ece7af 100644 --- a/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs +++ b/src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs @@ -344,6 +344,14 @@ namespace System.Runtime.InteropServices.Marshalling public static T? ConvertToManaged(void* unmanaged) { throw null; } public static void Free(void* unmanaged) { } } + [System.Flags] + public enum ComInterfaceOptions + { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + None = 0, + ManagedObjectWrapper = 0x1, + ComObjectWrapper = 0x2, + } public sealed partial class ComObject : System.Runtime.InteropServices.IDynamicInterfaceCastable, System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider { internal ComObject() { } @@ -382,8 +390,9 @@ namespace System.Runtime.InteropServices.Marshalling public partial class GeneratedComInterfaceAttribute : System.Attribute { public GeneratedComInterfaceAttribute() { } - public StringMarshalling StringMarshalling { get { throw null; } set { } } - public Type? StringMarshallingCustomType { get { throw null; } set { } } + public System.Runtime.InteropServices.Marshalling.ComInterfaceOptions Options { get { throw null; } set { } } + public System.Runtime.InteropServices.StringMarshalling StringMarshalling { get { throw null; } set { } } + public System.Type? StringMarshallingCustomType { get { throw null; } set { } } } [System.CLSCompliantAttribute(false)] public partial interface IComExposedClass diff --git a/src/libraries/System.Runtime.InteropServices/src/System.Runtime.InteropServices.csproj b/src/libraries/System.Runtime.InteropServices/src/System.Runtime.InteropServices.csproj index c92594f..adc4319 100644 --- a/src/libraries/System.Runtime.InteropServices/src/System.Runtime.InteropServices.csproj +++ b/src/libraries/System.Runtime.InteropServices/src/System.Runtime.InteropServices.csproj @@ -32,6 +32,7 @@ + diff --git a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/Marshalling/ComInterfaceOptions.cs b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/Marshalling/ComInterfaceOptions.cs new file mode 100644 index 0000000..b7df973 --- /dev/null +++ b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/Marshalling/ComInterfaceOptions.cs @@ -0,0 +1,32 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +using System; +using System.ComponentModel; + +#if MICROSOFT_INTEROP_COMINTERFACEGENERATOR +namespace Microsoft.Interop +#else +namespace System.Runtime.InteropServices.Marshalling +#endif +{ + /// + /// Options for how to generate COM interface interop with the COM interop source generator. + /// + [Flags] + public enum ComInterfaceOptions + { + /// + /// No options specified. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + None = 0, + /// + /// Generate a wrapper for managed objects to enable exposing them through the COM interface. + /// + ManagedObjectWrapper = 0x1, + /// + /// Generate a wrapper for COM objects to enable exposing them through the managed interface. + /// + ComObjectWrapper = 0x2, + } +} diff --git a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/Marshalling/GeneratedComInterfaceAttribute.cs b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/Marshalling/GeneratedComInterfaceAttribute.cs index cbe1a15..8c9ffc7 100644 --- a/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/Marshalling/GeneratedComInterfaceAttribute.cs +++ b/src/libraries/System.Runtime.InteropServices/src/System/Runtime/InteropServices/Marshalling/GeneratedComInterfaceAttribute.cs @@ -7,6 +7,14 @@ namespace System.Runtime.InteropServices.Marshalling public class GeneratedComInterfaceAttribute : Attribute { /// + /// Options for how to generate COM interface interop with the COM interop source generator. + /// + /// + /// The default options generate both a managed object wrapper and a COM object wrapper. + /// + public ComInterfaceOptions Options { get; set; } = ComInterfaceOptions.ManagedObjectWrapper | ComInterfaceOptions.ComObjectWrapper; + + /// /// Gets or sets how to marshal string arguments to all methods on the interface. /// If the attributed interface inherits from another interface with , /// it must have the same values for and . diff --git a/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/CompileFails.cs b/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/CompileFails.cs index ef4eea6..6414edf 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/CompileFails.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/CompileFails.cs @@ -58,6 +58,8 @@ namespace ComInterfaceGenerator.Unit.Tests => generator switch { GeneratorKind.VTableIndexStubGenerator => new VirtualMethodIndexAttributeProvider(), + GeneratorKind.ComInterfaceGeneratorManagedObjectWrapper => new GeneratedComInterfaceAttributeProvider(System.Runtime.InteropServices.Marshalling.ComInterfaceOptions.ManagedObjectWrapper), + GeneratorKind.ComInterfaceGeneratorComObjectWrapper => new GeneratedComInterfaceAttributeProvider(System.Runtime.InteropServices.Marshalling.ComInterfaceOptions.ComObjectWrapper), GeneratorKind.ComInterfaceGenerator => new GeneratedComInterfaceAttributeProvider(), _ => throw new UnreachableException(), }; diff --git a/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/Compiles.cs b/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/Compiles.cs index 3590d17..3d20f2a 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/Compiles.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/Compiles.cs @@ -24,6 +24,8 @@ namespace ComInterfaceGenerator.Unit.Tests => generator switch { GeneratorKind.VTableIndexStubGenerator => new VirtualMethodIndexAttributeProvider(), + GeneratorKind.ComInterfaceGeneratorManagedObjectWrapper => new GeneratedComInterfaceAttributeProvider(System.Runtime.InteropServices.Marshalling.ComInterfaceOptions.ManagedObjectWrapper), + GeneratorKind.ComInterfaceGeneratorComObjectWrapper => new GeneratedComInterfaceAttributeProvider(System.Runtime.InteropServices.Marshalling.ComInterfaceOptions.ComObjectWrapper), GeneratorKind.ComInterfaceGenerator => new GeneratedComInterfaceAttributeProvider(), _ => throw new UnreachableException(), }; @@ -340,6 +342,9 @@ namespace ComInterfaceGenerator.Unit.Tests [Theory] [MemberData(nameof(CodeSnippetsToCompile), GeneratorKind.ComInterfaceGenerator)] [MemberData(nameof(CustomCollections), GeneratorKind.ComInterfaceGenerator)] + [MemberData(nameof(ManagedToUnmanagedCodeSnippetsToCompile), GeneratorKind.ComInterfaceGeneratorComObjectWrapper)] + [MemberData(nameof(UnmanagedToManagedCodeSnippetsToCompile), GeneratorKind.ComInterfaceGeneratorManagedObjectWrapper)] + [MemberData(nameof(CustomCollectionsManagedToUnmanaged), GeneratorKind.ComInterfaceGeneratorComObjectWrapper)] [MemberData(nameof(ComInterfaceSnippetsToCompile))] public async Task ValidateComInterfaceSnippets(string id, string source) { diff --git a/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/GeneratedComInterfaceAttributeProvider.cs b/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/GeneratedComInterfaceAttributeProvider.cs index b1bcef7..4b7b96e 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/GeneratedComInterfaceAttributeProvider.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/GeneratedComInterfaceAttributeProvider.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections.Generic; using System.Runtime.InteropServices; using System.Runtime.InteropServices.Marshalling; @@ -9,6 +10,14 @@ namespace ComInterfaceGenerator.Unit.Tests { internal class GeneratedComInterfaceAttributeProvider : IComInterfaceAttributeProvider { + private ComInterfaceOptions? _options; + + public GeneratedComInterfaceAttributeProvider() + { + } + + public GeneratedComInterfaceAttributeProvider(ComInterfaceOptions options) => _options = options; + public string VirtualMethodIndex( int index, bool? ImplicitThisParameter = null, @@ -24,11 +33,21 @@ namespace ComInterfaceGenerator.Unit.Tests public string GeneratedComInterface(StringMarshalling? stringMarshalling = null, Type? stringMarshallingCustomType = null) { - string comma = stringMarshalling is not null && stringMarshallingCustomType is not null ? ", " : ""; + List arguments = new(); + if (stringMarshalling is not null) + { + arguments.Add($"StringMarshalling = {typeof(StringMarshalling).FullName}.{stringMarshalling!.Value}"); + } + if (stringMarshallingCustomType is not null) + { + arguments.Add($"StringMarshallingCustomType = typeof({stringMarshallingCustomType!.FullName})"); + } + if (_options is not null) + { + arguments.Add($"Options = (ComInterfaceOptions){_options.Value:D}"); + } return @$"[global::System.Runtime.InteropServices.Marshalling.GeneratedComInterface(" - + (stringMarshalling is not null ? $"StringMarshalling = {typeof(StringMarshalling).FullName}.{stringMarshalling!.Value}" : "") - + comma - + (stringMarshallingCustomType is not null ? $"StringMarshallingCustomType = typeof({stringMarshallingCustomType!.FullName})" : "") + + string.Join(", ", arguments) + @$"), global::System.Runtime.InteropServices.Guid(""0A52B77C-E08B-4274-A1F4-1A2BF2C07E60"")]"; } diff --git a/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/GeneratorKind.cs b/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/GeneratorKind.cs index f450942..b7a3a71 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/GeneratorKind.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/GeneratorKind.cs @@ -6,6 +6,8 @@ namespace ComInterfaceGenerator.Unit.Tests public enum GeneratorKind { ComInterfaceGenerator, + ComInterfaceGeneratorManagedObjectWrapper, + ComInterfaceGeneratorComObjectWrapper, VTableIndexStubGenerator } } -- 2.7.4