1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-10 01:50:53 +09:00

Add marshalling tests and warn if interface is not partial (#87146)

Adds tests that marshal different types to and from native, and adds a warning if the interface or any containing types are not marked partial.
This commit is contained in:
Jackson Schuster 2023-06-09 17:25:44 -05:00 committed by GitHub
parent 8f6af6e3d3
commit 6ea11b5578
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 828 additions and 122 deletions

View file

@ -208,10 +208,10 @@ The diagnostic id values reserved for .NET Libraries analyzer warnings are `SYSL
| __`SYSLIB1089`__ | _`SYSLIB1070`-`SYSLIB1089` reserved for System.Runtime.InteropServices.JavaScript.JSImportGenerator._ | | __`SYSLIB1089`__ | _`SYSLIB1070`-`SYSLIB1089` reserved for System.Runtime.InteropServices.JavaScript.JSImportGenerator._ |
| __`SYSLIB1090`__ | Invalid 'GeneratedComInterfaceAttribute' usage | | __`SYSLIB1090`__ | Invalid 'GeneratedComInterfaceAttribute' usage |
| __`SYSLIB1091`__ | Method is declared in different partial declaration than the 'GeneratedComInterface' attribute. | | __`SYSLIB1091`__ | Method is declared in different partial declaration than the 'GeneratedComInterface' attribute. |
| __`SYSLIB1092`__ | _`SYSLIB1092`-`SYSLIB1099` reserved for Microsoft.Interop.ComInteropGenerator._ | | __`SYSLIB1092`__ | Specified interface derives from two or more 'GeneratedComInterfaceAttribute'-attributed interfaces. |
| __`SYSLIB1093`__ | _`SYSLIB1092`-`SYSLIB1099` reserved for Microsoft.Interop.ComInteropGenerator._ | | __`SYSLIB1093`__ | Analysis for COM interface generation has failed |
| __`SYSLIB1094`__ | _`SYSLIB1092`-`SYSLIB1099` reserved for Microsoft.Interop.ComInteropGenerator._ | | __`SYSLIB1094`__ | The base COM interface failed to generate source. Code will not be generated for this interface. |
| __`SYSLIB1095`__ | _`SYSLIB1092`-`SYSLIB1099` reserved for Microsoft.Interop.ComInteropGenerator._ | | __`SYSLIB1095`__ | Invalid 'GeneratedComClassAttribute' usage |
| __`SYSLIB1096`__ | Use 'GeneratedComInterfaceAttribute' instead of 'ComImportAttribute' to generate COM marshalling code at compile time | | __`SYSLIB1096`__ | Use 'GeneratedComInterfaceAttribute' instead of 'ComImportAttribute' to generate COM marshalling code at compile time |
| __`SYSLIB1097`__ | This type implements at least one type with the 'GeneratedComInterfaceAttribute' attribute. Add the 'GeneratedComClassAttribute' to enable passing this type to COM and exposing the COM interfaces for the types with the 'GeneratedComInterfaceAttribute' from objects of this type. | | __`SYSLIB1097`__ | This type implements at least one type with the 'GeneratedComInterfaceAttribute' attribute. Add the 'GeneratedComClassAttribute' to enable passing this type to COM and exposing the COM interfaces for the types with the 'GeneratedComInterfaceAttribute' from objects of this type. |
| __`SYSLIB1098`__ | .NET COM hosting with 'EnableComHosting' only supports built-in COM interop. It does not support source-generated COM interop with 'GeneratedComInterfaceAttribute'. | | __`SYSLIB1098`__ | .NET COM hosting with 'EnableComHosting' only supports built-in COM interop. It does not support source-generated COM interop with 'GeneratedComInterfaceAttribute'. |

View file

@ -10,7 +10,6 @@ namespace Microsoft.Interop.Analyzers
public static class Ids public static class Ids
{ {
public const string Prefix = "SYSLIB"; public const string Prefix = "SYSLIB";
public const string InvalidGeneratedComAttributeUsage = Prefix + "1090";
public const string ConvertToGeneratedComInterface = Prefix + "1096"; public const string ConvertToGeneratedComInterface = Prefix + "1096";
public const string AddGeneratedComClassAttribute = Prefix + "1097"; public const string AddGeneratedComClassAttribute = Prefix + "1097";
public const string ComHostingDoesNotSupportGeneratedComInterface = Prefix + "1098"; public const string ComHostingDoesNotSupportGeneratedComInterface = Prefix + "1098";
@ -30,16 +29,6 @@ namespace Microsoft.Interop.Analyzers
return new LocalizableResourceString(resourceName, SR.ResourceManager, typeof(FxResources.Microsoft.Interop.ComInterfaceGenerator.SR)); return new LocalizableResourceString(resourceName, SR.ResourceManager, typeof(FxResources.Microsoft.Interop.ComInterfaceGenerator.SR));
} }
public static readonly DiagnosticDescriptor InterfaceTypeNotSupported =
new DiagnosticDescriptor(
Ids.InvalidGeneratedComAttributeUsage,
GetResourceString(nameof(SR.InterfaceTypeNotSupportedTitle)),
GetResourceString(nameof(SR.InterfaceTypeNotSupportedMessage)),
Category,
DiagnosticSeverity.Error,
isEnabledByDefault: true,
description: GetResourceString(nameof(SR.InterfaceTypeNotSupportedMessage)));
public static readonly DiagnosticDescriptor ConvertToGeneratedComInterface = public static readonly DiagnosticDescriptor ConvertToGeneratedComInterface =
new DiagnosticDescriptor( new DiagnosticDescriptor(
Ids.ConvertToGeneratedComInterface, Ids.ConvertToGeneratedComInterface,

View file

@ -18,7 +18,7 @@ namespace Microsoft.Interop.Analyzers
public class GeneratedComInterfaceAttributeAnalyzer : DiagnosticAnalyzer public class GeneratedComInterfaceAttributeAnalyzer : DiagnosticAnalyzer
{ {
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; }
= ImmutableArray.Create(AnalyzerDiagnostics.InterfaceTypeNotSupported); = ImmutableArray.Create(GeneratorDiagnostics.InterfaceTypeNotSupported);
public static readonly ImmutableArray<ComInterfaceType> SupportedComInterfaceTypes = ImmutableArray.Create(ComInterfaceType.InterfaceIsIUnknown); public static readonly ImmutableArray<ComInterfaceType> SupportedComInterfaceTypes = ImmutableArray.Create(ComInterfaceType.InterfaceIsIUnknown);
@ -41,7 +41,7 @@ namespace Microsoft.Interop.Analyzers
&& GetAttribute(typeSymbol, TypeNames.InterfaceTypeAttribute, out AttributeData? comInterfaceAttribute) && GetAttribute(typeSymbol, TypeNames.InterfaceTypeAttribute, out AttributeData? comInterfaceAttribute)
&& !InterfaceTypeAttributeIsSupported(comInterfaceAttribute, out string unsupportedValue)) && !InterfaceTypeAttributeIsSupported(comInterfaceAttribute, out string unsupportedValue))
{ {
context.ReportDiagnostic(comInterfaceAttribute.CreateDiagnosticInfo(AnalyzerDiagnostics.InterfaceTypeNotSupported, unsupportedValue).ToDiagnostic()); context.ReportDiagnostic(comInterfaceAttribute.CreateDiagnosticInfo(GeneratorDiagnostics.InterfaceTypeNotSupported, unsupportedValue).ToDiagnostic());
} }
}, SymbolKind.NamedType); }, SymbolKind.NamedType);
} }

View file

@ -44,14 +44,14 @@ namespace Microsoft.Interop
} }
} }
// Verify that the types the method is declared in are marked partial. // Verify that the types the interface is declared in are marked partial.
for (SyntaxNode? parentNode = syntax.Parent; parentNode is TypeDeclarationSyntax typeDecl; parentNode = parentNode.Parent) for (SyntaxNode? parentNode = syntax; parentNode is TypeDeclarationSyntax typeDecl; parentNode = parentNode.Parent)
{ {
if (!typeDecl.Modifiers.Any(SyntaxKind.PartialKeyword)) if (!typeDecl.Modifiers.Any(SyntaxKind.PartialKeyword))
{ {
return DiagnosticOrInterfaceInfo.From( return DiagnosticOrInterfaceInfo.From(
DiagnosticInfo.Create( DiagnosticInfo.Create(
GeneratorDiagnostics.InvalidAttributedMethodContainingTypeMissingModifiers, GeneratorDiagnostics.InvalidAttributedInterfaceMissingPartialModifiers,
syntax.Identifier.GetLocation(), syntax.Identifier.GetLocation(),
symbol.Name, symbol.Name,
typeDecl.Identifier)); typeDecl.Identifier));

View file

@ -69,8 +69,8 @@ namespace Microsoft.Interop
// [GeneratedComInterface] attribute. // [GeneratedComInterface] attribute.
// This restriction not only makes finding the syntax for a given method cheaper, // This restriction not only makes finding the syntax for a given method cheaper,
// but it also enables us to ensure that we can determine vtable method order easily. // but it also enables us to ensure that we can determine vtable method order easily.
CodeAnalysis.Location interfaceLocation = ifaceContext.Declaration.GetLocation(); Location interfaceLocation = ifaceContext.Declaration.GetLocation();
CodeAnalysis.Location? methodLocationInAttributedInterfaceDeclaration = null; Location? methodLocationInAttributedInterfaceDeclaration = null;
foreach (var methodLocation in method.Locations) foreach (var methodLocation in method.Locations)
{ {
if (methodLocation.SourceTree == interfaceLocation.SourceTree if (methodLocation.SourceTree == interfaceLocation.SourceTree
@ -92,7 +92,6 @@ namespace Microsoft.Interop
foreach (var declaringSyntaxReference in method.DeclaringSyntaxReferences) foreach (var declaringSyntaxReference in method.DeclaringSyntaxReferences)
{ {
var declaringSyntax = declaringSyntaxReference.GetSyntax(ct); var declaringSyntax = declaringSyntaxReference.GetSyntax(ct);
Debug.Assert(declaringSyntax.IsKind(SyntaxKind.MethodDeclaration));
if (declaringSyntax.GetLocation().SourceSpan.Contains(methodLocationInAttributedInterfaceDeclaration.SourceSpan)) if (declaringSyntax.GetLocation().SourceSpan.Contains(methodLocationInAttributedInterfaceDeclaration.SourceSpan))
{ {
comMethodDeclaringSyntax = (MethodDeclarationSyntax)declaringSyntax; comMethodDeclaringSyntax = (MethodDeclarationSyntax)declaringSyntax;

View file

@ -20,11 +20,12 @@ namespace Microsoft.Interop
public const string InvalidLibraryImportAttributeUsage = Prefix + "1050"; public const string InvalidLibraryImportAttributeUsage = Prefix + "1050";
public const string TypeNotSupported = Prefix + "1051"; public const string TypeNotSupported = Prefix + "1051";
public const string ConfigurationNotSupported = Prefix + "1052"; public const string ConfigurationNotSupported = Prefix + "1052";
public const string InvalidGeneratedComInterfaceAttributeUsage = Prefix + "1090";
public const string MethodNotDeclaredInAttributedInterface = Prefix + "1091"; public const string MethodNotDeclaredInAttributedInterface = Prefix + "1091";
public const string InvalidGeneratedComInterfaceAttributeUsage = Prefix + "1092"; public const string MultipleComInterfaceBaseTypes = Prefix + "1092";
public const string MultipleComInterfaceBaseTypes = Prefix + "1093"; public const string AnalysisFailed = Prefix + "1093";
public const string AnalysisFailed = Prefix + "1094"; public const string BaseInterfaceFailedGeneration = Prefix + "1094";
public const string BaseInterfaceFailedGeneration = Prefix + "1095"; public const string InvalidGeneratedComClassAttributeUsage = Prefix + "1095";
} }
private const string Category = "ComInterfaceGenerator"; private const string Category = "ComInterfaceGenerator";
@ -51,6 +52,17 @@ namespace Microsoft.Interop
isEnabledByDefault: true, isEnabledByDefault: true,
description: GetResourceString(nameof(SR.InvalidAttributedMethodDescription))); description: GetResourceString(nameof(SR.InvalidAttributedMethodDescription)));
/// <inheritdoc cref="SR.InvalidGeneratedComInterfaceUsageMissingPartialModifier"/>
public static readonly DiagnosticDescriptor InvalidAttributedInterfaceMissingPartialModifiers =
new DiagnosticDescriptor(
Ids.InvalidGeneratedComInterfaceAttributeUsage,
GetResourceString(nameof(SR.InvalidGeneratedComInterfaceAttributeUsageTitle)),
GetResourceString(nameof(SR.InvalidGeneratedComInterfaceUsageMissingPartialModifier)),
Category,
DiagnosticSeverity.Error,
isEnabledByDefault: true,
description: GetResourceString(nameof(SR.InvalidGeneratedComInterfaceAttributeUsageDescription)));
/// <inheritdoc cref="SR.InvalidAttributedMethodContainingTypeMissingUnmanagedObjectUnwrapperAttributeMessage"/> /// <inheritdoc cref="SR.InvalidAttributedMethodContainingTypeMissingUnmanagedObjectUnwrapperAttributeMessage"/>
public static readonly DiagnosticDescriptor InvalidAttributedMethodContainingTypeMissingUnmanagedObjectUnwrapperAttribute = public static readonly DiagnosticDescriptor InvalidAttributedMethodContainingTypeMissingUnmanagedObjectUnwrapperAttribute =
new DiagnosticDescriptor( new DiagnosticDescriptor(
@ -282,6 +294,28 @@ namespace Microsoft.Interop
isEnabledByDefault: true, isEnabledByDefault: true,
description: GetResourceString(nameof(SR.BaseInterfaceCannotBeGeneratedDescription))); description: GetResourceString(nameof(SR.BaseInterfaceCannotBeGeneratedDescription)));
/// <inheritdoc cref="SR.InvalidGeneratedComClassAttributeUsageMissingPartialModifier"/>
public static readonly DiagnosticDescriptor InvalidAttributedClassMissingPartialModifier =
new DiagnosticDescriptor(
Ids.InvalidGeneratedComClassAttributeUsage,
GetResourceString(nameof(SR.InvalidGeneratedComClassAttributeUsageTitle)),
GetResourceString(nameof(SR.InvalidGeneratedComClassAttributeUsageMissingPartialModifier)),
Category,
DiagnosticSeverity.Error,
isEnabledByDefault: true,
description: GetResourceString(nameof(SR.InvalidGeneratedComClassAttributeUsageDescription)));
/// <inheritdoc cref="SR.InterfaceTypeNotSupportedMessage"/>
public static readonly DiagnosticDescriptor InterfaceTypeNotSupported =
new DiagnosticDescriptor(
Ids.InvalidGeneratedComInterfaceAttributeUsage,
GetResourceString(nameof(SR.InterfaceTypeNotSupportedTitle)),
GetResourceString(nameof(SR.InterfaceTypeNotSupportedMessage)),
Category,
DiagnosticSeverity.Error,
isEnabledByDefault: true,
description: GetResourceString(nameof(SR.InterfaceTypeNotSupportedMessage)));
private readonly List<DiagnosticInfo> _diagnostics = new List<DiagnosticInfo>(); private readonly List<DiagnosticInfo> _diagnostics = new List<DiagnosticInfo>();
public IEnumerable<DiagnosticInfo> Diagnostics => _diagnostics; public IEnumerable<DiagnosticInfo> Diagnostics => _diagnostics;

View file

@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<root> <root>
<!-- <!--
Microsoft ResX Schema Microsoft ResX Schema
Version 2.0 Version 2.0
The primary goals of this format is to allow a simple XML format The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes various data types are done through the TypeConverter classes
associated with the data types. associated with the data types.
Example: Example:
... ado.net/XML headers & schema ... ... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader> <resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader> <resheader name="version">2.0</resheader>
@ -26,36 +26,36 @@
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment> <comment>This is a comment</comment>
</data> </data>
There are any number of "resheader" rows that contain simple There are any number of "resheader" rows that contain simple
name/value pairs. name/value pairs.
Each data row contains a name, and value. The row also contains a Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture. text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the Classes that don't support this are serialized and stored with the
mimetype set. mimetype set.
The mimetype is used for serialized objects, and tells the The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly: extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below. read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64 mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64 mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64 mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter : using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
--> -->
@ -250,7 +250,7 @@
<value>Analysis of method '{0}' has failed. ComInterfaceGenerator will not generate code for this method.</value> <value>Analysis of method '{0}' has failed. ComInterfaceGenerator will not generate code for this method.</value>
</data> </data>
<data name="AnalysisFailedTitle" xml:space="preserve"> <data name="AnalysisFailedTitle" xml:space="preserve">
<value>Analysis for generation has failed.</value> <value>Analysis for COM interface generation has failed.</value>
</data> </data>
<data name="GeneratedComInterfaceStringMarshallingMustMatchBase" xml:space="preserve"> <data name="GeneratedComInterfaceStringMarshallingMustMatchBase" xml:space="preserve">
<value>The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' must match the base COM interface.</value> <value>The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' must match the base COM interface.</value>
@ -262,11 +262,23 @@
<value>COM interface {0} inherits from {1}, which has errors. ComInterfaceGenerator will not generate source for {0}.</value> <value>COM interface {0} inherits from {1}, which has errors. ComInterfaceGenerator will not generate source for {0}.</value>
</data> </data>
<data name="BaseInterfaceCannotBeGeneratedTitle" xml:space="preserve"> <data name="BaseInterfaceCannotBeGeneratedTitle" xml:space="preserve">
<value>The base COM interface failed to generate source. ComInterfaceGenerator will not generate source for this interface.</value> <value>The base COM interface failed to generate source. Code will not be generated for this interface.</value>
</data> </data>
<data name="InvalidStringMarshallingConfigurationOnInterfaceMessage" xml:space="preserve"> <data name="InvalidStringMarshallingConfigurationOnInterfaceMessage" xml:space="preserve">
<value>The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' on interface '{0}' is invalid. {1}</value> <value>The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' on interface '{0}' is invalid. {1}</value>
</data> </data>
<data name="InvalidGeneratedComInterfaceUsageMissingPartialModifier" xml:space="preserve">
<value>The interface '{0}' or one of its containing types is missing the 'partial' keyword. Code will not be generated for '{0}'.</value>
</data>
<data name="InvalidGeneratedComClassAttributeUsageDescription" xml:space="preserve">
<value>Classes with 'GeneratedComClassAttribute' must implement one or more interfaces with 'GeneratedComInterfaceAttribute', be marked partial, and be non-generic.</value>
</data>
<data name="InvalidGeneratedComClassAttributeUsageMissingPartialModifier" xml:space="preserve">
<value>Class '{0}' or one of its containing types is not marked 'partial'.</value>
</data>
<data name="InvalidGeneratedComClassAttributeUsageTitle" xml:space="preserve">
<value>Invalid 'GeneratedComClassAttribute' usage</value>
</data>
<data name="ConvertToGeneratedComInterfaceDescription" xml:space="preserve"> <data name="ConvertToGeneratedComInterfaceDescription" xml:space="preserve">
<value>Use 'GeneratedComInterfaceAttribute' instead of 'ComImportAttribute' to generate COM marshalling code at compile time</value> <value>Use 'GeneratedComInterfaceAttribute' instead of 'ComImportAttribute' to generate COM marshalling code at compile time</value>
</data> </data>
@ -315,4 +327,4 @@
<data name="ConvertComInterfaceMayProduceInvalidCode" xml:space="preserve"> <data name="ConvertComInterfaceMayProduceInvalidCode" xml:space="preserve">
<value>Converting this interface to use 'GeneratedComInterfaceAttribute' may produce invalid code and may require additional work</value> <value>Converting this interface to use 'GeneratedComInterfaceAttribute' may produce invalid code and may require additional work</value>
</data> </data>
</root> </root>

View file

@ -38,8 +38,8 @@
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="AnalysisFailedTitle"> <trans-unit id="AnalysisFailedTitle">
<source>Analysis for generation has failed.</source> <source>Analysis for COM interface generation has failed.</source>
<target state="translated">Analýza pro generování se nezdařila</target> <target state="needs-review-translation">Analýza pro generování se nezdařila</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="BaseInterfaceCannotBeGeneratedDescription"> <trans-unit id="BaseInterfaceCannotBeGeneratedDescription">
@ -53,8 +53,8 @@
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="BaseInterfaceCannotBeGeneratedTitle"> <trans-unit id="BaseInterfaceCannotBeGeneratedTitle">
<source>The base COM interface failed to generate source. ComInterfaceGenerator will not generate source for this interface.</source> <source>The base COM interface failed to generate source. Code will not be generated for this interface.</source>
<target state="translated">Základnímu rozhraní COM se nepodařilo vygenerovat zdroj. ComInterfaceGenerator nevygeneruje zdroj pro toto rozhraní.</target> <target state="needs-review-translation">Základnímu rozhraní COM se nepodařilo vygenerovat zdroj. ComInterfaceGenerator nevygeneruje zdroj pro toto rozhraní.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="ComHostingDoesNotSupportGeneratedComInterfaceDescription"> <trans-unit id="ComHostingDoesNotSupportGeneratedComInterfaceDescription">
@ -197,6 +197,21 @@
<target state="translated">Zadaná hodnota není známý příznak výčtu ExceptionMarsnuming.</target> <target state="translated">Zadaná hodnota není známý příznak výčtu ExceptionMarsnuming.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageDescription">
<source>Classes with 'GeneratedComClassAttribute' must implement one or more interfaces with 'GeneratedComInterfaceAttribute', be marked partial, and be non-generic.</source>
<target state="new">Classes with 'GeneratedComClassAttribute' must implement one or more interfaces with 'GeneratedComInterfaceAttribute', be marked partial, and be non-generic.</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageMissingPartialModifier">
<source>Class '{0}' or one of its containing types is not marked 'partial'.</source>
<target state="new">Class '{0}' or one of its containing types is not marked 'partial'.</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageTitle">
<source>Invalid 'GeneratedComClassAttribute' usage</source>
<target state="new">Invalid 'GeneratedComClassAttribute' usage</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComInterfaceAttributeUsageDescription"> <trans-unit id="InvalidGeneratedComInterfaceAttributeUsageDescription">
<source>Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'.</source> <source>Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'.</source>
<target state="translated">Rozhraní s atributem GeneratedComInterfaceAttribute musí být částečná, neobecná a musí určovat identifikátor GUID s atributem System.Runtime.InteropServices.GuidAttribute.</target> <target state="translated">Rozhraní s atributem GeneratedComInterfaceAttribute musí být částečná, neobecná a musí určovat identifikátor GUID s atributem System.Runtime.InteropServices.GuidAttribute.</target>
@ -217,6 +232,11 @@
<target state="translated">Neplatné použití atributu GeneratedComInterfaceAttribute</target> <target state="translated">Neplatné použití atributu GeneratedComInterfaceAttribute</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidGeneratedComInterfaceUsageMissingPartialModifier">
<source>The interface '{0}' or one of its containing types is missing the 'partial' keyword. Code will not be generated for '{0}'.</source>
<target state="new">The interface '{0}' or one of its containing types is missing the 'partial' keyword. Code will not be generated for '{0}'.</target>
<note />
</trans-unit>
<trans-unit id="InvalidStringMarshallingConfigurationDescription"> <trans-unit id="InvalidStringMarshallingConfigurationDescription">
<source>The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid.</source> <source>The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid.</source>
<target state="translated">Konfigurace StringMarshalling a StringMarshallingCustomType je neplatná.</target> <target state="translated">Konfigurace StringMarshalling a StringMarshallingCustomType je neplatná.</target>

View file

@ -38,8 +38,8 @@
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="AnalysisFailedTitle"> <trans-unit id="AnalysisFailedTitle">
<source>Analysis for generation has failed.</source> <source>Analysis for COM interface generation has failed.</source>
<target state="translated">Fehler bei der Analyse für die Generierung.</target> <target state="needs-review-translation">Fehler bei der Analyse für die Generierung.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="BaseInterfaceCannotBeGeneratedDescription"> <trans-unit id="BaseInterfaceCannotBeGeneratedDescription">
@ -53,8 +53,8 @@
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="BaseInterfaceCannotBeGeneratedTitle"> <trans-unit id="BaseInterfaceCannotBeGeneratedTitle">
<source>The base COM interface failed to generate source. ComInterfaceGenerator will not generate source for this interface.</source> <source>The base COM interface failed to generate source. Code will not be generated for this interface.</source>
<target state="translated">Die Basis-COM-Schnittstelle konnte die Quelle nicht generieren. ComInterfaceGenerator generiert keine Quelle für diese Schnittstelle.</target> <target state="needs-review-translation">Die Basis-COM-Schnittstelle konnte die Quelle nicht generieren. ComInterfaceGenerator generiert keine Quelle für diese Schnittstelle.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="ComHostingDoesNotSupportGeneratedComInterfaceDescription"> <trans-unit id="ComHostingDoesNotSupportGeneratedComInterfaceDescription">
@ -197,6 +197,21 @@
<target state="translated">Der angegebene Wert ist kein bekanntes Flag der „ExceptionMarshalling“-Enumeration.</target> <target state="translated">Der angegebene Wert ist kein bekanntes Flag der „ExceptionMarshalling“-Enumeration.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageDescription">
<source>Classes with 'GeneratedComClassAttribute' must implement one or more interfaces with 'GeneratedComInterfaceAttribute', be marked partial, and be non-generic.</source>
<target state="new">Classes with 'GeneratedComClassAttribute' must implement one or more interfaces with 'GeneratedComInterfaceAttribute', be marked partial, and be non-generic.</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageMissingPartialModifier">
<source>Class '{0}' or one of its containing types is not marked 'partial'.</source>
<target state="new">Class '{0}' or one of its containing types is not marked 'partial'.</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageTitle">
<source>Invalid 'GeneratedComClassAttribute' usage</source>
<target state="new">Invalid 'GeneratedComClassAttribute' usage</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComInterfaceAttributeUsageDescription"> <trans-unit id="InvalidGeneratedComInterfaceAttributeUsageDescription">
<source>Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'.</source> <source>Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'.</source>
<target state="translated">Schnittstellen, die mit "GeneratedComInterfaceAttribute" attributiert sind, müssen partielle, nicht generische Schnittstellen sein und eine GUID mit "System.Runtime.InteropServices.GuidAttribute" angeben.</target> <target state="translated">Schnittstellen, die mit "GeneratedComInterfaceAttribute" attributiert sind, müssen partielle, nicht generische Schnittstellen sein und eine GUID mit "System.Runtime.InteropServices.GuidAttribute" angeben.</target>
@ -217,6 +232,11 @@
<target state="translated">Ungültige Verwendung von „GeneratedComInterfaceAttribute“.</target> <target state="translated">Ungültige Verwendung von „GeneratedComInterfaceAttribute“.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidGeneratedComInterfaceUsageMissingPartialModifier">
<source>The interface '{0}' or one of its containing types is missing the 'partial' keyword. Code will not be generated for '{0}'.</source>
<target state="new">The interface '{0}' or one of its containing types is missing the 'partial' keyword. Code will not be generated for '{0}'.</target>
<note />
</trans-unit>
<trans-unit id="InvalidStringMarshallingConfigurationDescription"> <trans-unit id="InvalidStringMarshallingConfigurationDescription">
<source>The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid.</source> <source>The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid.</source>
<target state="translated">Die Konfiguration von \"StringMarshalling\" und \"StringMarshallingCustomType\" ist ungültig.</target> <target state="translated">Die Konfiguration von \"StringMarshalling\" und \"StringMarshallingCustomType\" ist ungültig.</target>

View file

@ -38,8 +38,8 @@
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="AnalysisFailedTitle"> <trans-unit id="AnalysisFailedTitle">
<source>Analysis for generation has failed.</source> <source>Analysis for COM interface generation has failed.</source>
<target state="translated">Error en el análisis de generación.</target> <target state="needs-review-translation">Error en el análisis de generación.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="BaseInterfaceCannotBeGeneratedDescription"> <trans-unit id="BaseInterfaceCannotBeGeneratedDescription">
@ -53,8 +53,8 @@
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="BaseInterfaceCannotBeGeneratedTitle"> <trans-unit id="BaseInterfaceCannotBeGeneratedTitle">
<source>The base COM interface failed to generate source. ComInterfaceGenerator will not generate source for this interface.</source> <source>The base COM interface failed to generate source. Code will not be generated for this interface.</source>
<target state="translated">La interfaz COM base no pudo generar el origen. ComInterfaceGenerator no generará el origen para esta interfaz.</target> <target state="needs-review-translation">La interfaz COM base no pudo generar el origen. ComInterfaceGenerator no generará el origen para esta interfaz.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="ComHostingDoesNotSupportGeneratedComInterfaceDescription"> <trans-unit id="ComHostingDoesNotSupportGeneratedComInterfaceDescription">
@ -197,6 +197,21 @@
<target state="translated">El valor proporcionado no es una marca conocida de la enumeración “ExceptionMarshalling”.</target> <target state="translated">El valor proporcionado no es una marca conocida de la enumeración “ExceptionMarshalling”.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageDescription">
<source>Classes with 'GeneratedComClassAttribute' must implement one or more interfaces with 'GeneratedComInterfaceAttribute', be marked partial, and be non-generic.</source>
<target state="new">Classes with 'GeneratedComClassAttribute' must implement one or more interfaces with 'GeneratedComInterfaceAttribute', be marked partial, and be non-generic.</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageMissingPartialModifier">
<source>Class '{0}' or one of its containing types is not marked 'partial'.</source>
<target state="new">Class '{0}' or one of its containing types is not marked 'partial'.</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageTitle">
<source>Invalid 'GeneratedComClassAttribute' usage</source>
<target state="new">Invalid 'GeneratedComClassAttribute' usage</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComInterfaceAttributeUsageDescription"> <trans-unit id="InvalidGeneratedComInterfaceAttributeUsageDescription">
<source>Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'.</source> <source>Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'.</source>
<target state="translated">Las interfaces con el atributo “GeneratedComInterfaceAttribute” deben ser parciales, no genéricas y deben especificar un GUID con “System.Runtime.InteropServices.GuidAttribute”.</target> <target state="translated">Las interfaces con el atributo “GeneratedComInterfaceAttribute” deben ser parciales, no genéricas y deben especificar un GUID con “System.Runtime.InteropServices.GuidAttribute”.</target>
@ -217,6 +232,11 @@
<target state="translated">Uso de 'GeneratedComInterfaceAttribute' no válido.</target> <target state="translated">Uso de 'GeneratedComInterfaceAttribute' no válido.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidGeneratedComInterfaceUsageMissingPartialModifier">
<source>The interface '{0}' or one of its containing types is missing the 'partial' keyword. Code will not be generated for '{0}'.</source>
<target state="new">The interface '{0}' or one of its containing types is missing the 'partial' keyword. Code will not be generated for '{0}'.</target>
<note />
</trans-unit>
<trans-unit id="InvalidStringMarshallingConfigurationDescription"> <trans-unit id="InvalidStringMarshallingConfigurationDescription">
<source>The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid.</source> <source>The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid.</source>
<target state="translated">La configuración de “StringMarshalling” y “StringMarshallingCustomType” no es válida.</target> <target state="translated">La configuración de “StringMarshalling” y “StringMarshallingCustomType” no es válida.</target>

View file

@ -38,8 +38,8 @@
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="AnalysisFailedTitle"> <trans-unit id="AnalysisFailedTitle">
<source>Analysis for generation has failed.</source> <source>Analysis for COM interface generation has failed.</source>
<target state="translated">Échec de lanalyse de la génération.</target> <target state="needs-review-translation">Échec de lanalyse de la génération.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="BaseInterfaceCannotBeGeneratedDescription"> <trans-unit id="BaseInterfaceCannotBeGeneratedDescription">
@ -53,8 +53,8 @@
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="BaseInterfaceCannotBeGeneratedTitle"> <trans-unit id="BaseInterfaceCannotBeGeneratedTitle">
<source>The base COM interface failed to generate source. ComInterfaceGenerator will not generate source for this interface.</source> <source>The base COM interface failed to generate source. Code will not be generated for this interface.</source>
<target state="translated">Linterface COM de base na pas pu générer la source. ComInterfaceGenerator ne génère pas de source pour cette interface.</target> <target state="needs-review-translation">Linterface COM de base na pas pu générer la source. ComInterfaceGenerator ne génère pas de source pour cette interface.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="ComHostingDoesNotSupportGeneratedComInterfaceDescription"> <trans-unit id="ComHostingDoesNotSupportGeneratedComInterfaceDescription">
@ -197,6 +197,21 @@
<target state="translated">La valeur fournie nest pas un indicateur connu de lénumération « ExceptionMarshalling ».</target> <target state="translated">La valeur fournie nest pas un indicateur connu de lénumération « ExceptionMarshalling ».</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageDescription">
<source>Classes with 'GeneratedComClassAttribute' must implement one or more interfaces with 'GeneratedComInterfaceAttribute', be marked partial, and be non-generic.</source>
<target state="new">Classes with 'GeneratedComClassAttribute' must implement one or more interfaces with 'GeneratedComInterfaceAttribute', be marked partial, and be non-generic.</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageMissingPartialModifier">
<source>Class '{0}' or one of its containing types is not marked 'partial'.</source>
<target state="new">Class '{0}' or one of its containing types is not marked 'partial'.</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageTitle">
<source>Invalid 'GeneratedComClassAttribute' usage</source>
<target state="new">Invalid 'GeneratedComClassAttribute' usage</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComInterfaceAttributeUsageDescription"> <trans-unit id="InvalidGeneratedComInterfaceAttributeUsageDescription">
<source>Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'.</source> <source>Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'.</source>
<target state="translated">Les interfaces sont attribuées à « GeneratedComInterfaceAttribute » doivent être partielles, non génériques et doivent spécifier un GUID avec « System.Runtime.InteropServices.GuidAttribute ».</target> <target state="translated">Les interfaces sont attribuées à « GeneratedComInterfaceAttribute » doivent être partielles, non génériques et doivent spécifier un GUID avec « System.Runtime.InteropServices.GuidAttribute ».</target>
@ -217,6 +232,11 @@
<target state="translated">Utilisation de « GeneratedComInterfaceAttribute » non valide.</target> <target state="translated">Utilisation de « GeneratedComInterfaceAttribute » non valide.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidGeneratedComInterfaceUsageMissingPartialModifier">
<source>The interface '{0}' or one of its containing types is missing the 'partial' keyword. Code will not be generated for '{0}'.</source>
<target state="new">The interface '{0}' or one of its containing types is missing the 'partial' keyword. Code will not be generated for '{0}'.</target>
<note />
</trans-unit>
<trans-unit id="InvalidStringMarshallingConfigurationDescription"> <trans-unit id="InvalidStringMarshallingConfigurationDescription">
<source>The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid.</source> <source>The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid.</source>
<target state="translated">La configuration de « StringMarshalling » et de « StringMarshallingCustomType » nest pas valide.</target> <target state="translated">La configuration de « StringMarshalling » et de « StringMarshallingCustomType » nest pas valide.</target>

View file

@ -38,8 +38,8 @@
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="AnalysisFailedTitle"> <trans-unit id="AnalysisFailedTitle">
<source>Analysis for generation has failed.</source> <source>Analysis for COM interface generation has failed.</source>
<target state="translated">L'analisi per la generazione non è riuscita.</target> <target state="needs-review-translation">L'analisi per la generazione non è riuscita.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="BaseInterfaceCannotBeGeneratedDescription"> <trans-unit id="BaseInterfaceCannotBeGeneratedDescription">
@ -53,8 +53,8 @@
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="BaseInterfaceCannotBeGeneratedTitle"> <trans-unit id="BaseInterfaceCannotBeGeneratedTitle">
<source>The base COM interface failed to generate source. ComInterfaceGenerator will not generate source for this interface.</source> <source>The base COM interface failed to generate source. Code will not be generated for this interface.</source>
<target state="translated">L'interfaccia COM di base non è riuscita a generare l'origine. ComInterfaceGenerator non genererà l'origine per questa interfaccia.</target> <target state="needs-review-translation">L'interfaccia COM di base non è riuscita a generare l'origine. ComInterfaceGenerator non genererà l'origine per questa interfaccia.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="ComHostingDoesNotSupportGeneratedComInterfaceDescription"> <trans-unit id="ComHostingDoesNotSupportGeneratedComInterfaceDescription">
@ -197,6 +197,21 @@
<target state="translated">Il valore specificato non è un flag noto dell'enumerazione 'ExceptionMarshalling'.</target> <target state="translated">Il valore specificato non è un flag noto dell'enumerazione 'ExceptionMarshalling'.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageDescription">
<source>Classes with 'GeneratedComClassAttribute' must implement one or more interfaces with 'GeneratedComInterfaceAttribute', be marked partial, and be non-generic.</source>
<target state="new">Classes with 'GeneratedComClassAttribute' must implement one or more interfaces with 'GeneratedComInterfaceAttribute', be marked partial, and be non-generic.</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageMissingPartialModifier">
<source>Class '{0}' or one of its containing types is not marked 'partial'.</source>
<target state="new">Class '{0}' or one of its containing types is not marked 'partial'.</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageTitle">
<source>Invalid 'GeneratedComClassAttribute' usage</source>
<target state="new">Invalid 'GeneratedComClassAttribute' usage</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComInterfaceAttributeUsageDescription"> <trans-unit id="InvalidGeneratedComInterfaceAttributeUsageDescription">
<source>Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'.</source> <source>Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'.</source>
<target state="translated">Le interfacce con attributo 'GeneratedComInterfaceAttribute' devono essere parziali, non generiche e devono specificare un GUID con 'System.Runtime.InteropServices.GuidAttribute'.</target> <target state="translated">Le interfacce con attributo 'GeneratedComInterfaceAttribute' devono essere parziali, non generiche e devono specificare un GUID con 'System.Runtime.InteropServices.GuidAttribute'.</target>
@ -217,6 +232,11 @@
<target state="translated">Utilizzo di 'GeneratedComInterfaceAttribute' non valido.</target> <target state="translated">Utilizzo di 'GeneratedComInterfaceAttribute' non valido.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidGeneratedComInterfaceUsageMissingPartialModifier">
<source>The interface '{0}' or one of its containing types is missing the 'partial' keyword. Code will not be generated for '{0}'.</source>
<target state="new">The interface '{0}' or one of its containing types is missing the 'partial' keyword. Code will not be generated for '{0}'.</target>
<note />
</trans-unit>
<trans-unit id="InvalidStringMarshallingConfigurationDescription"> <trans-unit id="InvalidStringMarshallingConfigurationDescription">
<source>The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid.</source> <source>The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid.</source>
<target state="translated">La configurazione di 'StringMarshalling' e 'StringMarshallingCustomType' non è valida.</target> <target state="translated">La configurazione di 'StringMarshalling' e 'StringMarshallingCustomType' non è valida.</target>

View file

@ -38,8 +38,8 @@
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="AnalysisFailedTitle"> <trans-unit id="AnalysisFailedTitle">
<source>Analysis for generation has failed.</source> <source>Analysis for COM interface generation has failed.</source>
<target state="translated">生成の分析に失敗しました。</target> <target state="needs-review-translation">生成の分析に失敗しました。</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="BaseInterfaceCannotBeGeneratedDescription"> <trans-unit id="BaseInterfaceCannotBeGeneratedDescription">
@ -53,8 +53,8 @@
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="BaseInterfaceCannotBeGeneratedTitle"> <trans-unit id="BaseInterfaceCannotBeGeneratedTitle">
<source>The base COM interface failed to generate source. ComInterfaceGenerator will not generate source for this interface.</source> <source>The base COM interface failed to generate source. Code will not be generated for this interface.</source>
<target state="translated">ベース COM インターフェイスはソースを生成できませんでした。ComInterfaceGenerator は、このインターフェイスのソースを生成しません。</target> <target state="needs-review-translation">ベース COM インターフェイスはソースを生成できませんでした。ComInterfaceGenerator は、このインターフェイスのソースを生成しません。</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="ComHostingDoesNotSupportGeneratedComInterfaceDescription"> <trans-unit id="ComHostingDoesNotSupportGeneratedComInterfaceDescription">
@ -197,6 +197,21 @@
<target state="translated">指定された値は、'ExceptionMarshalling' 列挙型の既知のフラグではありません。</target> <target state="translated">指定された値は、'ExceptionMarshalling' 列挙型の既知のフラグではありません。</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageDescription">
<source>Classes with 'GeneratedComClassAttribute' must implement one or more interfaces with 'GeneratedComInterfaceAttribute', be marked partial, and be non-generic.</source>
<target state="new">Classes with 'GeneratedComClassAttribute' must implement one or more interfaces with 'GeneratedComInterfaceAttribute', be marked partial, and be non-generic.</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageMissingPartialModifier">
<source>Class '{0}' or one of its containing types is not marked 'partial'.</source>
<target state="new">Class '{0}' or one of its containing types is not marked 'partial'.</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageTitle">
<source>Invalid 'GeneratedComClassAttribute' usage</source>
<target state="new">Invalid 'GeneratedComClassAttribute' usage</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComInterfaceAttributeUsageDescription"> <trans-unit id="InvalidGeneratedComInterfaceAttributeUsageDescription">
<source>Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'.</source> <source>Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'.</source>
<target state="translated">'GeneratedComInterfaceAttribute' の属性を持つインターフェイスは部分的で、非ジェネリックである必要があり、'System.Runtime.InteropServices.GuidAttribute' で GUID を指定する必要があります。</target> <target state="translated">'GeneratedComInterfaceAttribute' の属性を持つインターフェイスは部分的で、非ジェネリックである必要があり、'System.Runtime.InteropServices.GuidAttribute' で GUID を指定する必要があります。</target>
@ -217,6 +232,11 @@
<target state="translated">'GeneratedComInterfaceAttribute' の使用法が無効です。</target> <target state="translated">'GeneratedComInterfaceAttribute' の使用法が無効です。</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidGeneratedComInterfaceUsageMissingPartialModifier">
<source>The interface '{0}' or one of its containing types is missing the 'partial' keyword. Code will not be generated for '{0}'.</source>
<target state="new">The interface '{0}' or one of its containing types is missing the 'partial' keyword. Code will not be generated for '{0}'.</target>
<note />
</trans-unit>
<trans-unit id="InvalidStringMarshallingConfigurationDescription"> <trans-unit id="InvalidStringMarshallingConfigurationDescription">
<source>The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid.</source> <source>The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid.</source>
<target state="translated">'StringMarshalling' と 'StringMarshallingCustomType' の構成が無効です。</target> <target state="translated">'StringMarshalling' と 'StringMarshallingCustomType' の構成が無効です。</target>

View file

@ -38,8 +38,8 @@
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="AnalysisFailedTitle"> <trans-unit id="AnalysisFailedTitle">
<source>Analysis for generation has failed.</source> <source>Analysis for COM interface generation has failed.</source>
<target state="translated">생성에 필요한 분석이 실패했습니다.</target> <target state="needs-review-translation">생성에 필요한 분석이 실패했습니다.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="BaseInterfaceCannotBeGeneratedDescription"> <trans-unit id="BaseInterfaceCannotBeGeneratedDescription">
@ -53,8 +53,8 @@
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="BaseInterfaceCannotBeGeneratedTitle"> <trans-unit id="BaseInterfaceCannotBeGeneratedTitle">
<source>The base COM interface failed to generate source. ComInterfaceGenerator will not generate source for this interface.</source> <source>The base COM interface failed to generate source. Code will not be generated for this interface.</source>
<target state="translated">기본 COM 인터페이스에서 원본을 생성하지 못했습니다. ComInterfaceGenerator는 이 인터페이스에 대한 원본을 생성하지 않습니다.</target> <target state="needs-review-translation">기본 COM 인터페이스에서 원본을 생성하지 못했습니다. ComInterfaceGenerator는 이 인터페이스에 대한 원본을 생성하지 않습니다.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="ComHostingDoesNotSupportGeneratedComInterfaceDescription"> <trans-unit id="ComHostingDoesNotSupportGeneratedComInterfaceDescription">
@ -197,6 +197,21 @@
<target state="translated">제공된 값은 'ExceptionMarshalling' 열거형의 알려진 플래그가 아닙니다.</target> <target state="translated">제공된 값은 'ExceptionMarshalling' 열거형의 알려진 플래그가 아닙니다.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageDescription">
<source>Classes with 'GeneratedComClassAttribute' must implement one or more interfaces with 'GeneratedComInterfaceAttribute', be marked partial, and be non-generic.</source>
<target state="new">Classes with 'GeneratedComClassAttribute' must implement one or more interfaces with 'GeneratedComInterfaceAttribute', be marked partial, and be non-generic.</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageMissingPartialModifier">
<source>Class '{0}' or one of its containing types is not marked 'partial'.</source>
<target state="new">Class '{0}' or one of its containing types is not marked 'partial'.</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageTitle">
<source>Invalid 'GeneratedComClassAttribute' usage</source>
<target state="new">Invalid 'GeneratedComClassAttribute' usage</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComInterfaceAttributeUsageDescription"> <trans-unit id="InvalidGeneratedComInterfaceAttributeUsageDescription">
<source>Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'.</source> <source>Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'.</source>
<target state="translated">'GeneratedComInterfaceAttribute'로 특성이 지정된 인터페이스는 부분적이고 제네릭이 아니어야 하며 'System.Runtime.InteropServices.GuidAttribute'를 사용하여 GUID를 지정해야 합니다.</target> <target state="translated">'GeneratedComInterfaceAttribute'로 특성이 지정된 인터페이스는 부분적이고 제네릭이 아니어야 하며 'System.Runtime.InteropServices.GuidAttribute'를 사용하여 GUID를 지정해야 합니다.</target>
@ -217,6 +232,11 @@
<target state="translated">잘못된 'GeneratedComInterfaceAttribute' 사용법입니다.</target> <target state="translated">잘못된 'GeneratedComInterfaceAttribute' 사용법입니다.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidGeneratedComInterfaceUsageMissingPartialModifier">
<source>The interface '{0}' or one of its containing types is missing the 'partial' keyword. Code will not be generated for '{0}'.</source>
<target state="new">The interface '{0}' or one of its containing types is missing the 'partial' keyword. Code will not be generated for '{0}'.</target>
<note />
</trans-unit>
<trans-unit id="InvalidStringMarshallingConfigurationDescription"> <trans-unit id="InvalidStringMarshallingConfigurationDescription">
<source>The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid.</source> <source>The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid.</source>
<target state="translated">'StringMarshalling' 및 'StringMarshallingCustomType'의 구성이 잘못되었습니다.</target> <target state="translated">'StringMarshalling' 및 'StringMarshallingCustomType'의 구성이 잘못되었습니다.</target>

View file

@ -38,8 +38,8 @@
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="AnalysisFailedTitle"> <trans-unit id="AnalysisFailedTitle">
<source>Analysis for generation has failed.</source> <source>Analysis for COM interface generation has failed.</source>
<target state="translated">Analiza generowania nie powiodła się.</target> <target state="needs-review-translation">Analiza generowania nie powiodła się.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="BaseInterfaceCannotBeGeneratedDescription"> <trans-unit id="BaseInterfaceCannotBeGeneratedDescription">
@ -53,8 +53,8 @@
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="BaseInterfaceCannotBeGeneratedTitle"> <trans-unit id="BaseInterfaceCannotBeGeneratedTitle">
<source>The base COM interface failed to generate source. ComInterfaceGenerator will not generate source for this interface.</source> <source>The base COM interface failed to generate source. Code will not be generated for this interface.</source>
<target state="translated">Podstawowy interfejs COM nie może wygenerować źródła. Program ComInterfaceGenerator nie wygeneruje źródła dla tego interfejsu.</target> <target state="needs-review-translation">Podstawowy interfejs COM nie może wygenerować źródła. Program ComInterfaceGenerator nie wygeneruje źródła dla tego interfejsu.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="ComHostingDoesNotSupportGeneratedComInterfaceDescription"> <trans-unit id="ComHostingDoesNotSupportGeneratedComInterfaceDescription">
@ -197,6 +197,21 @@
<target state="translated">Podana wartość nie jest znaną flagą wyliczenia „'ExceptionMarshalling”.</target> <target state="translated">Podana wartość nie jest znaną flagą wyliczenia „'ExceptionMarshalling”.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageDescription">
<source>Classes with 'GeneratedComClassAttribute' must implement one or more interfaces with 'GeneratedComInterfaceAttribute', be marked partial, and be non-generic.</source>
<target state="new">Classes with 'GeneratedComClassAttribute' must implement one or more interfaces with 'GeneratedComInterfaceAttribute', be marked partial, and be non-generic.</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageMissingPartialModifier">
<source>Class '{0}' or one of its containing types is not marked 'partial'.</source>
<target state="new">Class '{0}' or one of its containing types is not marked 'partial'.</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageTitle">
<source>Invalid 'GeneratedComClassAttribute' usage</source>
<target state="new">Invalid 'GeneratedComClassAttribute' usage</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComInterfaceAttributeUsageDescription"> <trans-unit id="InvalidGeneratedComInterfaceAttributeUsageDescription">
<source>Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'.</source> <source>Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'.</source>
<target state="translated">Interfejsy z atrybutem „GeneratedComInterfaceAttribute” muszą być częściowe, nie być ogóle, i muszą określać identyfikator GUID z atrybutem „System.Runtime.InteropServices.GuidAttribute”.</target> <target state="translated">Interfejsy z atrybutem „GeneratedComInterfaceAttribute” muszą być częściowe, nie być ogóle, i muszą określać identyfikator GUID z atrybutem „System.Runtime.InteropServices.GuidAttribute”.</target>
@ -217,6 +232,11 @@
<target state="translated">Nieprawidłowe użycie atrybutu „GeneratedComInterfaceAttribute”.</target> <target state="translated">Nieprawidłowe użycie atrybutu „GeneratedComInterfaceAttribute”.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidGeneratedComInterfaceUsageMissingPartialModifier">
<source>The interface '{0}' or one of its containing types is missing the 'partial' keyword. Code will not be generated for '{0}'.</source>
<target state="new">The interface '{0}' or one of its containing types is missing the 'partial' keyword. Code will not be generated for '{0}'.</target>
<note />
</trans-unit>
<trans-unit id="InvalidStringMarshallingConfigurationDescription"> <trans-unit id="InvalidStringMarshallingConfigurationDescription">
<source>The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid.</source> <source>The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid.</source>
<target state="translated">Konfiguracja elementów „StringMarshalling” i „StringMarshallingCustomType” jest nieprawidłowa.</target> <target state="translated">Konfiguracja elementów „StringMarshalling” i „StringMarshallingCustomType” jest nieprawidłowa.</target>

View file

@ -38,8 +38,8 @@
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="AnalysisFailedTitle"> <trans-unit id="AnalysisFailedTitle">
<source>Analysis for generation has failed.</source> <source>Analysis for COM interface generation has failed.</source>
<target state="translated">Falha na análise de geração.</target> <target state="needs-review-translation">Falha na análise de geração.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="BaseInterfaceCannotBeGeneratedDescription"> <trans-unit id="BaseInterfaceCannotBeGeneratedDescription">
@ -53,8 +53,8 @@
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="BaseInterfaceCannotBeGeneratedTitle"> <trans-unit id="BaseInterfaceCannotBeGeneratedTitle">
<source>The base COM interface failed to generate source. ComInterfaceGenerator will not generate source for this interface.</source> <source>The base COM interface failed to generate source. Code will not be generated for this interface.</source>
<target state="translated">A interface COM base falhou ao gerar a fonte. ComInterfaceGenerator não irá gerar fonte para esta interface.</target> <target state="needs-review-translation">A interface COM base falhou ao gerar a fonte. ComInterfaceGenerator não irá gerar fonte para esta interface.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="ComHostingDoesNotSupportGeneratedComInterfaceDescription"> <trans-unit id="ComHostingDoesNotSupportGeneratedComInterfaceDescription">
@ -197,6 +197,21 @@
<target state="translated">O valor fornecido não é um sinalizador conhecido da enumeração 'ExceptionMarshalling'.</target> <target state="translated">O valor fornecido não é um sinalizador conhecido da enumeração 'ExceptionMarshalling'.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageDescription">
<source>Classes with 'GeneratedComClassAttribute' must implement one or more interfaces with 'GeneratedComInterfaceAttribute', be marked partial, and be non-generic.</source>
<target state="new">Classes with 'GeneratedComClassAttribute' must implement one or more interfaces with 'GeneratedComInterfaceAttribute', be marked partial, and be non-generic.</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageMissingPartialModifier">
<source>Class '{0}' or one of its containing types is not marked 'partial'.</source>
<target state="new">Class '{0}' or one of its containing types is not marked 'partial'.</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageTitle">
<source>Invalid 'GeneratedComClassAttribute' usage</source>
<target state="new">Invalid 'GeneratedComClassAttribute' usage</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComInterfaceAttributeUsageDescription"> <trans-unit id="InvalidGeneratedComInterfaceAttributeUsageDescription">
<source>Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'.</source> <source>Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'.</source>
<target state="translated">As interfaces atribuídas com "GeneratedComInterfaceAttribute" devem ser parciais, não-genéricas e especificar um GUID com "System.Runtime.InteropServices.GuidAttribute".</target> <target state="translated">As interfaces atribuídas com "GeneratedComInterfaceAttribute" devem ser parciais, não-genéricas e especificar um GUID com "System.Runtime.InteropServices.GuidAttribute".</target>
@ -217,6 +232,11 @@
<target state="translated">Uso de "GeneratedComInterfaceAttribute" inválido.</target> <target state="translated">Uso de "GeneratedComInterfaceAttribute" inválido.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidGeneratedComInterfaceUsageMissingPartialModifier">
<source>The interface '{0}' or one of its containing types is missing the 'partial' keyword. Code will not be generated for '{0}'.</source>
<target state="new">The interface '{0}' or one of its containing types is missing the 'partial' keyword. Code will not be generated for '{0}'.</target>
<note />
</trans-unit>
<trans-unit id="InvalidStringMarshallingConfigurationDescription"> <trans-unit id="InvalidStringMarshallingConfigurationDescription">
<source>The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid.</source> <source>The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid.</source>
<target state="translated">A configuração de 'StringMarshalling' e 'StringMarshallingCustomType' é inválida.</target> <target state="translated">A configuração de 'StringMarshalling' e 'StringMarshallingCustomType' é inválida.</target>

View file

@ -38,8 +38,8 @@
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="AnalysisFailedTitle"> <trans-unit id="AnalysisFailedTitle">
<source>Analysis for generation has failed.</source> <source>Analysis for COM interface generation has failed.</source>
<target state="translated">Сбой анализа для создания.</target> <target state="needs-review-translation">Сбой анализа для создания.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="BaseInterfaceCannotBeGeneratedDescription"> <trans-unit id="BaseInterfaceCannotBeGeneratedDescription">
@ -53,8 +53,8 @@
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="BaseInterfaceCannotBeGeneratedTitle"> <trans-unit id="BaseInterfaceCannotBeGeneratedTitle">
<source>The base COM interface failed to generate source. ComInterfaceGenerator will not generate source for this interface.</source> <source>The base COM interface failed to generate source. Code will not be generated for this interface.</source>
<target state="translated">Базовому COM-интерфейсу не удалось создать источник. ComInterfaceGenerator не будет создавать источник для этого интерфейса.</target> <target state="needs-review-translation">Базовому COM-интерфейсу не удалось создать источник. ComInterfaceGenerator не будет создавать источник для этого интерфейса.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="ComHostingDoesNotSupportGeneratedComInterfaceDescription"> <trans-unit id="ComHostingDoesNotSupportGeneratedComInterfaceDescription">
@ -197,6 +197,21 @@
<target state="translated">Указанное значение не является известным флагом перечисления ExceptionMarshalling.</target> <target state="translated">Указанное значение не является известным флагом перечисления ExceptionMarshalling.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageDescription">
<source>Classes with 'GeneratedComClassAttribute' must implement one or more interfaces with 'GeneratedComInterfaceAttribute', be marked partial, and be non-generic.</source>
<target state="new">Classes with 'GeneratedComClassAttribute' must implement one or more interfaces with 'GeneratedComInterfaceAttribute', be marked partial, and be non-generic.</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageMissingPartialModifier">
<source>Class '{0}' or one of its containing types is not marked 'partial'.</source>
<target state="new">Class '{0}' or one of its containing types is not marked 'partial'.</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageTitle">
<source>Invalid 'GeneratedComClassAttribute' usage</source>
<target state="new">Invalid 'GeneratedComClassAttribute' usage</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComInterfaceAttributeUsageDescription"> <trans-unit id="InvalidGeneratedComInterfaceAttributeUsageDescription">
<source>Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'.</source> <source>Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'.</source>
<target state="translated">Интерфейсы с атрибутом GeneratedComInterfaceAttribute должны быть частичными, не универсальными и должны указывать GUID с помощью System.Runtime.InteropServices.GuidAttribute.</target> <target state="translated">Интерфейсы с атрибутом GeneratedComInterfaceAttribute должны быть частичными, не универсальными и должны указывать GUID с помощью System.Runtime.InteropServices.GuidAttribute.</target>
@ -217,6 +232,11 @@
<target state="translated">Недопустимое применение GeneratedComInterfaceAttribute.</target> <target state="translated">Недопустимое применение GeneratedComInterfaceAttribute.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidGeneratedComInterfaceUsageMissingPartialModifier">
<source>The interface '{0}' or one of its containing types is missing the 'partial' keyword. Code will not be generated for '{0}'.</source>
<target state="new">The interface '{0}' or one of its containing types is missing the 'partial' keyword. Code will not be generated for '{0}'.</target>
<note />
</trans-unit>
<trans-unit id="InvalidStringMarshallingConfigurationDescription"> <trans-unit id="InvalidStringMarshallingConfigurationDescription">
<source>The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid.</source> <source>The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid.</source>
<target state="translated">Конфигурация \"StringMarshalling\" и \"StringMarshallingCustomType\" недопустима.</target> <target state="translated">Конфигурация \"StringMarshalling\" и \"StringMarshallingCustomType\" недопустима.</target>

View file

@ -38,8 +38,8 @@
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="AnalysisFailedTitle"> <trans-unit id="AnalysisFailedTitle">
<source>Analysis for generation has failed.</source> <source>Analysis for COM interface generation has failed.</source>
<target state="translated">Oluşturma analizi başarısız oldu.</target> <target state="needs-review-translation">Oluşturma analizi başarısız oldu.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="BaseInterfaceCannotBeGeneratedDescription"> <trans-unit id="BaseInterfaceCannotBeGeneratedDescription">
@ -53,8 +53,8 @@
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="BaseInterfaceCannotBeGeneratedTitle"> <trans-unit id="BaseInterfaceCannotBeGeneratedTitle">
<source>The base COM interface failed to generate source. ComInterfaceGenerator will not generate source for this interface.</source> <source>The base COM interface failed to generate source. Code will not be generated for this interface.</source>
<target state="translated">Temel COM arabirimi kaynak oluşturamadı. ComInterfaceGenerator bu arabirim için kaynak oluşturamaz.</target> <target state="needs-review-translation">Temel COM arabirimi kaynak oluşturamadı. ComInterfaceGenerator bu arabirim için kaynak oluşturamaz.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="ComHostingDoesNotSupportGeneratedComInterfaceDescription"> <trans-unit id="ComHostingDoesNotSupportGeneratedComInterfaceDescription">
@ -197,6 +197,21 @@
<target state="translated">Sağlanan değer bilinen bir 'ExceptionMarshalling' sabit listesi bayrağı değil.</target> <target state="translated">Sağlanan değer bilinen bir 'ExceptionMarshalling' sabit listesi bayrağı değil.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageDescription">
<source>Classes with 'GeneratedComClassAttribute' must implement one or more interfaces with 'GeneratedComInterfaceAttribute', be marked partial, and be non-generic.</source>
<target state="new">Classes with 'GeneratedComClassAttribute' must implement one or more interfaces with 'GeneratedComInterfaceAttribute', be marked partial, and be non-generic.</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageMissingPartialModifier">
<source>Class '{0}' or one of its containing types is not marked 'partial'.</source>
<target state="new">Class '{0}' or one of its containing types is not marked 'partial'.</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageTitle">
<source>Invalid 'GeneratedComClassAttribute' usage</source>
<target state="new">Invalid 'GeneratedComClassAttribute' usage</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComInterfaceAttributeUsageDescription"> <trans-unit id="InvalidGeneratedComInterfaceAttributeUsageDescription">
<source>Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'.</source> <source>Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'.</source>
<target state="translated">'GeneratedComInterfaceAttribute' özniteliğine sahip arabirimler kısmi olmalı, genel olmamalı ve 'System.Runtime.InteropServices.GuidAttribute' ile bir GUID belirtmelidir.</target> <target state="translated">'GeneratedComInterfaceAttribute' özniteliğine sahip arabirimler kısmi olmalı, genel olmamalı ve 'System.Runtime.InteropServices.GuidAttribute' ile bir GUID belirtmelidir.</target>
@ -217,6 +232,11 @@
<target state="translated">Geçersiz 'GeneratedComInterfaceAttribute' kullanımı.</target> <target state="translated">Geçersiz 'GeneratedComInterfaceAttribute' kullanımı.</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidGeneratedComInterfaceUsageMissingPartialModifier">
<source>The interface '{0}' or one of its containing types is missing the 'partial' keyword. Code will not be generated for '{0}'.</source>
<target state="new">The interface '{0}' or one of its containing types is missing the 'partial' keyword. Code will not be generated for '{0}'.</target>
<note />
</trans-unit>
<trans-unit id="InvalidStringMarshallingConfigurationDescription"> <trans-unit id="InvalidStringMarshallingConfigurationDescription">
<source>The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid.</source> <source>The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid.</source>
<target state="translated">'StringMarshalling' ve 'StringMarshallingCustomType' yapılandırması geçersiz.</target> <target state="translated">'StringMarshalling' ve 'StringMarshallingCustomType' yapılandırması geçersiz.</target>

View file

@ -38,8 +38,8 @@
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="AnalysisFailedTitle"> <trans-unit id="AnalysisFailedTitle">
<source>Analysis for generation has failed.</source> <source>Analysis for COM interface generation has failed.</source>
<target state="translated">生成分析失败。</target> <target state="needs-review-translation">生成分析失败。</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="BaseInterfaceCannotBeGeneratedDescription"> <trans-unit id="BaseInterfaceCannotBeGeneratedDescription">
@ -53,8 +53,8 @@
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="BaseInterfaceCannotBeGeneratedTitle"> <trans-unit id="BaseInterfaceCannotBeGeneratedTitle">
<source>The base COM interface failed to generate source. ComInterfaceGenerator will not generate source for this interface.</source> <source>The base COM interface failed to generate source. Code will not be generated for this interface.</source>
<target state="translated">基本 COM 接口无法生成源。ComInterfaceGenerator 不会为此接口生成源。</target> <target state="needs-review-translation">基本 COM 接口无法生成源。ComInterfaceGenerator 不会为此接口生成源。</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="ComHostingDoesNotSupportGeneratedComInterfaceDescription"> <trans-unit id="ComHostingDoesNotSupportGeneratedComInterfaceDescription">
@ -197,6 +197,21 @@
<target state="translated">提供的值不是 “ExceptionMarshalling” 枚举的已知标志。</target> <target state="translated">提供的值不是 “ExceptionMarshalling” 枚举的已知标志。</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageDescription">
<source>Classes with 'GeneratedComClassAttribute' must implement one or more interfaces with 'GeneratedComInterfaceAttribute', be marked partial, and be non-generic.</source>
<target state="new">Classes with 'GeneratedComClassAttribute' must implement one or more interfaces with 'GeneratedComInterfaceAttribute', be marked partial, and be non-generic.</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageMissingPartialModifier">
<source>Class '{0}' or one of its containing types is not marked 'partial'.</source>
<target state="new">Class '{0}' or one of its containing types is not marked 'partial'.</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageTitle">
<source>Invalid 'GeneratedComClassAttribute' usage</source>
<target state="new">Invalid 'GeneratedComClassAttribute' usage</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComInterfaceAttributeUsageDescription"> <trans-unit id="InvalidGeneratedComInterfaceAttributeUsageDescription">
<source>Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'.</source> <source>Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'.</source>
<target state="translated">通过 "GeneratedComInterfaceAttribute" 特性化的接口必须是部分的、非泛型的,并且必须使用 "System.Runtime.InteropServices.GuidAttribute" 指定 GUID。</target> <target state="translated">通过 "GeneratedComInterfaceAttribute" 特性化的接口必须是部分的、非泛型的,并且必须使用 "System.Runtime.InteropServices.GuidAttribute" 指定 GUID。</target>
@ -217,6 +232,11 @@
<target state="translated">“GeneratedComInterfaceAttribute” 使用无效。</target> <target state="translated">“GeneratedComInterfaceAttribute” 使用无效。</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidGeneratedComInterfaceUsageMissingPartialModifier">
<source>The interface '{0}' or one of its containing types is missing the 'partial' keyword. Code will not be generated for '{0}'.</source>
<target state="new">The interface '{0}' or one of its containing types is missing the 'partial' keyword. Code will not be generated for '{0}'.</target>
<note />
</trans-unit>
<trans-unit id="InvalidStringMarshallingConfigurationDescription"> <trans-unit id="InvalidStringMarshallingConfigurationDescription">
<source>The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid.</source> <source>The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid.</source>
<target state="translated">“StringMarshalling” 和 “StringMarshallingCustomType” 的配置无效。</target> <target state="translated">“StringMarshalling” 和 “StringMarshallingCustomType” 的配置无效。</target>

View file

@ -38,8 +38,8 @@
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="AnalysisFailedTitle"> <trans-unit id="AnalysisFailedTitle">
<source>Analysis for generation has failed.</source> <source>Analysis for COM interface generation has failed.</source>
<target state="translated">產生分析失敗。</target> <target state="needs-review-translation">產生分析失敗。</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="BaseInterfaceCannotBeGeneratedDescription"> <trans-unit id="BaseInterfaceCannotBeGeneratedDescription">
@ -53,8 +53,8 @@
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="BaseInterfaceCannotBeGeneratedTitle"> <trans-unit id="BaseInterfaceCannotBeGeneratedTitle">
<source>The base COM interface failed to generate source. ComInterfaceGenerator will not generate source for this interface.</source> <source>The base COM interface failed to generate source. Code will not be generated for this interface.</source>
<target state="translated">基底 COM 介面無法產生來源。ComInterfaceGenerator 不會產生此介面的來源。</target> <target state="needs-review-translation">基底 COM 介面無法產生來源。ComInterfaceGenerator 不會產生此介面的來源。</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="ComHostingDoesNotSupportGeneratedComInterfaceDescription"> <trans-unit id="ComHostingDoesNotSupportGeneratedComInterfaceDescription">
@ -197,6 +197,21 @@
<target state="translated">提供的值不是 'ExceptionMarshalling' 列舉的已知旗標。</target> <target state="translated">提供的值不是 'ExceptionMarshalling' 列舉的已知旗標。</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageDescription">
<source>Classes with 'GeneratedComClassAttribute' must implement one or more interfaces with 'GeneratedComInterfaceAttribute', be marked partial, and be non-generic.</source>
<target state="new">Classes with 'GeneratedComClassAttribute' must implement one or more interfaces with 'GeneratedComInterfaceAttribute', be marked partial, and be non-generic.</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageMissingPartialModifier">
<source>Class '{0}' or one of its containing types is not marked 'partial'.</source>
<target state="new">Class '{0}' or one of its containing types is not marked 'partial'.</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComClassAttributeUsageTitle">
<source>Invalid 'GeneratedComClassAttribute' usage</source>
<target state="new">Invalid 'GeneratedComClassAttribute' usage</target>
<note />
</trans-unit>
<trans-unit id="InvalidGeneratedComInterfaceAttributeUsageDescription"> <trans-unit id="InvalidGeneratedComInterfaceAttributeUsageDescription">
<source>Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'.</source> <source>Interfaces attributed with 'GeneratedComInterfaceAttribute' must be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'.</source>
<target state="translated">屬性為 'GeneratedComInterfaceAttribute' 的介面必須是部分的非泛型介面,且必須指定具有 'System.Runtime.InteropServices.GuidAttribute' 的 GUID。</target> <target state="translated">屬性為 'GeneratedComInterfaceAttribute' 的介面必須是部分的非泛型介面,且必須指定具有 'System.Runtime.InteropServices.GuidAttribute' 的 GUID。</target>
@ -217,6 +232,11 @@
<target state="translated">無效的 'GeneratedComInterfaceAttribute' 使用方式。</target> <target state="translated">無效的 'GeneratedComInterfaceAttribute' 使用方式。</target>
<note /> <note />
</trans-unit> </trans-unit>
<trans-unit id="InvalidGeneratedComInterfaceUsageMissingPartialModifier">
<source>The interface '{0}' or one of its containing types is missing the 'partial' keyword. Code will not be generated for '{0}'.</source>
<target state="new">The interface '{0}' or one of its containing types is missing the 'partial' keyword. Code will not be generated for '{0}'.</target>
<note />
</trans-unit>
<trans-unit id="InvalidStringMarshallingConfigurationDescription"> <trans-unit id="InvalidStringMarshallingConfigurationDescription">
<source>The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid.</source> <source>The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid.</source>
<target state="translated">'StringMarshalling' 和 'StringMarshallingCustomType' 的設定無效。</target> <target state="translated">'StringMarshalling' 和 'StringMarshallingCustomType' 的設定無效。</target>

View file

@ -0,0 +1,365 @@
// 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.Runtime.InteropServices.Marshalling;
using System.Runtime.InteropServices;
using SharedTypes.ComInterfaces;
using Xunit;
using static ComInterfaceGenerator.Tests.ComInterfaces;
using System.Collections.Generic;
namespace ComInterfaceGenerator.Tests
{
public partial class RcwAroundCcwTests
{
static TInterface CreateWrapper<TClass, TInterface>() where TClass : TInterface, new()
{
var cw = new StrategyBasedComWrappers();
var comPtr = cw.GetOrCreateComInterfaceForObject(new TClass(), CreateComInterfaceFlags.None);
var comObject = cw.GetOrCreateObjectForComInstance(comPtr, CreateObjectFlags.None);
var ifaceObject = (TInterface)comObject;
return ifaceObject;
}
[Fact]
public void IGetAndSetInt()
{
var obj = CreateWrapper<GetAndSetInt, IGetAndSetInt>();
obj.SetInt(1);
Assert.Equal(1, obj.GetInt());
}
[Fact]
public void IDerived()
{
var obj = CreateWrapper<Derived, IDerived>();
obj.SetInt(1);
Assert.Equal(1, obj.GetInt());
obj.SetName("A");
Assert.Equal("A", obj.GetName());
}
[Fact]
public void IBool()
{
var obj = CreateWrapper<IBoolImpl, IBool>();
Assert.False(obj.Get());
obj.Set(true);
Assert.True(obj.Get());
}
[Fact]
public void IFloat()
{
var obj = CreateWrapper<IFloatImpl, IFloat>();
obj.Set(2.71F);
Assert.Equal(2.71F, obj.Get());
}
[Fact]
public void IIntArray()
{
var obj = CreateWrapper<IIntArrayImpl, IIntArray>();
int[] data = new int[] { 1, 2, 3 };
int length = data.Length;
obj.Set(data, length);
Assert.Equal(data, obj.Get(out int _));
obj.Get2(out var value);
Assert.Equal(data, value);
}
[Fact]
public void IJaggedIntArray()
{
int[][] data = new int[][] { new int[] { 1, 2, 3 }, new int[] { 4, 5 }, new int[] { 6, 7, 8, 9 } };
int[] widths = new int[] { 3, 2, 4 };
int length = data.Length;
var obj = CreateWrapper<IJaggedIntArrayImpl, IJaggedIntArray>();
obj.Set(data, widths, length);
Assert.Equal(data, obj.Get(out _, out _));
_ = obj.Get2(out var value, out _);
Assert.Equal(data, value);
}
[Fact]
public void IInterface()
{
var iint = CreateWrapper<IIntImpl, IInt>();
var obj = CreateWrapper<IInterfaceImpl, IInterface>();
obj.Set(iint);
_ = obj.Get();
}
[Fact]
public void ICollectionMarshallingFails()
{
var obj = CreateWrapper<ICollectionMarshallingFailsImpl, ICollectionMarshallingFails>();
Assert.Throws<ArgumentException>(() =>
_ = obj.Get()
);
Assert.Throws<ArgumentException>(() =>
obj.Set(new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 })
);
}
}
public static partial class ComInterfaces
{
[GeneratedComInterface]
[Guid("EE6D1F2A-3418-4317-A87C-35488F6546AB")]
internal partial interface IInt
{
public int Get();
public void Set(int value);
}
[GeneratedComClass]
internal partial class IIntImpl : IInt
{
int _data;
public int Get() => _data;
public void Set(int value) => _data = value;
}
[GeneratedComInterface]
[Guid("5A9D3ED6-CC17-4FB9-8F82-0070489B7213")]
internal partial interface IBool
{
[return: MarshalAs(UnmanagedType.I1)]
bool Get();
void Set([MarshalAs(UnmanagedType.I1)] bool value);
}
[GeneratedComClass]
internal partial class IBoolImpl : IBool
{
bool _data;
public bool Get() => _data;
public void Set(bool value) => _data = value;
}
[GeneratedComInterface]
[Guid("9FA4A8A9-2D8F-48A8-B6FB-B44B5F1B9FB6")]
internal partial interface IFloat
{
float Get();
void Set(float value);
}
[GeneratedComClass]
internal partial class IFloatImpl : IFloat
{
float _data;
public float Get() => _data;
public void Set(float value) => _data = value;
}
[GeneratedComInterface]
[Guid("9FA4A8A9-3D8F-48A8-B6FB-B45B5F1B9FB6")]
internal partial interface IIntArray
{
[return: MarshalUsing(CountElementName = nameof(size))]
int[] Get(out int size);
int Get2([MarshalUsing(CountElementName = MarshalUsingAttribute.ReturnsCountValue)] out int[] array);
void Set([MarshalUsing(CountElementName = nameof(size))] int[] array, int size);
}
[GeneratedComClass]
internal partial class IIntArrayImpl : IIntArray
{
int[] _data;
public int[] Get(out int size)
{
size = _data.Length;
return _data;
}
public int Get2(out int[] array)
{
array = _data;
return array.Length;
}
public void Set(int[] array, int size)
{
_data = array;
}
}
[GeneratedComInterface]
[Guid("9FA4A8A9-3D8F-48A8-B6FB-B45B5F1B9FB6")]
internal partial interface IJaggedIntArray
{
[return: MarshalUsing(CountElementName = nameof(length)),
MarshalUsing(ElementIndirectionDepth = 1, CountElementName = nameof(widths))]
int[][] Get(
[MarshalUsing(CountElementName = nameof(length))]
out int[] widths,
out int length);
int Get2(
[MarshalUsing(CountElementName = MarshalUsingAttribute.ReturnsCountValue),
MarshalUsing(ElementIndirectionDepth = 1, CountElementName = nameof(widths))]
out int[][] array,
[MarshalUsing(CountElementName = MarshalUsingAttribute.ReturnsCountValue)]
out int[] widths);
void Set(
[MarshalUsing(CountElementName = nameof(length)),
MarshalUsing(ElementIndirectionDepth = 1, CountElementName = nameof(widths))]
int[][] array,
[MarshalUsing(CountElementName = nameof(length))]
int[] widths,
int length);
}
[GeneratedComClass]
internal partial class IJaggedIntArrayImpl : IJaggedIntArray
{
int[][] _data = new int[][] { new int[] { 1, 2, 3 }, new int[] { 4, 5 }, new int[] { 6, 7, 8, 9 } };
int[] _widths = new int[] { 3, 2, 4 };
public int[][] Get(out int[] widths, out int length)
{
widths = _widths;
length = _data.Length;
return _data;
}
public int Get2(out int[][] array, out int[] widths)
{
array = _data;
widths = _widths;
return array.Length;
}
public void Set(int[][] array, int[] widths, int length)
{
_data = array;
_widths = widths;
}
}
[CustomMarshaller(typeof(int), MarshalMode.ElementIn, typeof(ThrowOn4thElementMarshalled))]
[CustomMarshaller(typeof(int), MarshalMode.ElementOut, typeof(ThrowOn4thElementMarshalled))]
internal static class ThrowOn4thElementMarshalled
{
static int _marshalledCount = 0;
static int _unmarshalledCount = 0;
public static nint ConvertToUnmanaged(int managed)
{
if (_marshalledCount++ == 3)
{
_marshalledCount = 0;
throw new ArgumentException("The element was the 4th element (with 0-based index 3)");
}
return managed;
}
public static int ConvertToManaged(nint unmanaged)
{
if (_unmarshalledCount++ == 3)
{
_unmarshalledCount = 0;
throw new ArgumentException("The element was the 4th element (with 0-based index 3)");
}
return (int)unmanaged;
}
}
[GeneratedComInterface]
[Guid("A4857395-06FB-4A6E-81DB-35461BE999C5")]
internal partial interface ICollectionMarshallingFails
{
[return: MarshalUsing(ConstantElementCount = 10)]
[return: MarshalUsing(typeof(ThrowOn4thElementMarshalled), ElementIndirectionDepth = 1)]
public int[] Get();
public void Set(
[MarshalUsing(ConstantElementCount = 10)]
[MarshalUsing(typeof(ThrowOn4thElementMarshalled), ElementIndirectionDepth = 1)]
int[] value);
}
[GeneratedComClass]
public partial class ICollectionMarshallingFailsImpl : ICollectionMarshallingFails
{
int[] _data = new[] { 1, 2, 3 };
public int[] Get() => _data;
public void Set(int[] value) => _data = value;
}
[GeneratedComInterface]
[Guid("9FA4A8A9-3D8F-48A8-B6FB-B45B5F1B9FB6")]
internal partial interface IJaggedIntArrayMarshallingFails
{
[return: MarshalUsing(CountElementName = nameof(length)),
MarshalUsing(ElementIndirectionDepth = 1, CountElementName = nameof(widths)),
MarshalUsing(typeof(ThrowOn4thElementMarshalled), ElementIndirectionDepth = 2)]
int[][] Get(
[MarshalUsing(CountElementName = nameof(length))]
out int[] widths,
out int length);
int Get2(
[MarshalUsing(CountElementName = MarshalUsingAttribute.ReturnsCountValue),
MarshalUsing(ElementIndirectionDepth = 1, CountElementName = nameof(widths)),
MarshalUsing(typeof(ThrowOn4thElementMarshalled), ElementIndirectionDepth = 2)]
out int[][] array,
[MarshalUsing(CountElementName = MarshalUsingAttribute.ReturnsCountValue)]
out int[] widths);
void Set(
[MarshalUsing(CountElementName = nameof(length)),
MarshalUsing(ElementIndirectionDepth = 1, CountElementName = nameof(widths)),
MarshalUsing(typeof(ThrowOn4thElementMarshalled), ElementIndirectionDepth = 2)]
int[][] array,
[MarshalUsing(CountElementName = nameof(length))]
int[] widths,
int length);
}
[GeneratedComClass]
internal partial class IJaggedIntArrayMarshallingFailsImpl : IJaggedIntArrayMarshallingFails
{
int[][] _data = new int[][] { new int[] { 1, 2, 3 }, new int[] { 4, 5 }, new int[] { 6, 7, 8, 9 } };
int[] _widths = new int[] { 3, 2, 4 };
public int[][] Get(out int[] widths, out int length)
{
widths = _widths;
length = _data.Length;
return _data;
}
public int Get2(out int[][] array, out int[] widths)
{
array = _data;
widths = _widths;
return array.Length;
}
public void Set(int[][] array, int[] widths, int length)
{
_data = array;
_widths = widths;
}
}
[GeneratedComInterface]
[Guid("A4857398-06FB-4A6E-81DB-35461BE999C5")]
internal partial interface IInterface
{
public IInt Get();
public void Set(IInt value);
}
[GeneratedComClass]
public partial class IInterfaceImpl : IInterface
{
IInt _data = new IIntImpl();
IInt IInterface.Get() => _data;
void IInterface.Set(IInt value)
{
int x = value.Get();
value.Set(x);
_data = value;
}
}
}
}

View file

@ -78,7 +78,6 @@ namespace ComInterfaceGenerator.Tests
} }
[Fact] [Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/85795", TargetFrameworkMonikers.Any)]
public void RcwToCcw() public void RcwToCcw()
{ {
var cw = new StrategyBasedComWrappers(); var cw = new StrategyBasedComWrappers();

View file

@ -420,6 +420,38 @@ namespace ComInterfaceGenerator.Unit.Tests
await VerifyComInterfaceGenerator.VerifySourceGeneratorAsync(source, expectedDiagnostic); await VerifyComInterfaceGenerator.VerifySourceGeneratorAsync(source, expectedDiagnostic);
} }
[Fact]
public async Task VerifyNonPartialInterfaceWarns()
{
string basic = $$"""
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.Marshalling;
[GeneratedComInterface]
[Guid("9D3FD745-3C90-4C10-B140-FAFB01E3541D")]
public interface {|#0:I|}
{
void Method();
}
""";
string containingTypeIsNotPartial = $$"""
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.Marshalling;
public static class Test
{
[GeneratedComInterface]
[Guid("9D3FD745-3C90-4C10-B140-FAFB01E3541D")]
public partial interface {|#0:I|}
{
void Method();
}
}
""";
await VerifyComInterfaceGenerator.VerifySourceGeneratorAsync(basic, new DiagnosticResult(GeneratorDiagnostics.InvalidAttributedInterfaceMissingPartialModifiers).WithLocation(0).WithArguments("I"));
await VerifyComInterfaceGenerator.VerifySourceGeneratorAsync(containingTypeIsNotPartial, new DiagnosticResult(GeneratorDiagnostics.InvalidAttributedInterfaceMissingPartialModifiers).WithLocation(0).WithArguments("I"));
}
[Fact] [Fact]
public async Task VerifyComInterfaceInheritingFromComInterfaceInOtherAssemblyReportsDiagnostic() public async Task VerifyComInterfaceInheritingFromComInterfaceInOtherAssemblyReportsDiagnostic()
{ {

View file

@ -212,7 +212,7 @@ namespace ComInterfaceGenerator.Unit.Tests
"""; """;
await VerifyCS.VerifyAnalyzerAsync( await VerifyCS.VerifyAnalyzerAsync(
_usings + snippet, _usings + snippet,
VerifyCS.Diagnostic(AnalyzerDiagnostics.InterfaceTypeNotSupported) VerifyCS.Diagnostic(GeneratorDiagnostics.InterfaceTypeNotSupported)
.WithLocation(0) .WithLocation(0)
.WithArguments(TypeNames.ComInterfaceType + "." + nameof(ComInterfaceType.InterfaceIsIDispatch))); .WithArguments(TypeNames.ComInterfaceType + "." + nameof(ComInterfaceType.InterfaceIsIDispatch)));
} }
@ -232,7 +232,7 @@ namespace ComInterfaceGenerator.Unit.Tests
"""; """;
await VerifyCS.VerifyAnalyzerAsync( await VerifyCS.VerifyAnalyzerAsync(
_usings + snippet, _usings + snippet,
VerifyCS.Diagnostic(AnalyzerDiagnostics.InterfaceTypeNotSupported) VerifyCS.Diagnostic(GeneratorDiagnostics.InterfaceTypeNotSupported)
.WithLocation(0) .WithLocation(0)
.WithArguments("2")); .WithArguments("2"));
} }
@ -252,7 +252,7 @@ namespace ComInterfaceGenerator.Unit.Tests
"""; """;
await VerifyCS.VerifyAnalyzerAsync( await VerifyCS.VerifyAnalyzerAsync(
_usings + snippet, _usings + snippet,
VerifyCS.Diagnostic(AnalyzerDiagnostics.InterfaceTypeNotSupported) VerifyCS.Diagnostic(GeneratorDiagnostics.InterfaceTypeNotSupported)
.WithLocation(0) .WithLocation(0)
.WithArguments(TypeNames.ComInterfaceType + "." + nameof(ComInterfaceType.InterfaceIsIInspectable))); .WithArguments(TypeNames.ComInterfaceType + "." + nameof(ComInterfaceType.InterfaceIsIInspectable)));
} }
@ -272,7 +272,7 @@ namespace ComInterfaceGenerator.Unit.Tests
"""; """;
await VerifyCS.VerifyAnalyzerAsync( await VerifyCS.VerifyAnalyzerAsync(
_usings + snippet, _usings + snippet,
VerifyCS.Diagnostic(AnalyzerDiagnostics.InterfaceTypeNotSupported) VerifyCS.Diagnostic(GeneratorDiagnostics.InterfaceTypeNotSupported)
.WithLocation(0) .WithLocation(0)
.WithArguments("3")); .WithArguments("3"));
} }
@ -292,7 +292,7 @@ namespace ComInterfaceGenerator.Unit.Tests
"""; """;
await VerifyCS.VerifyAnalyzerAsync( await VerifyCS.VerifyAnalyzerAsync(
_usings + snippet, _usings + snippet,
VerifyCS.Diagnostic(AnalyzerDiagnostics.InterfaceTypeNotSupported) VerifyCS.Diagnostic(GeneratorDiagnostics.InterfaceTypeNotSupported)
.WithLocation(0) .WithLocation(0)
.WithArguments(TypeNames.ComInterfaceType + "." + nameof(ComInterfaceType.InterfaceIsDual))); .WithArguments(TypeNames.ComInterfaceType + "." + nameof(ComInterfaceType.InterfaceIsDual)));
} }
@ -312,7 +312,7 @@ namespace ComInterfaceGenerator.Unit.Tests
"""; """;
await VerifyCS.VerifyAnalyzerAsync( await VerifyCS.VerifyAnalyzerAsync(
_usings + snippet, _usings + snippet,
VerifyCS.Diagnostic(AnalyzerDiagnostics.InterfaceTypeNotSupported) VerifyCS.Diagnostic(GeneratorDiagnostics.InterfaceTypeNotSupported)
.WithLocation(0) .WithLocation(0)
.WithArguments("0")); .WithArguments("0"));
} }
@ -374,7 +374,7 @@ namespace ComInterfaceGenerator.Unit.Tests
"""; """;
await VerifyCS.VerifyAnalyzerAsync( await VerifyCS.VerifyAnalyzerAsync(
_usings + snippet, _usings + snippet,
VerifyCS.Diagnostic(AnalyzerDiagnostics.InterfaceTypeNotSupported) VerifyCS.Diagnostic(GeneratorDiagnostics.InterfaceTypeNotSupported)
.WithLocation(0) .WithLocation(0)
.WithArguments(TypeNames.ComInterfaceType + "." + nameof(ComInterfaceType.InterfaceIsIDispatch))); .WithArguments(TypeNames.ComInterfaceType + "." + nameof(ComInterfaceType.InterfaceIsIDispatch)));
} }
@ -396,7 +396,7 @@ namespace ComInterfaceGenerator.Unit.Tests
"""; """;
await VerifyCS.VerifyAnalyzerAsync( await VerifyCS.VerifyAnalyzerAsync(
_usings + snippet, _usings + snippet,
VerifyCS.Diagnostic(AnalyzerDiagnostics.InterfaceTypeNotSupported) VerifyCS.Diagnostic(GeneratorDiagnostics.InterfaceTypeNotSupported)
.WithLocation(0) .WithLocation(0)
.WithArguments("2")); .WithArguments("2"));
} }
@ -418,7 +418,7 @@ namespace ComInterfaceGenerator.Unit.Tests
"""; """;
await VerifyCS.VerifyAnalyzerAsync( await VerifyCS.VerifyAnalyzerAsync(
_usings + snippet, _usings + snippet,
VerifyCS.Diagnostic(AnalyzerDiagnostics.InterfaceTypeNotSupported) VerifyCS.Diagnostic(GeneratorDiagnostics.InterfaceTypeNotSupported)
.WithLocation(0) .WithLocation(0)
.WithArguments(TypeNames.ComInterfaceType + "." + nameof(ComInterfaceType.InterfaceIsIInspectable))); .WithArguments(TypeNames.ComInterfaceType + "." + nameof(ComInterfaceType.InterfaceIsIInspectable)));
} }
@ -440,7 +440,7 @@ namespace ComInterfaceGenerator.Unit.Tests
"""; """;
await VerifyCS.VerifyAnalyzerAsync( await VerifyCS.VerifyAnalyzerAsync(
_usings + snippet, _usings + snippet,
VerifyCS.Diagnostic(AnalyzerDiagnostics.InterfaceTypeNotSupported) VerifyCS.Diagnostic(GeneratorDiagnostics.InterfaceTypeNotSupported)
.WithLocation(0) .WithLocation(0)
.WithArguments("3")); .WithArguments("3"));
} }
@ -462,7 +462,7 @@ namespace ComInterfaceGenerator.Unit.Tests
"""; """;
await VerifyCS.VerifyAnalyzerAsync( await VerifyCS.VerifyAnalyzerAsync(
_usings + snippet, _usings + snippet,
VerifyCS.Diagnostic(AnalyzerDiagnostics.InterfaceTypeNotSupported) VerifyCS.Diagnostic(GeneratorDiagnostics.InterfaceTypeNotSupported)
.WithLocation(0) .WithLocation(0)
.WithArguments(TypeNames.ComInterfaceType + "." + nameof(ComInterfaceType.InterfaceIsDual))); .WithArguments(TypeNames.ComInterfaceType + "." + nameof(ComInterfaceType.InterfaceIsDual)));
} }
@ -484,7 +484,7 @@ namespace ComInterfaceGenerator.Unit.Tests
"""; """;
await VerifyCS.VerifyAnalyzerAsync( await VerifyCS.VerifyAnalyzerAsync(
_usings + snippet, _usings + snippet,
VerifyCS.Diagnostic(AnalyzerDiagnostics.InterfaceTypeNotSupported) VerifyCS.Diagnostic(GeneratorDiagnostics.InterfaceTypeNotSupported)
.WithLocation(0) .WithLocation(0)
.WithArguments("0")); .WithArguments("0"));
} }

View file

@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license. // The .NET Foundation licenses this file to you under the MIT license.
using System; using System;
using System.Collections.Generic;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Runtime.InteropServices.Marshalling; using System.Runtime.InteropServices.Marshalling;
@ -18,4 +19,12 @@ namespace SharedTypes.ComInterfaces
internal new const string _guid = "7F0DB364-3C04-4487-9193-4BB05DC7B654"; internal new const string _guid = "7F0DB364-3C04-4487-9193-4BB05DC7B654";
} }
[GeneratedComClass]
internal partial class Derived : GetAndSetInt, IDerived
{
string _data = "hello";
public string GetName() => _data;
public void SetName(string name) => _data = name;
}
} }

View file

@ -17,4 +17,11 @@ namespace SharedTypes.ComInterfaces
public const string _guid = "2c3f9903-b586-46b1-881b-adfce9af47b1"; public const string _guid = "2c3f9903-b586-46b1-881b-adfce9af47b1";
} }
[GeneratedComClass]
internal partial class GetAndSetInt : IGetAndSetInt
{
int _data = 0;
public int GetInt() => _data;
public void SetInt(int x) => _data = x;
}
} }