diff --git a/docs/project/list-of-diagnostics.md b/docs/project/list-of-diagnostics.md index 72597030dffaa..da1639e0d110f 100644 --- a/docs/project/list-of-diagnostics.md +++ b/docs/project/list-of-diagnostics.md @@ -263,11 +263,21 @@ The diagnostic id values reserved for .NET Libraries analyzer warnings are `SYSL | __`SYSLIB1222`__ | Constructor annotated with JsonConstructorAttribute is inaccessible. | | __`SYSLIB1223`__ | Attributes deriving from JsonConverterAttribute are not supported by the source generator. | | __`SYSLIB1224`__ | Types annotated with JsonSerializableAttribute must be classes deriving from JsonSerializerContext. | -| __`SYSLIB1225`__ | *`SYSLIB1220`-`SYSLIB229` reserved for System.Text.Json.SourceGeneration.* | -| __`SYSLIB1226`__ | *`SYSLIB1220`-`SYSLIB229` reserved for System.Text.Json.SourceGeneration.* | -| __`SYSLIB1227`__ | *`SYSLIB1220`-`SYSLIB229` reserved for System.Text.Json.SourceGeneration.* | -| __`SYSLIB1228`__ | *`SYSLIB1220`-`SYSLIB229` reserved for System.Text.Json.SourceGeneration.* | -| __`SYSLIB1229`__ | *`SYSLIB1220`-`SYSLIB229` reserved for System.Text.Json.SourceGeneration.* | +| __`SYSLIB1225`__ | *`SYSLIB1220`-`SYSLIB1229` reserved for System.Text.Json.SourceGeneration.* | +| __`SYSLIB1226`__ | *`SYSLIB1220`-`SYSLIB1229` reserved for System.Text.Json.SourceGeneration.* | +| __`SYSLIB1227`__ | *`SYSLIB1220`-`SYSLIB1229` reserved for System.Text.Json.SourceGeneration.* | +| __`SYSLIB1228`__ | *`SYSLIB1220`-`SYSLIB1229` reserved for System.Text.Json.SourceGeneration.* | +| __`SYSLIB1229`__ | *`SYSLIB1220`-`SYSLIB1229` reserved for System.Text.Json.SourceGeneration.* | +| __`SYSLIB1230`__ | Deriving from a `GeneratedComInterface`-attributed interface defined in another assembly is not supported. | +| __`SYSLIB1231`__ | *`SYSLIB1230`-`SYSLIB1239` reserved for Microsoft.Interop.ComInterfaceGenerator.* | +| __`SYSLIB1232`__ | *`SYSLIB1230`-`SYSLIB1239` reserved for Microsoft.Interop.ComInterfaceGenerator.* | +| __`SYSLIB1233`__ | *`SYSLIB1230`-`SYSLIB1239` reserved for Microsoft.Interop.ComInterfaceGenerator.* | +| __`SYSLIB1234`__ | *`SYSLIB1230`-`SYSLIB1239` reserved for Microsoft.Interop.ComInterfaceGenerator.* | +| __`SYSLIB1235`__ | *`SYSLIB1230`-`SYSLIB1239` reserved for Microsoft.Interop.ComInterfaceGenerator.* | +| __`SYSLIB1236`__ | *`SYSLIB1230`-`SYSLIB1239` reserved for Microsoft.Interop.ComInterfaceGenerator.* | +| __`SYSLIB1237`__ | *`SYSLIB1230`-`SYSLIB1239` reserved for Microsoft.Interop.ComInterfaceGenerator.* | +| __`SYSLIB1238`__ | *`SYSLIB1230`-`SYSLIB1239` reserved for Microsoft.Interop.ComInterfaceGenerator.* | +| __`SYSLIB1239`__ | *`SYSLIB1230`-`SYSLIB1239` reserved for Microsoft.Interop.ComInterfaceGenerator.* | ### Diagnostic Suppressions (`SYSLIBSUPPRESS****`) diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceContext.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceContext.cs index 65bd2027f5d9b..ce10795baeba9 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceContext.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceContext.cs @@ -15,6 +15,7 @@ internal sealed record ComInterfaceContext internal ComInterfaceInfo Info { get; init; } internal ComInterfaceContext? Base { get; init; } internal ComInterfaceOptions Options { get; init; } + internal bool IsExternallyDefined { get; init; } private ComInterfaceContext(ComInterfaceInfo info, ComInterfaceContext? @base, ComInterfaceOptions options) { @@ -51,7 +52,7 @@ DiagnosticOr AddContext(ComInterfaceInfo iface) if (iface.BaseInterfaceKey is null) { - var baselessCtx = DiagnosticOr.From(new ComInterfaceContext(iface, null, iface.Options)); + var baselessCtx = DiagnosticOr.From(new ComInterfaceContext(iface, null, iface.Options) { IsExternallyDefined = iface.IsExternallyDefined }); nameToContextCache[iface.ThisInterfaceKey] = baselessCtx; return baselessCtx; } @@ -75,7 +76,7 @@ DiagnosticOr AddContext(ComInterfaceInfo iface) } DiagnosticOr baseContext = baseCachedValue ?? baseReturnedValue; Debug.Assert(baseContext.HasValue); - var ctx = DiagnosticOr.From(new ComInterfaceContext(iface, baseContext.Value, iface.Options)); + var ctx = DiagnosticOr.From(new ComInterfaceContext(iface, baseContext.Value, iface.Options) { IsExternallyDefined = iface.IsExternallyDefined }); nameToContextCache[iface.ThisInterfaceKey] = ctx; return ctx; } diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceGenerator.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceGenerator.cs index 1c44a5ab0060e..25113c404853f 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceGenerator.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceGenerator.cs @@ -48,7 +48,14 @@ public void Initialize(IncrementalGeneratorInitializationContext context) { return ComInterfaceInfo.From(data.Left.Symbol, data.Left.Syntax, data.Right, ct); }); - var interfaceSymbolsWithoutDiagnostics = context.FilterAndReportDiagnostics(interfaceSymbolOrDiagnostics); + var interfaceSymbolsToGenerateWithoutDiagnostics = context.FilterAndReportDiagnostics(interfaceSymbolOrDiagnostics); + + var externalInterfaceSymbols = attributedInterfaces.SelectMany(static (data, ct) => + { + return ComInterfaceInfo.CreateInterfaceInfoForBaseInterfacesInOtherCompilations(data.Symbol); + }); + + var interfaceSymbolsWithoutDiagnostics = interfaceSymbolsToGenerateWithoutDiagnostics.Concat(externalInterfaceSymbols); var interfaceContextsOrDiagnostics = interfaceSymbolsWithoutDiagnostics .Select((data, ct) => data.InterfaceInfo!) @@ -76,7 +83,14 @@ public void Initialize(IncrementalGeneratorInitializationContext context) .SelectMany(static (data, ct) => { return ComMethodContext.CalculateAllMethods(data, ct); - }); + }) + // Now that we've determined method offsets, we can remove all externally defined methods. + // We'll also filter out methods originally declared on externally defined base interfaces + // as we may not be able to emit them into our assembly. + .Where(context => !context.Method.OriginalDeclaringInterface.IsExternallyDefined); + + // Now that we've determined method offsets, we can remove all externally defined interfaces. + var interfaceContextsToGenerate = interfaceContexts.Where(context => !context.IsExternallyDefined); // A dictionary isn't incremental, but it will have symbols, so it will never be incremental anyway. var methodInfoToSymbolMap = methodInfoAndSymbolGroupedByInterface @@ -97,7 +111,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context) var interfaceAndMethodsContexts = comMethodContexts .Collect() - .Combine(interfaceContexts.Collect()) + .Combine(interfaceContextsToGenerate.Collect()) .SelectMany((data, ct) => GroupComContextsForInterfaceGeneration(data.Left, data.Right, ct)); // Generate the code for the managed-to-unmanaged stubs. @@ -120,7 +134,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context) .SelectMany((data, ct) => data.DeclaredMethods.SelectMany(m => m.ManagedToUnmanagedStub.Diagnostics).Union(data.DeclaredMethods.SelectMany(m => m.UnmanagedToManagedStub.Diagnostics)))); // Generate the native interface metadata for each [GeneratedComInterface]-attributed interface. - var nativeInterfaceInformation = interfaceContexts + var nativeInterfaceInformation = interfaceContextsToGenerate .Select(static (data, ct) => data.Info) .Select(GenerateInterfaceInformation) .WithTrackingName(StepNames.GenerateInterfaceInformation) @@ -150,14 +164,14 @@ public void Initialize(IncrementalGeneratorInitializationContext context) .WithComparer(SyntaxEquivalentComparer.Instance) .SelectNormalized(); - var iUnknownDerivedAttributeApplication = interfaceContexts + var iUnknownDerivedAttributeApplication = interfaceContextsToGenerate .Select(static (data, ct) => data.Info) .Select(GenerateIUnknownDerivedAttributeApplication) .WithTrackingName(StepNames.GenerateIUnknownDerivedAttribute) .WithComparer(SyntaxEquivalentComparer.Instance) .SelectNormalized(); - var filesToGenerate = interfaceContexts + var filesToGenerate = interfaceContextsToGenerate .Zip(nativeInterfaceInformation) .Zip(managedToNativeInterfaceImplementations) .Zip(nativeToManagedVtableMethods) diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs index 8e107f2a47b98..9829c914cb11f 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceInfo.cs @@ -2,12 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Collections.Immutable; using System.Diagnostics.CodeAnalysis; using System.Threading; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; +using InterfaceInfo = (Microsoft.Interop.ComInterfaceInfo InterfaceInfo, Microsoft.CodeAnalysis.INamedTypeSymbol Symbol); using DiagnosticOrInterfaceInfo = Microsoft.Interop.DiagnosticOr<(Microsoft.Interop.ComInterfaceInfo InterfaceInfo, Microsoft.CodeAnalysis.INamedTypeSymbol Symbol)>; +using System.Diagnostics; namespace Microsoft.Interop { @@ -25,6 +28,7 @@ internal sealed record ComInterfaceInfo public Guid InterfaceId { get; init; } public ComInterfaceOptions Options { get; init; } public Location DiagnosticLocation { get; init; } + public bool IsExternallyDefined { get; init; } private ComInterfaceInfo( ManagedTypeInfo type, @@ -90,8 +94,8 @@ public static DiagnosticOrInterfaceInfo From(INamedTypeSymbol symbol, InterfaceD if (!OptionsAreValid(symbol, syntax, interfaceAttributeData, baseAttributeData, out DiagnosticInfo? optionsDiagnostic)) return DiagnosticOrInterfaceInfo.From(optionsDiagnostic); - return DiagnosticOrInterfaceInfo.From( - (new ComInterfaceInfo( + InterfaceInfo info = ( + new ComInterfaceInfo( ManagedTypeInfo.CreateTypeInfoForTypeSymbol(symbol), symbol.ToDisplayString(), baseSymbol?.ToDisplayString(), @@ -101,7 +105,72 @@ public static DiagnosticOrInterfaceInfo From(INamedTypeSymbol symbol, InterfaceD guid ?? Guid.Empty, interfaceAttributeData.Options, syntax.Identifier.GetLocation()), - symbol)); + symbol); + + // Now that we've validated all of our requirements, we will check for some non-blocking scenarios + // and emit diagnostics. + ImmutableArray.Builder nonFatalDiagnostics = ImmutableArray.CreateBuilder(); + + // If there is a base interface and it is defined in another assembly, + // warn the user that they are in a scenario that has pitfalls. + // We check that either the base interface symbol is defined in a non-source assembly (ie an assembly referenced as metadata) + // or if it is defined in a different source assembly (ie another C# project in the same solution when loaded in an IDE) + // as Roslyn can provide the symbol information in either shape to us depending on the scenario. + if (baseSymbol is not null + && (baseSymbol.ContainingAssembly is not ISourceAssemblySymbol + || (baseSymbol.ContainingAssembly is ISourceAssemblySymbol { Compilation: Compilation baseComp } + && baseComp != env.Compilation))) + { + nonFatalDiagnostics.Add(DiagnosticInfo.Create( + GeneratorDiagnostics.BaseInterfaceDefinedInOtherAssembly, + syntax.Identifier.GetLocation(), + symbol.ToDisplayString(), + baseSymbol.ToDisplayString())); + } + + if (nonFatalDiagnostics.Count != 0) + { + // Report non-fatal diagnostics with the result. + return DiagnosticOrInterfaceInfo.From(info, nonFatalDiagnostics.ToArray()); + } + + // We have no non-fatal diagnostics, so return the result. + return DiagnosticOrInterfaceInfo.From(info); + } + + public static ImmutableArray CreateInterfaceInfoForBaseInterfacesInOtherCompilations( + INamedTypeSymbol symbol) + { + if (!TryGetBaseComInterface(symbol, null, out INamedTypeSymbol? baseSymbol, out _) || baseSymbol is null) + return ImmutableArray.Empty; + + if (SymbolEqualityComparer.Default.Equals(baseSymbol.ContainingAssembly, symbol.ContainingAssembly)) + return ImmutableArray.Empty; + + ImmutableArray.Builder builder = ImmutableArray.CreateBuilder(); + while (baseSymbol is not null) + { + var thisSymbol = baseSymbol; + TryGetBaseComInterface(thisSymbol, null, out baseSymbol, out _); + var interfaceAttributeData = GeneratedComInterfaceCompilationData.GetAttributeDataFromInterfaceSymbol(thisSymbol); + builder.Add(( + new ComInterfaceInfo( + ManagedTypeInfo.CreateTypeInfoForTypeSymbol(thisSymbol), + thisSymbol.ToDisplayString(), + baseSymbol?.ToDisplayString(), + null!, + default, + default, + Guid.Empty, + interfaceAttributeData.Options, + Location.None) + { + IsExternallyDefined = true + }, + thisSymbol)); + } + + return builder.ToImmutable(); } private static bool IsInPartialContext(INamedTypeSymbol symbol, InterfaceDeclarationSyntax syntax, [NotNullWhen(false)] out DiagnosticInfo? diagnostic) @@ -219,8 +288,9 @@ private static bool OptionsAreValid( /// /// Returns true if there is 0 or 1 base Com interfaces (i.e. the inheritance is valid), and returns false when there are 2 or more base Com interfaces and sets . /// - private static bool TryGetBaseComInterface(INamedTypeSymbol comIface, InterfaceDeclarationSyntax syntax, out INamedTypeSymbol? baseComIface, [NotNullWhen(false)] out DiagnosticInfo? diagnostic) + private static bool TryGetBaseComInterface(INamedTypeSymbol comIface, InterfaceDeclarationSyntax? syntax, out INamedTypeSymbol? baseComIface, [NotNullWhen(false)] out DiagnosticInfo? diagnostic) { + diagnostic = null; baseComIface = null; foreach (var implemented in comIface.Interfaces) { @@ -230,17 +300,23 @@ private static bool TryGetBaseComInterface(INamedTypeSymbol comIface, InterfaceD { if (baseComIface is not null) { - diagnostic = DiagnosticInfo.Create( - GeneratorDiagnostics.MultipleComInterfaceBaseTypes, - syntax.Identifier.GetLocation(), - comIface.ToDisplayString()); + // If we're inspecting an external symbol, + // we don't have syntax. + // In that case, don't report a diagnostic. One will be reported + // when building that symbol's compilation. + if (syntax is not null) + { + diagnostic = DiagnosticInfo.Create( + GeneratorDiagnostics.MultipleComInterfaceBaseTypes, + syntax.Identifier.GetLocation(), + comIface.ToDisplayString()); + } return false; } baseComIface = implemented; } } } - diagnostic = null; return true; } diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComMethodContext.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComMethodContext.cs index 25e49f8f81745..f0cb535607b10 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComMethodContext.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComMethodContext.cs @@ -194,6 +194,7 @@ ImmutableArray AddMethods(ComInterfaceContext iface, IEnumerable.From(( + new ComMethodInfo(null!, method.Name, method.GetAttributes().Select(AttributeInfo.From).ToImmutableArray().ToSequenceEqual(), false), + method)); + } + // We only support methods that are defined in the same partial interface definition as the // [GeneratedComInterface] attribute. // This restriction not only makes finding the syntax for a given method cheaper, diff --git a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs index 1e1849592f7ba..ca51e30346035 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/GeneratorDiagnostics.cs @@ -27,6 +27,7 @@ public class Ids public const string AnalysisFailed = Prefix + "1093"; public const string BaseInterfaceFailedGeneration = Prefix + "1094"; public const string InvalidGeneratedComClassAttributeUsage = Prefix + "1095"; + public const string BaseInterfaceDefinedInOtherAssembly = Prefix + "1230"; } private const string Category = "ComInterfaceGenerator"; @@ -425,10 +426,10 @@ public class Ids DiagnosticSeverity.Info, isEnabledByDefault: true, description: GetResourceString(nameof(SR.UnnecessaryMarshallingInfoDescription)), - customTags: new[] - { + customTags: + [ WellKnownDiagnosticTags.Unnecessary - }); + ]); /// public static readonly DiagnosticDescriptor UnnecessaryReturnMarshallingInfo = @@ -440,10 +441,10 @@ public class Ids DiagnosticSeverity.Info, isEnabledByDefault: true, description: GetResourceString(nameof(SR.UnnecessaryMarshallingInfoDescription)), - customTags: new[] - { + customTags: + [ WellKnownDiagnosticTags.Unnecessary - }); + ]); /// public static readonly DiagnosticDescriptor SizeOfInCollectionMustBeDefinedAtCallOutParam = @@ -496,6 +497,17 @@ public class Ids isEnabledByDefault: true, helpLinkUri: "aka.ms/GeneratedComInterfaceUsage"); + /// + public static readonly DiagnosticDescriptor BaseInterfaceDefinedInOtherAssembly = + new DiagnosticDescriptor( + Ids.BaseInterfaceDefinedInOtherAssembly, + GetResourceString(nameof(SR.BaseInterfaceDefinedInOtherAssemblyTitle)), + GetResourceString(nameof(SR.BaseInterfaceDefinedInOtherAssemblyMessage)), + Category, + DiagnosticSeverity.Warning, + isEnabledByDefault: true, + helpLinkUri: "aka.ms/GeneratedComInterfaceUsage"); + /// /// Report diagnostic for invalid configuration for string marshalling. /// diff --git a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/Strings.resx b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/Strings.resx index c739ca5f6d8f7..55fbc3b4247ed 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/Strings.resx +++ b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/Strings.resx @@ -910,4 +910,10 @@ Objects marshalled from VARIANTs as 'in' parameters in unmanaged-to-managed calls will not propagate back the updated result, even if the VARIANT is a VT_BYREF variant. Use a 'ref' parameter instead of an 'in' parameter to propagate the updated value back to the caller. + + The type '{0}' has a base interface '{1}' defined in a different assembly. This can cause a variety of difficult to diagnose issues in some scenarios + + + Specifying 'GeneratedComInterfaceAttribute' on an interface that has a base interface defined in another assembly is not supported + \ No newline at end of file diff --git a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.cs.xlf b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.cs.xlf index bb31728d33d9d..a27704743998b 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.cs.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.cs.xlf @@ -67,6 +67,16 @@ Základnímu rozhraní COM se nepodařilo vygenerovat zdroj. Kód se pro toto rozhraní nevygeneruje. + + The type '{0}' has a base interface '{1}' defined in a different assembly. This can cause a variety of difficult to diagnose issues in some scenarios + The type '{0}' has a base interface '{1}' defined in a different assembly. This can cause a variety of difficult to diagnose issues in some scenarios + + + + Specifying 'GeneratedComInterfaceAttribute' on an interface that has a base interface defined in another assembly is not supported + Specifying 'GeneratedComInterfaceAttribute' on an interface that has a base interface defined in another assembly is not supported + + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. GeneratedComInterface nemůže určovat ComInterfaceOptions.ManagedObjectWrapper nebo ComInterfaceOptions.ComObjectWrapper, pokud základní typ rozhraní neurčil možnosti nebo nezadal alespoň stejné možnosti. diff --git a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.de.xlf b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.de.xlf index 6415cd38180c9..05b494628443e 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.de.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.de.xlf @@ -67,6 +67,16 @@ Die Basis-COM-Schnittstelle konnte die Quelle nicht generieren. Für diese Schnittstelle wird kein Code generiert. + + The type '{0}' has a base interface '{1}' defined in a different assembly. This can cause a variety of difficult to diagnose issues in some scenarios + The type '{0}' has a base interface '{1}' defined in a different assembly. This can cause a variety of difficult to diagnose issues in some scenarios + + + + Specifying 'GeneratedComInterfaceAttribute' on an interface that has a base interface defined in another assembly is not supported + Specifying 'GeneratedComInterfaceAttribute' on an interface that has a base interface defined in another assembly is not supported + + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. Ein "GeneratedComInterface" kann nur dann "ComInterfaceOptions.ManagedObjectWrapper" oder "ComInterfaceOptions.ComObjectWrapper" angeben, wenn der Basisschnittstellentyp keine Optionen angegeben oder mindestens dieselben Optionen angegeben hat. diff --git a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.es.xlf b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.es.xlf index 6ccbbcc14a061..58a124e36da26 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.es.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.es.xlf @@ -67,6 +67,16 @@ La interfaz COM base no pudo generar el origen. No se generará código para esta interfaz. + + The type '{0}' has a base interface '{1}' defined in a different assembly. This can cause a variety of difficult to diagnose issues in some scenarios + The type '{0}' has a base interface '{1}' defined in a different assembly. This can cause a variety of difficult to diagnose issues in some scenarios + + + + Specifying 'GeneratedComInterfaceAttribute' on an interface that has a base interface defined in another assembly is not supported + Specifying 'GeneratedComInterfaceAttribute' on an interface that has a base interface defined in another assembly is not supported + + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. ''GeneratedComInterface'' no puede especificar ''ComInterfaceOptions.ManagedObjectWrapper'' o ''ComInterfaceOptions.ComObjectWrapper'' a menos que el tipo de interfaz base no especifique opciones o especifique al menos las mismas opciones. diff --git a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.fr.xlf b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.fr.xlf index d44e16aae33f6..c0bdf3dcb16ad 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.fr.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.fr.xlf @@ -67,6 +67,16 @@ L’interface COM de base n’a pas réussi à générer le code source. Le code ne sera pas généré pour cette interface. + + The type '{0}' has a base interface '{1}' defined in a different assembly. This can cause a variety of difficult to diagnose issues in some scenarios + The type '{0}' has a base interface '{1}' defined in a different assembly. This can cause a variety of difficult to diagnose issues in some scenarios + + + + Specifying 'GeneratedComInterfaceAttribute' on an interface that has a base interface defined in another assembly is not supported + Specifying 'GeneratedComInterfaceAttribute' on an interface that has a base interface defined in another assembly is not supported + + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. Un 'GeneratedComInterface' ne peut pas spécifier 'ComInterfaceOptions.ManagedObjectWrapper' ou 'ComInterfaceOptions.ComObjectWrapper' sauf si le type d’interface de base n’a pas spécifié d’options ou spécifié au moins les mêmes options. diff --git a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.it.xlf b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.it.xlf index 0237738ad2beb..9c152bcfa03c3 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.it.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.it.xlf @@ -67,6 +67,16 @@ L'interfaccia COM di base non è riuscita a generare l'origine. Il codice non verrà generato per questa interfaccia. + + The type '{0}' has a base interface '{1}' defined in a different assembly. This can cause a variety of difficult to diagnose issues in some scenarios + The type '{0}' has a base interface '{1}' defined in a different assembly. This can cause a variety of difficult to diagnose issues in some scenarios + + + + Specifying 'GeneratedComInterfaceAttribute' on an interface that has a base interface defined in another assembly is not supported + Specifying 'GeneratedComInterfaceAttribute' on an interface that has a base interface defined in another assembly is not supported + + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. Un elemento 'GeneratedComInterface' non può specificare 'ComInterfaceOptions.ManagedObjectWrapper' o 'ComInterfaceOptions.ComObjectWrapper' a meno che il tipo di interfaccia di base non specifichi opzioni o non specifichi almeno le stesse opzioni. diff --git a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ja.xlf b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ja.xlf index afdd4030ebcfe..e4e5b7e0bd1eb 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ja.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ja.xlf @@ -67,6 +67,16 @@ ベース COM インターフェイスはソースを生成できませんでした。このインターフェイスのコードは生成されません。 + + The type '{0}' has a base interface '{1}' defined in a different assembly. This can cause a variety of difficult to diagnose issues in some scenarios + The type '{0}' has a base interface '{1}' defined in a different assembly. This can cause a variety of difficult to diagnose issues in some scenarios + + + + Specifying 'GeneratedComInterfaceAttribute' on an interface that has a base interface defined in another assembly is not supported + Specifying 'GeneratedComInterfaceAttribute' on an interface that has a base interface defined in another assembly is not supported + + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. 基底インターフェイスの型でオプションが指定されていないか、少なくとも同じオプションが指定されていない限り、'GeneratedComInterface' では 'ComInterfaceOptions.ManagedObjectWrapper' または 'ComInterfaceOptions.ComObjectWrapper' を指定できません。 diff --git a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ko.xlf b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ko.xlf index 39b803b721f45..b5c19585d13f5 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ko.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ko.xlf @@ -67,6 +67,16 @@ 베이스 COM 인터페이스에서 소스를 생성하지 못했습니다. 이 인터페이스에 대한 코드가 생성되지 않습니다. + + The type '{0}' has a base interface '{1}' defined in a different assembly. This can cause a variety of difficult to diagnose issues in some scenarios + The type '{0}' has a base interface '{1}' defined in a different assembly. This can cause a variety of difficult to diagnose issues in some scenarios + + + + Specifying 'GeneratedComInterfaceAttribute' on an interface that has a base interface defined in another assembly is not supported + Specifying 'GeneratedComInterfaceAttribute' on an interface that has a base interface defined in another assembly is not supported + + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. 기본 인터페이스 형식이 옵션을 지정하지 않았거나, 최소한 동일한 옵션을 지정하지 않은 경우 'GeneratedComInterface'는 'ComInterfaceOptions.ManagedObjectWrapper' 또는 'ComInterfaceOptions.ComObjectWrapper'를 지정할 수 없습니다. diff --git a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.pl.xlf b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.pl.xlf index 807f7b0cc1c13..e2f7643bf8888 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.pl.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.pl.xlf @@ -4,7 +4,7 @@ Add 'GeneratedComClassAttribute' to enable passing objects of this type to COM and allow unsafe code - Dodaj atrybut „GeneratedComClassAttribute”, aby umożliwić przekazywanie obiektów tego typu do modelu COM i zezwalać na niebezpieczny kod + Add 'GeneratedComClassAttribute' to enable passing objects of this type to COM and allow unsafe code @@ -14,482 +14,492 @@ Add the 'GeneratedComClassAttribute' to '{0}' to enable passing objects of type '{0}' to COM - Dodaj atrybut „GeneratedComClassAttribute” do „{0}”, aby umożliwić przekazywanie obiektów typu „{0}” do modelu COM + Add the 'GeneratedComClassAttribute' to '{0}' to enable passing objects of type '{0}' to COM Add 'GeneratedComClassAttribute' to enable passing objects of this type to COM - Dodaj atrybut „GeneratedComClassAttribute”, aby umożliwić przekazywanie obiektów tego typu do modelu COM + Add 'GeneratedComClassAttribute' to enable passing objects of this type to COM Add missing custom type marshaller members - Dodaj brakujące składowe elementu przeprowadzającego marshalling typu niestandardowego + Add missing custom type marshaller members The analysis required to generate code for this interface or method has failed due to an unexpected code pattern. If you are using new or unconventional syntax, consider using other syntax. - Analiza wymagana do wygenerowania kodu dla tego interfejsu lub metody nie powiodła się z powodu nieoczekiwanego wzorca kodu. Jeśli używasz nowej składni lub nieszablonowej składni, rozważ użycie innej składni. + The analysis required to generate code for this interface or method has failed due to an unexpected code pattern. If you are using new or unconventional syntax, consider using other syntax. Analysis of interface '{0}' has failed. ComInterfaceGenerator will not generate code for this interface. - Analiza interfejsu „{0}” nie powiodła się. Element ComInterfaceGenerator nie wygeneruje kodu dla tego interfejsu. + Analysis of interface '{0}' has failed. ComInterfaceGenerator will not generate code for this interface. Analysis of method '{0}' has failed. ComInterfaceGenerator will not generate code for this method. - Analiza metody „{0}” nie powiodła się. Element ComInterfaceGenerator nie wygeneruje kodu dla tej metody. + Analysis of method '{0}' has failed. ComInterfaceGenerator will not generate code for this method. Analysis for COM interface generation has failed. - Analiza generowania interfejsu COM nie powiodła się. + Analysis for COM interface generation has failed. Marshalling an array from unmanaged to managed requires either the 'SizeParamIndex' or 'SizeConst' fields to be set on a 'MarshalAsAttribute' or the 'ConstantElementCount' or 'CountElementName' properties to be set on a 'MarshalUsingAttribute'. - Skierowanie tablicy z niezarządzanej do zarządzanej wymaga ustawienia pól „SizeParamIndex” lub „SizeConst” we właściwościach dla atrybutu„MarshalAsAttribute” lub wartości „ConstantElementCount” lub elementu „CountElementName” we właściwościach dla atrybutu „MarshalUsingAttribute”. + Marshalling an array from unmanaged to managed requires either the 'SizeParamIndex' or 'SizeConst' fields to be set on a 'MarshalAsAttribute' or the 'ConstantElementCount' or 'CountElementName' properties to be set on a 'MarshalUsingAttribute'. COM interface source generation requires all base COM interfaces to be valid interfaces. Fix any issues on the base interface to resolve this diagnostic. - Generowanie źródła interfejsu COM wymaga, aby wszystkie podstawowe interfejsy COM były prawidłowymi interfejsami. Rozwiąż wszelkie problemy z interfejsem podstawowym, aby rozwiązać ten problem diagnostyczny. + COM interface source generation requires all base COM interfaces to be valid interfaces. Fix any issues on the base interface to resolve this diagnostic. COM interface {0} inherits from {1}, which has errors. ComInterfaceGenerator will not generate source for {0}. - Interfejs COM {0} dziedziczy po {1}, który zawiera błędy. Program ComInterfaceGenerator nie wygeneruje źródła dla {0}. + COM interface {0} inherits from {1}, which has errors. ComInterfaceGenerator will not generate source for {0}. The base COM interface failed to generate source. Code will not be generated for this interface. - Podstawowy interfejs COM nie może wygenerować źródła. Kod nie zostanie wygenerowany dla tego interfejsu. + The base COM interface failed to generate source. Code will not be generated for this interface. + + + + The type '{0}' has a base interface '{1}' defined in a different assembly. This can cause a variety of difficult to diagnose issues in some scenarios + The type '{0}' has a base interface '{1}' defined in a different assembly. This can cause a variety of difficult to diagnose issues in some scenarios + + + + Specifying 'GeneratedComInterfaceAttribute' on an interface that has a base interface defined in another assembly is not supported + Specifying 'GeneratedComInterfaceAttribute' on an interface that has a base interface defined in another assembly is not supported A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. - Element „GeneratedComInterface” nie może określać elementu „ComInterfaceOptions.ManagedObjectWrapper” lub „ComInterfaceOptions.ComObjectWrapper”, chyba że podstawowy typ interfejsu nie określił opcji lub określił co najmniej te same opcje. + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. The specified parameter needs to be marshalled from managed to unmanaged and unmanaged to managed, but the marshaller type '{0}' does not support it. - Określony parametr musi być kierowany z zarządzanego do niezarządzanego i niezarządzanego do zarządzanego, ale typ marszałka „{0}” go nie obsługuje. + The specified parameter needs to be marshalled from managed to unmanaged and unmanaged to managed, but the marshaller type '{0}' does not support it. When the 'Managed to Unmanaged with Caller-Allocated Buffer' shape is used by providing a 'FromManaged' method that takes a 'Span<T>' on the marshaller type, the type must provide a static 'BufferSize' property to provide the number of elements in the caller-allocated buffer. - Gdy kształt „Zarządzane do niezarządzanego za pomocą buforu przydzielonego przez wywołującego” jest używany przez podanie metody „FromManaged”, która przyjmuje element „Span< T>” w typie marshallera, typ musi udostępniać statyczną właściwość „BufferSize”, aby podać liczbę elementów w buforze przydzielonym przez wywołującego. + When the 'Managed to Unmanaged with Caller-Allocated Buffer' shape is used by providing a 'FromManaged' method that takes a 'Span<T>' on the marshaller type, the type must provide a static 'BufferSize' property to provide the number of elements in the caller-allocated buffer. The marshaller type '{0}' must have a static read-only 'int' 'BufferSize' property to specify the size of the caller-allocated buffer because it has a FromManaged method that takes a caller-allocated 'Span<{1}>' - Typ marshallera „{0}” musi mieć statyczną właściwość „int” „BufferSize” tylko do odczytu, aby określić rozmiar buforu przydzielonego przez wywołującego, ponieważ ma metodę FromManaged, która przyjmuje przydzielony przez wywołującego element „Span<{1}>” + The marshaller type '{0}' must have a static read-only 'int' 'BufferSize' property to specify the size of the caller-allocated buffer because it has a FromManaged method that takes a caller-allocated 'Span<{1}>' The generated 'DllImportAttribute' will not have a value corresponding to '{0}'. - Wygenerowany atrybut „DllImportAttribute” nie będzie miał wartości odpowiadającej elementowi „{0}”. + The generated 'DllImportAttribute' will not have a value corresponding to '{0}'. '{0}' has no equivalent in 'DllImportAttribute' and will not be forwarded - Element „{0}” nie ma odpowiednika w atrybucie „DllImportAtttribute” i nie zostanie przekazany + '{0}' has no equivalent in 'DllImportAttribute' and will not be forwarded Specified 'LibraryImportAttribute' arguments cannot be forwarded to 'DllImportAttribute' - Określonych argumentów „LibraryImportAttribute” nie można przekazać do elementu „DllImportAttribute” + Specified 'LibraryImportAttribute' arguments cannot be forwarded to 'DllImportAttribute' Casting between a 'ComImport' type and a source-generated COM type is not supported and will fail at runtime - Rzutowanie między typem „ComImport” i wygenerowanym przez źródło typem COM nie jest obsługiwane i zakończy się niepowodzeniem w czasie wykonywania + Casting between a 'ComImport' type and a source-generated COM type is not supported and will fail at runtime Casting between a 'ComImport' type and a source-generated COM type is not supported - Rzutowanie między typem „ComImport” i wygenerowanym przez źródło typem COM nie jest obsługiwane + Casting between a 'ComImport' type and a source-generated COM type is not supported Casting between a 'ComImport' type and a source-generated COM type is not supported - Rzutowanie między typem „ComImport” i wygenerowanym przez źródło typem COM nie jest obsługiwane + Casting between a 'ComImport' type and a source-generated COM type is not supported A class with 'GeneratedComClassAttribute' must implement at least one interface with 'GeneratedComInterfaceAttribute' or else the generated code with not have an effect. - Klasa z atrybutem „GeneratedComClassAttribute” musi implementować co najmniej jeden interfejs z atrybutem „GeneratedComInterfaceAttribute”. W przeciwnym wypadku wygenerowany kod nie będzie miał efektu. + A class with 'GeneratedComClassAttribute' must implement at least one interface with 'GeneratedComInterfaceAttribute' or else the generated code with not have an effect. Class '{0}' with 'GeneratedComClassAttribute' does not implement any interfaces with 'GeneratedComInterfaceAttribute'. Source will not be generated for '{0}'. - Klasa „{0}” z atrybutem „GeneratedComClassAttribute” nie implementuje żadnych interfejsów z atrybutem „GeneratedComInterfaceAttribute”. Źródło nie zostanie wygenerowane dla „{0}”. + Class '{0}' with 'GeneratedComClassAttribute' does not implement any interfaces with 'GeneratedComInterfaceAttribute'. Source will not be generated for '{0}'. The specified collection size parameter for an collection must be an integer type. If the size information is applied to a nested collection, the size parameter must be a collection of one less level of nesting with an integral element. - Określony parametr rozmiaru kolekcji dla kolekcji musi być liczbą całkowitą. Jeśli informacje o rozmiarze są stosowane do kolekcji zagnieżdżonej, parametr rozmiaru musi być kolekcją o jednym poziomie zagnieżdżenia mniej, o liczbie całkowitej. + The specified collection size parameter for an collection must be an integer type. If the size information is applied to a nested collection, the size parameter must be a collection of one less level of nesting with an integral element. .NET COM hosting with 'EnableComHosting' only supports built-in COM interop. It does not support source-generated COM interop with 'GeneratedComInterfaceAttribute'. - Hosting modelu COM platformy .NET z elementem „EnableComHosting” obsługuje tylko wbudowaną usługę międzyoperacyjną modelu COM. Nie obsługuje usługi międzyoperacyjnej modelu COM wygenerowanej przez źródło przy użyciu atrybutu „GeneratedComInterfaceAttribute”. + .NET COM hosting with 'EnableComHosting' only supports built-in COM interop. It does not support source-generated COM interop with 'GeneratedComInterfaceAttribute'. .NET COM hosting with 'EnableComHosting' does not support interfaces with the 'GeneratedComInterfaceAttribute'. Change any COM exposed interfaces implemented by '{0}' to use the 'System.Runtime.InteropServices.ComVisibleAttribute' instead - Hosting modelu COM platformy .NET z elementem „EnableComHosting” nie obsługuje interfejsów z atrybutem „GeneratedComInterfaceAttribute”. Zmień wszystkie interfejsy ujawnione przez model COM zaimplementowane przez „{0}”, aby zamiast tego użyć atrybutu „System.Runtime.InteropServices.ComVisibleAttribute” + .NET COM hosting with 'EnableComHosting' does not support interfaces with the 'GeneratedComInterfaceAttribute'. Change any COM exposed interfaces implemented by '{0}' to use the 'System.Runtime.InteropServices.ComVisibleAttribute' instead .NET COM hosting with 'EnableComHosting' does not support interfaces with the 'GeneratedComInterfaceAttribute' - Hosting modelu COM platformy .NET z elementem „EnableComHosting” nie obsługuje interfejsów z atrybutem „GeneratedComInterfaceAttribute” + .NET COM hosting with 'EnableComHosting' does not support interfaces with the 'GeneratedComInterfaceAttribute' The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. {0} - Użycie atrybutu „GeneratedComInterfaceAttribute” nie jest zgodne z zaleceniami. {0} + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. {0} The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. - Użycie atrybutu „GeneratedComInterfaceAttribute” nie jest zgodne z zaleceniami. + The usage of 'GeneratedComInterfaceAttribute' does not follow recommendations. The return value in the managed definition will be converted to an 'out' parameter when calling the unmanaged COM method. If the return value is intended to be the HRESULT code returned by the unmanaged COM method, use '[PreserveSig]' on the method. - Wartość zwracana w definicji zarządzanej zostanie przekonwertowana na parametr „out” podczas wywoływania niezarządzanej metody COM. Jeśli wartość zwracana ma być kodem HRESULT zwracanym przez niezarządzaną metodę COM, należy użyć „[PreserveSig]” w metodzie. + The return value in the managed definition will be converted to an 'out' parameter when calling the unmanaged COM method. If the return value is intended to be the HRESULT code returned by the unmanaged COM method, use '[PreserveSig]' on the method. The return value in the managed definition will be converted to an additional 'out' parameter at the end of the parameter list when calling the unmanaged COM method. - Wartość zwracana w definicji zarządzanej zostanie przekonwertowana na dodatkowy parametr „out” na końcu listy parametrów podczas wywoływania niezarządzanej metody COM. + The return value in the managed definition will be converted to an additional 'out' parameter at the end of the parameter list when calling the unmanaged COM method. Source-generated COM will ignore any configuration that is not supported. - COM wygenerowany przez źródło zignoruje każdą konfigurację, która nie jest obsługiwana. + Source-generated COM will ignore any configuration that is not supported. Source-generated P/Invokes will ignore any configuration that is not supported. - Funkcja P/Invokes generowana przez źródło zignoruje każdą nieobsługiwaną konfigurację. + Source-generated P/Invokes will ignore any configuration that is not supported. The '{0}' configuration is not supported by source-generated COM. If the specified configuration is required, use `ComImport` instead. - Konfiguracja „{0}” nie jest obsługiwana przez COM generowany przez źródło. Jeśli określona konfiguracja jest wymagana, użyj zamiast niej `ComImport`. + The '{0}' configuration is not supported by source-generated COM. If the specified configuration is required, use `ComImport` instead. The '{0}' configuration is not supported by source-generated P/Invokes. If the specified configuration is required, use a regular 'DllImport' instead. - Konfiguracja „{0}” nie jest obsługiwana przez funkcję P/Invokes generowaną przez źródło. Jeśli określona konfiguracja jest wymagana, użyj zamiast tego zwykłego elementu „DllImport”. + The '{0}' configuration is not supported by source-generated P/Invokes. If the specified configuration is required, use a regular 'DllImport' instead. The specified marshalling configuration is not supported by source-generated COM. {0}. - Określona konfiguracja skierowania nie jest obsługiwana przez COM generowany źródłowo. {0}. + The specified marshalling configuration is not supported by source-generated COM. {0}. The specified marshalling configuration is not supported by source-generated P/Invokes. {0}. - Określona konfiguracja skierowania nie jest obsługiwana przez funkcję P/Invokes generowaną przez źródło. {0}. + The specified marshalling configuration is not supported by source-generated P/Invokes. {0}. The specified '{0}' configuration for parameter '{1}' is not supported by source-generated COM. If the specified configuration is required, use `ComImport` instead. - Określona konfiguracja „{0}” dla parametru „{1}” nie jest obsługiwana przez COM generowany przez źródło. Jeśli określona konfiguracja jest wymagana, użyj zamiast niej `ComImport`. + The specified '{0}' configuration for parameter '{1}' is not supported by source-generated COM. If the specified configuration is required, use `ComImport` instead. The specified '{0}' configuration for parameter '{1}' is not supported by source-generated P/Invokes. If the specified configuration is required, use a regular 'DllImport' instead. - Określona konfiguracja „{0}” dla parametru „{1}” nie jest obsługiwana przez funkcję P/Invokes generowaną przez źródło. Jeśli określona konfiguracja jest wymagana, użyj zamiast tego zwykłego elementu „DllImport”. + The specified '{0}' configuration for parameter '{1}' is not supported by source-generated P/Invokes. If the specified configuration is required, use a regular 'DllImport' instead. The specified '{0}' configuration for the return value of method '{1}' is not supported by source-generated COM. If the specified configuration is required, use `ComImport` instead. - Określona konfiguracja „{0}” dla wartości zwracanej metody „{1}” nie jest obsługiwana przez COM generowany przez źródło. Jeśli określona konfiguracja jest wymagana, użyj zamiast niej `ComImport`. + The specified '{0}' configuration for the return value of method '{1}' is not supported by source-generated COM. If the specified configuration is required, use `ComImport` instead. The specified '{0}' configuration for the return value of method '{1}' is not supported by source-generated P/Invokes. If the specified configuration is required, use a regular 'DllImport' instead. - Określona konfiguracja „{0}” dla wartości zwracanej metody „{1}” nie jest obsługiwana przez funkcję P/Invokes generowaną przez źródło. Jeśli określona konfiguracja jest wymagana, użyj zamiast tego zwykłego elementu „DllImport”. + The specified '{0}' configuration for the return value of method '{1}' is not supported by source-generated P/Invokes. If the specified configuration is required, use a regular 'DllImport' instead. The specified value '{0}' for '{1}' is not supported by source-generated COM. If the specified configuration is required, use `ComImport` instead. - Określona wartość „{0}” dla „{1}” nie jest obsługiwana przez COM generowany przez źródło. Jeśli określona konfiguracja jest wymagana, użyj zamiast niej `ComImport`. + The specified value '{0}' for '{1}' is not supported by source-generated COM. If the specified configuration is required, use `ComImport` instead. The specified value '{0}' for '{1}' is not supported by source-generated P/Invokes. If the specified value is required, use a regular 'DllImport' instead. - Określona wartość „{0}” dla parametru „{1}” nie jest obsługiwana przez funkcję P/Invokes generowaną przez źródło. Jeśli określona konfiguracja jest wymagana, użyj zamiast tego zwykłego elementu „DllImport”. + The specified value '{0}' for '{1}' is not supported by source-generated P/Invokes. If the specified value is required, use a regular 'DllImport' instead. Specified configuration is not supported by source-generated COM. - Określona konfiguracja nie jest obsługiwana przez COM wygenerowany przez źródło. + Specified configuration is not supported by source-generated COM. Specified configuration is not supported by source-generated P/Invokes. - Określona konfiguracja nie jest obsługiwana przez funkcję P/Invokes generowaną przez źródło. + Specified configuration is not supported by source-generated P/Invokes. Only one of 'ConstantElementCount' or 'ElementCountInfo' may be used in a 'MarshalUsingAttribute' for a given 'ElementIndirectionDepth' - Tylko jedna z wartości „ConstantElementCount” lub element „ElementCountInfo” może być użyty w atrybucie „MarshalUsingAttribute” dla danego elementu „ElementIndirectionDepth” + Only one of 'ConstantElementCount' or 'ElementCountInfo' may be used in a 'MarshalUsingAttribute' for a given 'ElementIndirectionDepth' Containing type '{0}' has accessibility '{1}'. - Zawierający typ „{0}” ma ułatwienia dostępu „{1}”. + Containing type '{0}' has accessibility '{1}'. Converting this interface to use 'GeneratedComInterfaceAttribute' may produce invalid code and may require additional work - Przekonwertowanie tego interfejsu w celu użycia atrybutu „GeneratedComInterfaceAttribute” może spowodować wygenerowanie nieprawidłowego kodu i może wymagać dodatkowej pracy + Converting this interface to use 'GeneratedComInterfaceAttribute' may produce invalid code and may require additional work Automatically converting a P/Invoke with 'PreserveSig' set to 'false' to a source-generated P/Invoke may produce invalid code - Automatyczne konwertowanie funkcji P/Invoke z parametrem „PreserveSig” ustawionym na wartość „false” na wygenerowaną przez źródło funkcję P/Invoke może spowodować utworzenie nieprawidłowego kodu + Automatically converting a P/Invoke with 'PreserveSig' set to 'false' to a source-generated P/Invoke may produce invalid code Convert to 'GeneratedComInterface' and allow unsafe code - Konwertuj na element „GeneratedComInterface” i zezwalaj na niebezpieczny kod + Convert to 'GeneratedComInterface' and allow unsafe code Use 'GeneratedComInterfaceAttribute' instead of 'ComImportAttribute' to generate COM marshalling code at compile time - Użyj atrybutu „GeneratedComInterfaceAttribute” zamiast „ComImportAttribute”, aby wygenerować kod marshallingu modelu COM w czasie kompilacji + Use 'GeneratedComInterfaceAttribute' instead of 'ComImportAttribute' to generate COM marshalling code at compile time Converting this API to 'GeneratedComInterfaceAttribute' will require additional code to provide custom marshallers for some parameters. - Przekonwertowanie tego interfejsu API na atrybut „GeneratedComInterfaceAttribute” będzie wymagać dodatkowego kodu w celu udostępnienia niestandardowych organizatorów dla niektórych parametrów. + Converting this API to 'GeneratedComInterfaceAttribute' will require additional code to provide custom marshallers for some parameters. Mark the type '{0}' with 'GeneratedComInterfaceAttribute' instead of 'ComImportAttribute' to generate COM marshalling code at compile time - Oznacz typ „{0}” atrybutem „GeneratedComInterfaceAttribute” zamiast „ComImportAttribute”, aby wygenerować kod marshallingu modelu COM w czasie kompilacji + Mark the type '{0}' with 'GeneratedComInterfaceAttribute' instead of 'ComImportAttribute' to generate COM marshalling code at compile time Convert to 'GeneratedComInterface' - Konwertowanie na element „GeneratedComInterface” + Convert to 'GeneratedComInterface' Convert to 'LibraryImport' - Konwertuj na element „LibraryImport” + Convert to 'LibraryImport' Convert to 'LibraryImport' and enable unsafe code - Konwertuj na element „LibraryImport” i włącz niebezpieczny kod + Convert to 'LibraryImport' and enable unsafe code Use 'LibraryImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time - Użyj elementu „LibraryImportAttribute” zamiast elementu „DllImportAttribute”, aby wygenerować kod skierowania funkcji P/Invoke w czasie kompilacji + Use 'LibraryImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time Converting this API to 'LibraryImport' will require additional code to provide custom marshallers for some parameters. - Przekonwertowanie tego interfejsu API na element „LibraryImport” będzie wymagać dodatkowego kodu w celu udostępnienia niestandardowych poleceń dla niektórych parametrów. + Converting this API to 'LibraryImport' will require additional code to provide custom marshallers for some parameters. Mark the method '{0}' with 'LibraryImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time - Oznacz metodę „{0}” za pomocą elementu „LibraryImportAttribute” zamiast elementu „DllImportAttribute”, aby wygenerować kod skierowania funkcji P/Invoke w czasie kompilacji + Mark the method '{0}' with 'LibraryImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time Use 'LibraryImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time - Użyj elementu „LibraryImportAttribute” zamiast elementu „DllImportAttribute”, aby wygenerować kod skierowania funkcji P/Invoke w czasie kompilacji + Use 'LibraryImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time Convert to 'LibraryImport' with '{0}' suffix - Konwertuj na element „LibraryImport” z sufiksem „{0}” + Convert to 'LibraryImport' with '{0}' suffix Convert to 'LibraryImport' with '{0}' suffix and enable unsafe code - Konwertuj na element „LibraryImport” z sufiksem „{0}” i włącz niebezpieczny kod + Convert to 'LibraryImport' with '{0}' suffix and enable unsafe code Marshaller type does not have the required shape - Typ marshallera nie ma wymaganego kształtu + Marshaller type does not have the required shape This element cannot depend on '{0}' for collection size information without creating a dependency cycle - Ten element nie może zależeć od elementu „{0}” dla informacji o rozmiarze kolekcji bez tworzenia cyklu zależności + This element cannot depend on '{0}' for collection size information without creating a dependency cycle Count information for a given element at a given indirection level can only be specified once - Informacje o liczbie dla danego elementu na danym poziomie pośrednim można podać tylko raz + Count information for a given element at a given indirection level can only be specified once Multiple marshalling attributes per element per indirection level is unsupported, but duplicate information was provided for indirection level {0} - Wiele atrybutów skierowania na element na poziomie pośrednim nie jest obsługiwanych, ale podano zduplikowane informacje dla poziomu pośredniego {0} + Multiple marshalling attributes per element per indirection level is unsupported, but duplicate information was provided for indirection level {0} A marshaller for an element scenario cannot be stateful. - Marshaller dla scenariusza elementu nie może być stanowy. + A marshaller for an element scenario cannot be stateful. The specified marshaller type '{0}' is a stateful marshaller, but stateful marshallers are not allowed in the provided marshal mode '{1}' - Określony typ marshallera „{0}” jest stanowym marshallerem, ale stanowe marshallery nie są dozwolone w podanym trybie marshalingu „{1}” + The specified marshaller type '{0}' is a stateful marshaller, but stateful marshallers are not allowed in the provided marshal mode '{1}' The element type of the span returned by the first method must be the same type as the element type of the span returned by the second method. - Typ elementu zakresu zwracanego przez pierwszą metodę musi być tego samego typu co typ elementu zakresu zwracanego przez drugą metodę. + The element type of the span returned by the first method must be the same type as the element type of the span returned by the second method. The element type of the span returned by '{0}' must be the same type as the element type of the span returned by '{1}'. - Typ elementu zakresu zwracanego przez „{0}” musi być tego samego typu co typ elementu zakresu zwracanego przez „{1}”. + The element type of the span returned by '{0}' must be the same type as the element type of the span returned by '{1}'. An entry-point type for marshalling a given type must not be 'null'. - Typ punktu wejścia do przeprowadzenia marshalingu danego typu nie może mieć wartości „null”. + An entry-point type for marshalling a given type must not be 'null'. The entry-point marshaller type for the type '{0}' must be not 'null' - Typ marshallera punktu wejścia dla typu „{0}” nie może mieć wartości „null” + The entry-point marshaller type for the type '{0}' must be not 'null' An entry-point type for marshalling a given type must have a 'System.Runtime.InteropServices.CustomMarshallerAttribute' that specifies this type as the managed type. - Typ punktu wejścia do przeprowadzenia marshalingu danego typu musi mieć atrybut „System.Runtime.InteropServices.CustomMarshaellerAttribute”, który określa ten typ jako typ zarządzany. + An entry-point type for marshalling a given type must have a 'System.Runtime.InteropServices.CustomMarshallerAttribute' that specifies this type as the managed type. The entry-point marshaller type '{0}' for the type '{1}' must be a type with at least one 'System.Runtime.InteropServices.CustomMarshallerAttribute' that specifies this type as the managed type - Typ marshallera punktu wejścia „{0}” dla typu „{1}” musi być typem z co najmniej jednym atrybutem „System.Runtime.InteropServices.CustomMarshaellerAttribute”, który określa ten typ jako typ zarządzany + The entry-point marshaller type '{0}' for the type '{1}' must be a type with at least one 'System.Runtime.InteropServices.CustomMarshallerAttribute' that specifies this type as the managed type Marshalling info was specified for 'ElementIndirectionDepth' {0}, but marshalling info was only needed for {1} level(s) of indirection - Informacje dotyczące skierowania zostały określone dla elementu „ElementIndirectionDepth” {0}, ale informacje dotyczące skierowania były potrzebne tylko dla poziomów pośrednich w liczbie {1} + Marshalling info was specified for 'ElementIndirectionDepth' {0}, but marshalling info was only needed for {1} level(s) of indirection The first parameter of the first method must be the same type as the return types of the second method. - Pierwszy parametr pierwszej metody musi być tego samego typu co zwracane typy drugiej metody. + The first parameter of the first method must be the same type as the return types of the second method. The first parameter of '{0}' must be the same type as the return type of '{1}' - Pierwszy parametr „{0}” musi być tego samego typu co zwracany typ „{1}” + The first parameter of '{0}' must be the same type as the return type of '{1}' The first parameters of the two methods must be the same type. - Pierwsze parametry obu tych metod muszą być tego samego typu. + The first parameters of the two methods must be the same type. The first parameter of '{0}' and '{1}' must be the same type - Pierwszy parametr „{0}” i „{1}” musi być tego samego typu + The first parameter of '{0}' and '{1}' must be the same type Overloading the 'FromUnmanaged' method is unuspported as some shapes are unable to distinguish between overloads. - Przeciążenie metody „FromUnmanaged” nie jest obsługiwane, ponieważ niektóre kształty nie mogą rozróżnić przeciążeń. + Overloading the 'FromUnmanaged' method is unuspported as some shapes are unable to distinguish between overloads. The type '{0}' overloads the 'FromUnmanaged' method, which is not supported in custom marshallers - Typ „{0}” przeciąża metodę „ZNiezarządzane”, która nie jest obsługiwana w niestandardowych marshalerach + The type '{0}' overloads the 'FromUnmanaged' method, which is not supported in custom marshallers The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' must match the base COM interface. - Konfiguracja elementów „StringMarssourceing” i „StringMarsxtingCustomType” musi być zgodna z podstawowym interfejsem COM. + The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' must match the base COM interface. The marshaller type must be a closed generic or have the same number of generic parameters as the managed type so the emitted code can use a specific instantiation. - Typ marshallera musi być zamkniętym typem ogólnym lub mieć taką samą liczbę parametrów ogólnych jak typ zarządzany, aby emitowany kod mógł używać określonego wystąpienia. + The marshaller type must be a closed generic or have the same number of generic parameters as the managed type so the emitted code can use a specific instantiation. The marshaller type '{0}' for managed type '{1}' must be a closed generic type, have the same arity as the managed type if it is a value marshaller, or have one additional generic parameter if it is a collection marshaller. - Typ marshallera „{0}” dla typu zarządzanego „{1}” musi być zamkniętym typem ogólnym, mieć taką samą argumentację jak typ zarządzany, jeśli jest to marshaller wartości lub mieć jeden dodatkowy parametr ogólny, jeśli jest to marshaller kolekcji. + The marshaller type '{0}' for managed type '{1}' must be a closed generic type, have the same arity as the managed type if it is a value marshaller, or have one additional generic parameter if it is a collection marshaller. The return type of 'GetPinnableReference' (after accounting for 'ref') must be blittable. - Zwracany typ elementu „GetPinnableReference” (po uwzględnieniu wartości „ref”) musi być kopiowalny. + The return type of 'GetPinnableReference' (after accounting for 'ref') must be blittable. The dereferenced type of the return type of the 'GetPinnableReference' method must be blittable - Typ, do którego nie można usunąć odwołania, zwracanego typu metody „GetPinnableReference” musi być kopiowalny + The dereferenced type of the return type of the 'GetPinnableReference' method must be blittable The provided graph has cycles and cannot be topologically sorted. - Podany wykres zawiera cykle i nie można go posortować topologicznie. + The provided graph has cycles and cannot be topologically sorted. The type '{0}' will be treated as a struct in the native signature, not as a native HRESULT. To treat this as an HRESULT, add '[return:MarshalAs(UnmanagedType.Error)]' to the method. - Typ „{0}” będzie traktowany jako struktura w podpisie natywnym, a nie jako natywny wynik HRESULT. Aby traktować to jako HRESULT, dodaj element „[return:MarshalAs(UnmanagedType.Error)]” do metody. + The type '{0}' will be treated as a struct in the native signature, not as a native HRESULT. To treat this as an HRESULT, add '[return:MarshalAs(UnmanagedType.Error)]' to the method. This type will be treated as a struct in the native signature, not as a native HRESULT - Ten typ będzie traktowany jako struktura w podpisie natywnym, a nie jako natywny wynik HRESULT + This type will be treated as a struct in the native signature, not as a native HRESULT The '[In]' attribute is only supported on array parameters. By-value parameters are considered read-only by default. - Atrybut „[In]” jest obsługiwany tylko w przypadku parametrów tablicy. Parametry według wartości są domyślnie uznawane za tylko do odczytu. + The '[In]' attribute is only supported on array parameters. By-value parameters are considered read-only by default. The '[In]' attribute is not supported unless the '[Out]' attribute is also used. Blittable arrays cannot be marshalled as '[In]' only. - Atrybut „[In]” nie jest obsługiwany, chyba że używany jest również atrybut „[Out]”. Tablice kopiowalne nie mogą być kierowane tylko jako „[In]”. + The '[In]' attribute is not supported unless the '[Out]' attribute is also used. Blittable arrays cannot be marshalled as '[In]' only. The '[In]' attribute is not necessary unless the '[Out]' attribute is also used. The behavior of the '[In]' attribute without the '[Out]' attribute is the same as the default behavior. - Atrybut „[In]” nie jest potrzebny, chyba że używany jest również atrybut „[Out]”. Zachowanie atrybutu „[In]” bez atrybutu „[Out]” jest takie samo jak zachowanie domyślne. + The '[In]' attribute is not necessary unless the '[Out]' attribute is also used. The behavior of the '[In]' attribute without the '[Out]' attribute is the same as the default behavior. The '[In]' and '[Out]' attributes are unsupported on parameters passed by reference. Use the 'in', 'ref', or 'out' keywords instead. - Atrybuty „[In]” i „[Out]” nie są obsługiwane w parametrach przekazywanych przez odwołanie. Zamiast tego użyj słów kluczowych „in”, „ref” lub „out”. + The '[In]' and '[Out]' attributes are unsupported on parameters passed by reference. Use the 'in', 'ref', or 'out' keywords instead. The provided '[In]' and '[Out]' attributes on this parameter are unsupported on this parameter. - Podane atrybuty „[In]” i „[Out]” w tym parametrze nie są obsługiwane w tym parametrze. + The provided '[In]' and '[Out]' attributes on this parameter are unsupported on this parameter. The '[In]' and '[Out]' attributes are only supported on array parameters. Consider using the 'ref' keyword to make the parameter mutable. - Atrybuty „[In]” i „[Out]” są obsługiwane tylko w przypadku parametrów tablicy. Rozważ użycie słowa kluczowego „ref”, aby umożliwić modyfikowanie parametru. + The '[In]' and '[Out]' attributes are only supported on array parameters. Consider using the 'ref' keyword to make the parameter mutable. [In] and [Out] attributes - Atrybuty [In] i [Out] + [In] and [Out] attributes @@ -499,814 +509,814 @@ Events are not a concept in COM, so no interop code will be source generated for instance events on source-generated COM interfaces. - Zdarzenia nie są koncepcją w modelu COM, więc żaden kod międzyoperacyjny nie będzie generowany dla zdarzeń wystąpień w interfejsach COM generowanych źródłowo. + Events are not a concept in COM, so no interop code will be source generated for instance events on source-generated COM interfaces. The instance event '{0}' is declared in the interface '{1}', which has the 'GeneratedComInterfaceAttribute' applied - Zdarzenie wystąpienia „{0}” jest zadeklarowane w interfejsie „{1}”, w którym zastosowano atrybut „GeneratedComInterfaceAttribute” + The instance event '{0}' is declared in the interface '{1}', which has the 'GeneratedComInterfaceAttribute' applied Declaring an instance event in a type with the 'GeneratedComInterfaceAttribute' is not supported - Deklarowanie zdarzenia wystąpienia w typie z atrybutem „GeneratedComInterfaceAttribute” nie jest obsługiwane + Declaring an instance event in a type with the 'GeneratedComInterfaceAttribute' is not supported Properties are not a concept in COM, so no interop code will be source generated for instance properties on source-generated COM interfaces. - Te właściwości nie są koncepcją w modelu COM, dlatego nie zostanie wygenerowany kod międzyoperacyjny dla właściwości wystąpienia w interfejsach COM generowanych źródłowo. + Properties are not a concept in COM, so no interop code will be source generated for instance properties on source-generated COM interfaces. The instance property '{0}' is declared in the interface '{1}', which has the 'GeneratedComInterfaceAttribute' applied - Właściwość wystąpienia „{0}” jest zadeklarowana w interfejsie „{1}”, do którego zastosowano atrybut „GeneratedComInterfaceAttribute” + The instance property '{0}' is declared in the interface '{1}', which has the 'GeneratedComInterfaceAttribute' applied Declaring an instance property in a type with the 'GeneratedComInterfaceAttribute' is not supported - Deklarowanie właściwości wystąpienia w typie z atrybutem „GeneratedComInterfaceAttribute” nie jest obsługiwane + Declaring an instance property in a type with the 'GeneratedComInterfaceAttribute' is not supported Using 'GeneratedComInterfaceAttribute' and 'InterfaceTypeAttribute' is not supported with 'ComInterfaceType' value '{0}'. - Użycie atrybutów „GeneratedComInterfaceAttribute” i „InterfaceTypeAttribute” nie jest obsługiwane w przypadku wartości „ComInterfaceType” „{0}”. + Using 'GeneratedComInterfaceAttribute' and 'InterfaceTypeAttribute' is not supported with 'ComInterfaceType' value '{0}'. 'GeneratedComInterfaceType' does not support the 'ComInterfaceType' value supplied to 'InterfaceTypeAttribute' on the same type. - Typ „GeneratedComInterfaceType” nie obsługuje wartości „ComInterfaceType” dostarczonej do atrybutu „InterfaceTypeAttribute” w tym samym typie. + 'GeneratedComInterfaceType' does not support the 'ComInterfaceType' value supplied to 'InterfaceTypeAttribute' on the same type. Method '{0}' is contained in a type '{1}' that is not marked 'partial'. COM source generation will ignore method '{0}'. - Metoda „{0}” jest zawarta w typie „{1}”, który nie jest oznaczony jako „częściowy”. Generowanie źródła COM zignoruje metodę „{0}”. + Method '{0}' is contained in a type '{1}' that is not marked 'partial'. COM source generation will ignore method '{0}'. Method '{0}' is contained in a type '{1}' that is not marked 'partial'. P/Invoke source generation will ignore method '{0}'. - Metoda „{0}” jest zawarta w typie „{1}”, który nie jest oznaczony jako „częściowy”. Generowanie źródła funkcji P/Invoke zignoruje metodę „{0}”. + Method '{0}' is contained in a type '{1}' that is not marked 'partial'. P/Invoke source generation will ignore method '{0}'. Containing type of method with VirtualMethodIndexAttribute does not have a UnmanagedObjectUnwrapperAttribute. - Zawieranie typu metody z atrybutem VirtualMethodIndexAttribute nie ma atrybutu UnmanagedObjectUnwrapperAttribute. + Containing type of method with VirtualMethodIndexAttribute does not have a UnmanagedObjectUnwrapperAttribute. Methods on interfaces marked with 'GeneratedComInterfaceAttribute' should be non-generic. COM source generation will ignore methods that are generic. - Metody w interfejsach oznaczone atrybutem „GeneratedComInterfaceAttribute” powinny być nie-ogólne. Generowanie źródła COM zignoruje metody, które są ogólne. + Methods on interfaces marked with 'GeneratedComInterfaceAttribute' should be non-generic. COM source generation will ignore methods that are generic. Methods marked with 'LibraryImportAttribute' should be 'static', 'partial', and non-generic. P/Invoke source generation will ignore methods that are non-'static', non-'partial', or generic. - Metody oznaczone jako atrybut „LibraryImportAttribute” powinny być „statyczne”, „częściowe” i nieogólne. Generowanie źródła funkcji P/Invoke zignoruje metody, które nie są „statyczne”, nie są „częściowe” lub ogólne. + Methods marked with 'LibraryImportAttribute' should be 'static', 'partial', and non-generic. P/Invoke source generation will ignore methods that are non-'static', non-'partial', or generic. Method '{0}' should be non-generic when on interfaces marked with the 'GeneratedComInterfaceAttribute'. COM source generation will ignore method '{0}'. - Metoda „{0}” powinna być nie-ogólna w interfejsach oznaczonych atrybutem „GeneratedComInterfaceAttribute”. Generowanie źródła COM zignoruje metodę „{0}”. + Method '{0}' should be non-generic when on interfaces marked with the 'GeneratedComInterfaceAttribute'. COM source generation will ignore method '{0}'. Method '{0}' should be 'static', 'partial', and non-generic when marked with 'LibraryImportAttribute'. P/Invoke source generation will ignore method '{0}'. - Metoda „{0}” powinna być „statyczna”, „częściowa” i nieogólna, gdy jest oznaczona za pomocą atrybutu „LibraryImportAttribute”. Generowanie źródła funkcji P/Invoke zignoruje metodę „{0}”. + Method '{0}' should be 'static', 'partial', and non-generic when marked with 'LibraryImportAttribute'. P/Invoke source generation will ignore method '{0}'. Invalid 'CustomMarshallerAttribute' usage - Nieprawidłowe użycie atrybutu „CustomMarshallerAttribute” + Invalid 'CustomMarshallerAttribute' usage The configuration of 'ExceptionMarshalling' and 'ExceptionMarshallingCustomType' is invalid. - Konfiguracja elementów „ExceptionMarshalling” i „ExceptionMarshallingCustomType” jest nieprawidłowa. + The configuration of 'ExceptionMarshalling' and 'ExceptionMarshallingCustomType' is invalid. The configuration of 'ExceptionMarshalling' and 'ExceptionMarshallingCustomType' on method '{0}' is invalid. {1} - Konfiguracja elementów „ExceptionMarshalling” i „ExceptionMarshallingCustomType” w metodzie „{0}” jest nieprawidłowa. {1} + The configuration of 'ExceptionMarshalling' and 'ExceptionMarshallingCustomType' on method '{0}' is invalid. {1} {1} is a message containing additional details about what is not valid 'ExceptionMarshallingCustomType' must be specified when 'ExceptionMarshalling' is set to 'ExceptionMarshalling.Custom'. - Element „ExceptionMarshallingCustomType” musi być określony kiedy „ExceptionMarshalling” jest ustawiony na „ExceptionMarshalling.Custom”. + 'ExceptionMarshallingCustomType' must be specified when 'ExceptionMarshalling' is set to 'ExceptionMarshalling.Custom'. 'ExceptionMarshalling' should be set to 'ExceptionMarshalling.Custom' when 'ExceptionMarshallingCustomType' is specified. - Element „ExceptionMarshalling” powinien być ustawiony na „ExceptionMarshalling.Custom” kiedy typ „ExceptionMarshallingCustomType” jest określony. + 'ExceptionMarshalling' should be set to 'ExceptionMarshalling.Custom' when 'ExceptionMarshallingCustomType' is specified. The provided value is not a known flag of the 'ExceptionMarshalling' enum. - Podana wartość nie jest znaną flagą wyliczenia „'ExceptionMarshalling”. + The provided value is not a known flag of the 'ExceptionMarshalling' enum. Classes with 'GeneratedComClassAttribute' must implement one or more interfaces with 'GeneratedComInterfaceAttribute', be marked partial, and be non-generic. - Klasy z atrybutem „GeneratedComClassAttribute” muszą implementować co najmniej jeden interfejs z atrybutem „GeneratedComInterfaceAttribute”, być oznaczone jako częściowe i nie być ogólne. + Classes with 'GeneratedComClassAttribute' must implement one or more interfaces with 'GeneratedComInterfaceAttribute', be marked partial, and be non-generic. Class '{0}' with 'GeneratedComClassAttribute' or one of its containing types is not marked 'partial'. - Klasa „{0}” z atrybutem „GeneratedComClassAttribute” lub jeden z jej typów zawierających nie jest oznaczony jako „częściowy”. + Class '{0}' with 'GeneratedComClassAttribute' or one of its containing types is not marked 'partial'. Invalid 'GeneratedComClassAttribute' usage - Nieprawidłowe użycie elementu „GeneratedComClassAttribute” + Invalid 'GeneratedComClassAttribute' usage Interfaces attributed with 'GeneratedComInterfaceAttribute' must have 'public' or 'internal' accessibility and be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'. - Interfejsy z atrybutem „GeneratedComInterfaceAttribute” muszą mieć ułatwienia dostępu „publiczny” lub „wewnętrzny”, muszą być częściowe, nie być ogóle, i muszą określać identyfikator GUID z atrybutem „System.Runtime.InteropServices.GuidAttribute”. + Interfaces attributed with 'GeneratedComInterfaceAttribute' must have 'public' or 'internal' accessibility and be partial, non-generic, and must specify a GUID with 'System.Runtime.InteropServices.GuidAttribute'. Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but is generic. - Interfejs „{0}” ma atrybut „GeneratedComInterfaceAttribute”, ale jest ogólny. + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but is generic. Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but is not accessible by generated code. The interface and all containing types must have accessibility 'internal' or 'public' for generated code to access it. {1} - Interfejs „{0}” ma atrybut „GeneratedComInterfaceAttribute”, ale nie jest dostępny za pomocą wygenerowanego kodu. Interfejs i wszystkie zawierające go typy muszą mieć ułatwienia dostępu „wewnętrzny” lub „publiczny”, aby wygenerowany kod mógł uzyskać do niego dostęp. {1} + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but is not accessible by generated code. The interface and all containing types must have accessibility 'internal' or 'public' for generated code to access it. {1} {1} is details about which type/containing type is not accessible Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but is missing 'System.Runtime.InteropServices.GuidAttribute'. - Interfejs „{0}” ma atrybut „GeneratedComInterfaceAttribute”, ale brakuje atrybutu „System.Runtime.InteropServices.GuidAttribute”. + Interface '{0}' is attributed with 'GeneratedComInterfaceAttribute' but is missing 'System.Runtime.InteropServices.GuidAttribute'. Invalid 'GeneratedComInterfaceAttribute' usage. - Nieprawidłowe użycie atrybutu „GeneratedComInterfaceAttribute”. + Invalid 'GeneratedComInterfaceAttribute' usage. The interface '{0}' or one of its containing types is missing the 'partial' keyword. Code will not be generated for '{0}'. - W interfejsie „{0}” lub jednym z jego typów zawierających brakuje słowa kluczowego „partial”. Kod nie zostanie wygenerowany dla „{0}”. + The interface '{0}' or one of its containing types is missing the 'partial' keyword. Code will not be generated for '{0}'. Invalid 'LibraryImportAttribute' usage - Nieprawidłowe użycie atrybutu „LibraryImportAttribute” + Invalid 'LibraryImportAttribute' usage Specified managed type is invalid - Określony typ zarządzany jest nieprawidłowy + Specified managed type is invalid Invalid 'MarshalMode' value. - Nieprawidłowa wartość „MarshalMode”. + Invalid 'MarshalMode' value. Specified marshaller type is invalid - Określony typ marshallera jest nieprawidłowy + Specified marshaller type is invalid Invalid 'NativeMarshallingAttribute' usage - Nieprawidłowe użycie atrybutu „NativeMarshallingAttribute” + Invalid 'NativeMarshallingAttribute' usage The specified 'ComInterfaceOptions' are invalid. - Określone opcje „ComInterfaceOptions” są nieprawidłowe. + The specified 'ComInterfaceOptions' are invalid. The specified 'ComInterfaceOptions' on '{0}' are invalid. {1} - Określone opcje „ComInterfaceOptions” w „{0}” są nieprawidłowe. {1} + The specified 'ComInterfaceOptions' on '{0}' are invalid. {1} Marshaller type has incompatible method signatures - Typ marshallera ma niezgodne sygnatury metody + Marshaller type has incompatible method signatures The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid. - Konfiguracja elementów „StringMarshalling” i „StringMarshallingCustomType” jest nieprawidłowa. + The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' is invalid. The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' on interface '{0}' is invalid. {1} - Konfiguracja elementów „StringMarshalling” i „StringMarshallingCustomType” w interfejsie „{0}” jest nieprawidłowa. {1} + The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' on interface '{0}' is invalid. {1} {1} is a message containing additional details about what is not valid The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' on method '{0}' is invalid. {1} - Konfiguracja elementów „StringMarshalling” i „StringMarshallingCustomType” w metodzie „{0}” jest nieprawidłowa. {1} + The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' on method '{0}' is invalid. {1} {1} is a message containing additional details about what is not valid 'StringMarshallingCustomType' must be specified when 'StringMarshalling' is set to 'StringMarshalling.Custom'. - Element „StringMarshallingCustomType” należy określić, gdy element „StringMarshalling” ma wartość „StringMarshalling.Custom”. + 'StringMarshallingCustomType' must be specified when 'StringMarshalling' is set to 'StringMarshalling.Custom'. 'StringMarshalling' should be set to 'StringMarshalling.Custom' when 'StringMarshallingCustomType' is specified. - Element „StringMarshalling” należy ustawić na wartość „StringMarshalling.Custom”, gdy określono element „StringMarshallingCustomType”. + 'StringMarshalling' should be set to 'StringMarshalling.Custom' when 'StringMarshallingCustomType' is specified. The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' on interface '{0}' is invalid. {1} - Konfiguracja elementów „StringMarshalling” i „StringMarshallingCustomType” w interfejsie „{0}” jest nieprawidłowa. {1} + The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' on interface '{0}' is invalid. {1} The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' on method '{0}' is invalid. {1} - Konfiguracja elementów „StringMarshalling” i „StringMarshallingCustomType” w metodzie „{0}” jest nieprawidłowa. {1} + The configuration of 'StringMarshalling' and 'StringMarshallingCustomType' on method '{0}' is invalid. {1} {1} is a message containing additional details about what is not valid Invalid 'VirtualMethodIndexAttribute' usage - Nieprawidłowe użycie atrybutu „VirtualMethodIndexAttribute” + Invalid 'VirtualMethodIndexAttribute' usage The usage of 'LibraryImportAttribute' does not follow recommendations. {0} - Użycie atrybutu „LibraryImportAttribute” nie jest zgodne z zaleceniami. {0} + The usage of 'LibraryImportAttribute' does not follow recommendations. {0} The usage of 'LibraryImportAttribute' does not follow recommendations. - Użycie atrybutu „LibraryImportAttribute” nie jest zgodne z zaleceniami. + The usage of 'LibraryImportAttribute' does not follow recommendations. The element type of the 'ReadOnlySpan' returned by 'GetManagedValuesSource' must be the same as the element type returned by 'GetManagedValuesDestination'. - Typ elementu „ReadOnlySpan” zwracany przez element „GetManagedValuesSource” musi być taki sam jak typ elementu zwracany przez element „GetManagedValuesDestination”. + The element type of the 'ReadOnlySpan' returned by 'GetManagedValuesSource' must be the same as the element type returned by 'GetManagedValuesDestination'. The element type of the 'ReadOnlySpan' returned by 'GetManagedValuesSource' must be the same as the element type returned by 'GetManagedValuesDestination' - Typ elementu „ReadOnlySpan” zwracany przez element „GetManagedValuesSource” musi być taki sam jak typ elementu zwracany przez element „GetManagedValuesDestination” + The element type of the 'ReadOnlySpan' returned by 'GetManagedValuesSource' must be the same as the element type returned by 'GetManagedValuesDestination' A 'LinearCollection'-kind native type that supports the 'CallerAllocatedBuffer' feature must provide a three-parameter constructor taking the managed type as the first parameter, a 'Span<byte>' as the second parameter, and the native size of the element as the third parameter - Typ natywny rodzaju „LinearCollection”, który obsługuje funkcję „CallerAllocatedBuffer”, musi zapewniać konstruktora z trzema parametrami, przyjmującego typ zarządzany jako pierwszy parametr, wartość „Span<byte>” jako drugi parametr i natywny rozmiar elementu jako trzeci parametr + A 'LinearCollection'-kind native type that supports the 'CallerAllocatedBuffer' feature must provide a three-parameter constructor taking the managed type as the first parameter, a 'Span<byte>' as the second parameter, and the native size of the element as the third parameter The type '{0}' specifies that it supports 'In' marshalling with the 'CallerAllocatedBuffer' feature for '{1}' but does not provide a three-parameter constructor that takes a '{1}' , a 'Span<byte>', and an 'int' - Typ „{0}” określa, że obsługuje funkcję skierowania „In” z funkcją „CallerAllocatedBuffer” dla elementu „{1}”, ale nie udostępnia konstruktora z trzema parametrami, który przyjmuje wartość „{1}”, \"Span<byte>\" i „int” + The type '{0}' specifies that it supports 'In' marshalling with the 'CallerAllocatedBuffer' feature for '{1}' but does not provide a three-parameter constructor that takes a '{1}' , a 'Span<byte>', and an 'int' A contiguous collection marshaller that supports marshalling from managed to unmanaged must provide a 'GetManagedValuesSource' that returns a 'ReadOnlySpan<>' and a 'GetUnmanagedValuesDestination' method that returns a 'Span<>'. - Organizator zwartej kolekcji, który obsługuje przeprowadzanie marshalingu z zarządzanych do niezarządzanych, musi zapewniać metodę „GetManagedValuesSource”, która zwraca wartość „ReadOnlySpan<>” oraz metodę „GetUnmanagedValuesDestination”, która zwraca wartość „Span<>”. + A contiguous collection marshaller that supports marshalling from managed to unmanaged must provide a 'GetManagedValuesSource' that returns a 'ReadOnlySpan<>' and a 'GetUnmanagedValuesDestination' method that returns a 'Span<>'. The type '{0}' specifies that it supports the '{1}' marshal mode, but it does not provide a 'GetManagedValuesSource' that returns a 'ReadOnlySpan<>' and a 'GetUnmanagedValuesDestination' method that returns a 'Span<>' - Typ „{0}” określa, że obsługuje tryb przeprowadzenia marshalingu „{1}”, ale nie zapewnia metody „GetManagedValuesSource”, która zwraca wartość „ReadOnlySpan<>” ani metody „GetNativeValuesDestination”, która zwraca wartość „Span<>” + The type '{0}' specifies that it supports the '{1}' marshal mode, but it does not provide a 'GetManagedValuesSource' that returns a 'ReadOnlySpan<>' and a 'GetUnmanagedValuesDestination' method that returns a 'Span<>' A contiguous collection marshaller that supports marshalling from unmanaged to managed must provide a 'GetManagedValuesDestination' that takes an 'int' and returns a 'Span<>' and a 'GetUnmanagedValuesSource' method that takes an 'int' and returns a 'ReadOnlySpan<>'. - Organizator zwartej kolekcji, który obsługuje przeprowadzanie marshalingu z niezarządzanych do zarządzanych, musi zapewniać metodę „GetManagedValuesDestination”, która przyjmuje wartość „int” i zwraca wartość „Span<>”, oraz metodę „GetUnmanagedValuesSource”, która przyjmuje wartość „int” i zwraca wartość „ReadOnlySpan<>”. + A contiguous collection marshaller that supports marshalling from unmanaged to managed must provide a 'GetManagedValuesDestination' that takes an 'int' and returns a 'Span<>' and a 'GetUnmanagedValuesSource' method that takes an 'int' and returns a 'ReadOnlySpan<>'. The type '{0}' specifies that it supports the '{1}' marshal mode, but it does not provide a 'GetManagedValuesDestination' that takes an 'int' and returns a 'Span<>' and a 'GetUnmanagedValuesSource' method that takes an 'int' and returns a 'ReadOnlySpan<>' - Typ „{0}” określa, że obsługuje tryb przeprowadzania marshalingu „{1}”, ale nie zapewnia metody „GetManagedValuesDestination”, która przyjmuje wartość „int” i zwraca wartość „Span<>”, oraz metodę „GetUnmanagedValuesSource”, która przyjmuje wartość „int” i zwraca wartość „ReadOnlySpan<>” + The type '{0}' specifies that it supports the '{1}' marshal mode, but it does not provide a 'GetManagedValuesDestination' that takes an 'int' and returns a 'Span<>' and a 'GetUnmanagedValuesSource' method that takes an 'int' and returns a 'ReadOnlySpan<>' The specified parameter needs to be marshalled from managed to unmanaged, but the marshaller type '{0}' does not support it. - Określony parametr musi być kierowany z zarządzanego do niezarządzanego, ale typ marszałka „{0}” go nie obsługuje. + The specified parameter needs to be marshalled from managed to unmanaged, but the marshaller type '{0}' does not support it. The marshaller type must be a closed generic or have the same number of generic parameters as the managed type so the generator can determine which methods are available on the specific marshaller types. - Typ marshallera musi być zamkniętym typem ogólnym lub mieć taką samą liczbę parametrów ogólnych jak typ zarządzany, aby generator mógł określić, które metody są dostępne na określonych typach marshallerów. + The marshaller type must be a closed generic or have the same number of generic parameters as the managed type so the generator can determine which methods are available on the specific marshaller types. The managed type '{0}' for entry-point marshaller type '{1}' must be a closed generic type, have the same arity as the managed type if it is a value marshaller, or have one additional generic parameter if it is a collection marshaller. - Typ zarządzany „{0}” dla typu marshaller punktu wejścia „{1}” musi być zamkniętym typem ogólnym, mieć taką samą argumentację jak typ zarządzany, jeśli jest to marshaller wartości lub mieć jeden dodatkowy parametr ogólny, jeśli jest to marshaller kolekcji. + The managed type '{0}' for entry-point marshaller type '{1}' must be a closed generic type, have the same arity as the managed type if it is a value marshaller, or have one additional generic parameter if it is a collection marshaller. The managed type for a custom marshaller must be non-null. - Typ zarządzany dla niestandardowego marshallera musi mieć wartość inną niż null. + The managed type for a custom marshaller must be non-null. The managed type for the entry-point marshaller type '{0}' must not be 'null' - Typ zarządzany dla typu marshaller punktu wejścia „{0}” nie może mieć wartości „null” + The managed type for the entry-point marshaller type '{0}' must not be 'null' The specified 'MarshalAsAttribute' configuration for parameter '{1}' is not supported by source-generated COM. If the specified configuration is required, use `ComImport` instead. - Określona konfiguracja atrybutu „MarshalAsAttribute” dla parametru „{1}” nie jest obsługiwana przez COM generowany przez źródło. Jeśli określona konfiguracja jest wymagana, użyj zamiast niej polecenia `ComImport`. + The specified 'MarshalAsAttribute' configuration for parameter '{1}' is not supported by source-generated COM. If the specified configuration is required, use `ComImport` instead. The specified 'MarshalAsAttribute' configuration for parameter '{1}' is not supported by source-generated P/Invokes. If the specified configuration is required, use a regular 'DllImport' instead. - Określona konfiguracja atrybutu „MarshalAsAttribute” dla parametru „{1}” nie jest obsługiwana przez generowane źródłowo P/Invokes. Jeśli określona konfiguracja jest wymagana, należy zamiast niej użyć zwykłego elementu „DllImport”. + The specified 'MarshalAsAttribute' configuration for parameter '{1}' is not supported by source-generated P/Invokes. If the specified configuration is required, use a regular 'DllImport' instead. The specified 'MarshalAsAttribute' configuration for the return value of method '{1}' is not supported by source-generated COM. If the specified configuration is required, use `ComImport` instead. - Określona konfiguracja atrybutu „MarshalAsAttribute” dla wartości zwracanej metody „{1}” nie jest obsługiwana przez COM generowany przez źródło. Jeśli określona konfiguracja jest wymagana, użyj zamiast niej polecenia `ComImport`. + The specified 'MarshalAsAttribute' configuration for the return value of method '{1}' is not supported by source-generated COM. If the specified configuration is required, use `ComImport` instead. The specified 'MarshalAsAttribute' configuration for the return value of method '{1}' is not supported by source-generated P/Invokes. If the specified configuration is required, use a regular 'DllImport' instead. - Określona konfiguracja atrybutu „MarshalAsAttribute” dla wartości zwracanej metody „{1}” nie jest obsługiwana przez generowane źródłowo P/Invokes. Jeśli określona konfiguracja jest wymagana, należy zamiast niej użyć zwykłego elementu „DllImport”. + The specified 'MarshalAsAttribute' configuration for the return value of method '{1}' is not supported by source-generated P/Invokes. If the specified configuration is required, use a regular 'DllImport' instead. The 'marshalMode' argument of 'CustomMarshallerAttribute' must be a valid enum value of 'MarshalMode'. - Argument „marshalMode” atrybutu „CustomMarshaellerAttribute” musi być prawidłową wartością wyliczenia argumentu „MarshalMode”. + The 'marshalMode' argument of 'CustomMarshallerAttribute' must be a valid enum value of 'MarshalMode'. The marshaller entry point type '{0}' for managed type '{1}' must have an arity of one greater than the managed type. - Typ punktu wejścia marshallera „{0}” dla typu zarządzanego „{1}” musi mieć liczbę argumentów o jeden większą niż typ zarządzany. + The marshaller entry point type '{0}' for managed type '{1}' must have an arity of one greater than the managed type. All marshallers for values that are passed as the unmanaged return value must have the same unmanaged type. - Wszystkie elementy organizujące dla wartości przekazywanych jako niezarządzana wartość zwracana muszą mieć ten sam typ niezarządzany. + All marshallers for values that are passed as the unmanaged return value must have the same unmanaged type. The marshaller type must be a closed generic or have the same number of generic parameters as the managed type so the emitted code can use a specific instantiation. - Typ marshallera musi być zamkniętym typem ogólnym lub mieć taką samą liczbę parametrów ogólnych jak typ zarządzany, aby emitowany kod mógł używać określonego wystąpienia. + The marshaller type must be a closed generic or have the same number of generic parameters as the managed type so the emitted code can use a specific instantiation. The marshaller type '{0}' pointed to by the entry-point marshaller type '{1}' must be a closed generic type or have the same arity as the managed type - Typ marshallera „{0}” wskazywanego przez typ marshallera punktu wejścia „{1}” musi być zamkniętym typem ogólnym lub mieć taką samą argumentację jak typ zarządzany + The marshaller type '{0}' pointed to by the entry-point marshaller type '{1}' must be a closed generic type or have the same arity as the managed type The 'marshallerType' parameter in the 'System.Runtime.InteropServices.Marshalling.CustomMarshallerAttribute' cannot be 'null'. - Parametr „marshallerType” w atrybucie „System.Runtime.InteropServices.Marshalling.CustomMarshaellerAttribute” nie może mieć wartości „null”. + The 'marshallerType' parameter in the 'System.Runtime.InteropServices.Marshalling.CustomMarshallerAttribute' cannot be 'null'. The 'marshallerType' parameter in the 'System.Runtime.InteropServices.Marshalling.CustomMarshallerAttribute' cannot be 'null' - Parametr „marshallerType” w atrybucie „System.Runtime.InteropServices.Marshalling.CustomMarshaellerAttribute” nie może mieć wartości „null” + The 'marshallerType' parameter in the 'System.Runtime.InteropServices.Marshalling.CustomMarshallerAttribute' cannot be 'null' The marshaller type '{0}' for managed type '{1}' must be a static class or a struct. - Typ marshallera „{0}” dla typu zarządzanego „{1}” musi być statyczny. + The marshaller type '{0}' for managed type '{1}' must be a static class or a struct. A marshaller type must either be a stateless static class or a stateful value type. A non-static class is not allowed. - Typ organizatora musi być bezstanową klasą statyczną lub stanowym typem wartości. Klasa niestatyczna jest niedozwolona. + A marshaller type must either be a stateless static class or a stateful value type. A non-static class is not allowed. The type '{0}' must be a static class or a value type - Typ „{0}” musi być klasą statyczną lub typem wartości + The type '{0}' must be a static class or a value type A type with a 'System.Runtime.InteropServices.CustomMarshallerAttribute' must specify a non-'null' managed type - Typ z atrybutem „System.Runtime.InteropServices.CustomMarshaellerAttribute” musi określać typ zarządzany inny niż „null” + A type with a 'System.Runtime.InteropServices.CustomMarshallerAttribute' must specify a non-'null' managed type The type '{0}' does not specify a managed type in the 'System.Runtime.InteropServices.CustomMarshallerAttribute' applied to the type - Typ „{0}” nie określa typu zarządzanego w atrybucie „System.Runtime.InteropServices.CustomTypeMarshallerAttribute” zastosowanym do typu + The type '{0}' does not specify a managed type in the 'System.Runtime.InteropServices.CustomMarshallerAttribute' applied to the type Marshalling bool without explicit marshalling information is not supported. Specify either 'MarshalUsingAttribute' or 'MarshalAsAttribute'. - Skierowanie wartości logicznej bez wyraźnych informacji o skierowaniu nie jest obsługiwane. Określ atrybut „MarshalUsingAttribute” lub atrybut „MarshalAsAttribute”. + Marshalling bool without explicit marshalling information is not supported. Specify either 'MarshalUsingAttribute' or 'MarshalAsAttribute'. Marshalling char with 'StringMarshalling.{0}' is not supported. Instead, manually convert the char type to the desired byte representation and pass to the source-generated P/Invoke. - Znak marshallingu o wartości „StringMarshalling.{0}” nie jest obsługiwany. Zamiast tego ręcznie przekonwertuj typ znaków na żądaną reprezentację bajtów i przekaż do wygenerowanego źródła funkcji P/Invoke. + Marshalling char with 'StringMarshalling.{0}' is not supported. Instead, manually convert the char type to the desired byte representation and pass to the source-generated P/Invoke. Marshalling char with 'StringMarshalling.Custom' is not supported. To use a custom type marshaller, specify 'MarshalUsingAttribute'. - Znak marshallingu o wartości „StringMarshalling.Custom” nie jest obsługiwany. Aby użyć marshallera typu niestandardowego, określ atrybut „MarshalUsingAttribute”. + Marshalling char with 'StringMarshalling.Custom' is not supported. To use a custom type marshaller, specify 'MarshalUsingAttribute'. Marshalling string or char without explicit marshalling information is not supported. Specify '{0}.StringMarshalling', '{0}.StringMarshallingCustomType', 'MarshalUsingAttribute' or 'MarshalAsAttribute'. - Kierowanie ciągu lub znaku bez jawnych informacji o kierowaniu nie jest obsługiwane. Określ „{0}.StringMarshalling”, „{0}.StringMarshallingCustomType”, „MarshalUsingAttribute” lub „MarshalAsAttribute”. + Marshalling string or char without explicit marshalling information is not supported. Specify '{0}.StringMarshalling', '{0}.StringMarshallingCustomType', 'MarshalUsingAttribute' or 'MarshalAsAttribute'. All methods must be declared in the same partial definition of a 'GeneratedComInterface'-attributed interface type to ensure reliable calculation for virtual method table offsets. - Wszystkie metody muszą być zadeklarowane w tej samej częściowej definicji przypisanego typu interfejsu „GeneratedComInterface” w celu zapewnienia niezawodnego obliczania przesunięć tabeli metod wirtualnych. + All methods must be declared in the same partial definition of a 'GeneratedComInterface'-attributed interface type to ensure reliable calculation for virtual method table offsets. The method '{0}' is declared on a different partial definition of the interface '{1}' than the definition that has the 'GeneratedComInterface' attribute - Metoda „{0}” jest zadeklarowana w innej częściowej definicji interfejsu „{1}” niż definicja, która ma atrybut „GeneratedComInterface” + The method '{0}' is declared on a different partial definition of the interface '{1}' than the definition that has the 'GeneratedComInterface' attribute Method is declared in different partial declaration than the 'GeneratedComInterface' attribute. - Metoda jest zadeklarowana w innej deklaracji częściowej niż atrybut „GeneratedComInterface”. + Method is declared in different partial declaration than the 'GeneratedComInterface' attribute. A 'GeneratedComInterfaceAttribute'-attributed interface can only derive from at most one other 'GeneratedComInterfaceAttribute'-attributed interface. - Interfejs z atrybutem „GeneratedComInterfaceAttribute” może pochodzić tylko z co najwyżej jednego interfejsu z atrybutem „GeneratedComInterfaceAttribute”. + A 'GeneratedComInterfaceAttribute'-attributed interface can only derive from at most one other 'GeneratedComInterfaceAttribute'-attributed interface. Interface '{0}' is derived from two or more interfaces attributed with 'GeneratedComInterfaceAttribute'. - Interfejs „{0}” pochodzi z co najmniej dwóch interfejsów z atrybutem „GeneratedComInterfaceAttribute”. + Interface '{0}' is derived from two or more interfaces attributed with 'GeneratedComInterfaceAttribute'. Specified interface derives from two or more 'GeneratedComInterfaceAttribute'-attributed interfaces. - Określony interfejs pochodzi z co najmniej dwóch interfejsów z atrybutem „GeneratedComInterfaceAttribute”. + Specified interface derives from two or more 'GeneratedComInterfaceAttribute'-attributed interfaces. Either 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' must be specified. - Należy określić element „ComInterfaceOptions.ManagedObjectWrapper” lub „ComInterfaceOptions.ComObjectWrapper”. + Either 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' must be specified. The '[Out]' attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. - Atrybut „[Out]” jest obsługiwany tylko w przypadku parametrów tablicy. Rozważ użycie słów kluczowych „out” lub „ref”, aby umożliwić modyfikowanie parametru. + The '[Out]' attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable. A 'Value' or 'LinearCollection'-kind native type that supports marshalling in the 'Out' direction must provide a 'ToManaged' method that returns the managed type. - Typ natywny rodzaju „Value” lub „LinearCollection”, który obsługuje skierowanie w kierunku „Out”, musi zapewniać metodę „ToManaged”, która zwraca typ zarządzany. + A 'Value' or 'LinearCollection'-kind native type that supports marshalling in the 'Out' direction must provide a 'ToManaged' method that returns the managed type. The type '{0}' specifies it supports marshalling in the 'Out' direction, but it does not provide a 'ToManaged' method that returns the managed type - Typ „{0}” określa, że obsługuje skierowanie w kierunku „Out”, ale nie zapewnia metody „ToManaged”, która zwraca typ zarządzany + The type '{0}' specifies it supports marshalling in the 'Out' direction, but it does not provide a 'ToManaged' method that returns the managed type It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. - Zaleca się używanie jawnych atrybutów „[In]” i „[Out]” w parametrach tablicy. + It is recommended to use explicit '[In]' and '[Out]' attributes on array parameters. 'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. - Atrybut „GeneratedComInterfaceAttribute” i „GeneratedComClassAttribute” wymagają niebezpiecznego kodu. Projekt musi zostać zaktualizowany za pomocą polecenia „<AllowUnsafeBlocks>true</AllowUnsafeBlocks>”. + 'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. LibraryImportAttribute requires unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. - Element LibraryImportAttribute wymaga niebezpiecznego kodu. Projekt musi zostać zaktualizowany za pomocą „<AllowUnsafeBlocks>true</AllowUnsafeBlocks>”. + LibraryImportAttribute requires unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. 'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. - Atrybut „GeneratedComInterfaceAttribute” i „GeneratedComClassAttribute” wymagają niebezpiecznego kodu. Projekt musi zostać zaktualizowany za pomocą polecenia „<AllowUnsafeBlocks>true</AllowUnsafeBlocks>”. + 'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. LibraryImportAttribute requires unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. - Element LibraryImportAttribute wymaga niebezpiecznego kodu. Projekt musi zostać zaktualizowany za pomocą „<AllowUnsafeBlocks>true</AllowUnsafeBlocks>”. + LibraryImportAttribute requires unsafe code. Project must be updated with '<AllowUnsafeBlocks>true</AllowUnsafeBlocks>'. 'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. - Atrybuty „GeneratedComInterfaceAttribute” i „GeneratedComClassAttribute” wymagają niebezpiecznego kodu. + 'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. LibraryImportAttribute requires unsafe code. - Element LibraryImportAttribute wymaga niebezpiecznego kodu. + LibraryImportAttribute requires unsafe code. The return type the two method must be the expected type. - Zwracany typ obu tych metod musi być oczekiwanym typem. + The return type the two method must be the expected type. The return type of '{0}' must be '{1}' - Zwracany typ „{0}” musi być „{1}” + The return type of '{0}' must be '{1}' The return types of the two methods must be the same type. - Zwracane typy obu tych metod muszą być tego samego typu. + The return types of the two methods must be the same type. The return type of '{0}' must be the same type as the return type of '{1}' - Zwracany typ „{0}” musi być tego samego typu co zwracany typ „{1}” + The return type of '{0}' must be the same type as the return type of '{1}' COM Interop APIs on 'System.Runtime.InteropServices.Marshal' do not support source-generated COM and will fail at runtime - Interfejsy API usługi międzyoperacyjnej modelu COM w elemencie „System.Runtime.InteropServices.Marshal” nie obsługują generowanego przez źródło modelu COM i nie będą działać w środowisku uruchomieniowym + COM Interop APIs on 'System.Runtime.InteropServices.Marshal' do not support source-generated COM and will fail at runtime The method '{0}' only supports runtime-based COM interop and will not work with type '{1}' - Metoda „{0}” obsługuje tylko usługę międzyoperacyjną modelu COM opartą na środowisku uruchomieniowym i nie będzie działać z typem „{1}” + The method '{0}' only supports runtime-based COM interop and will not work with type '{1}' COM Interop APIs on 'System.Runtime.InteropServices.Marshal' do not support source-generated COM - Interfejsy API usługi międzyoperacyjnej modelu COM w elemencie „System.Runtime.InteropServices.Marshal” nie obsługują generowanego przez źródło modelu COM + COM Interop APIs on 'System.Runtime.InteropServices.Marshal' do not support source-generated COM Runtime marshalling must be disabled in this project by applying the 'System.Runtime.CompilerServices.DisableRuntimeMarshallingAttribute' to the assembly to enable marshalling this type. - Marshalling środowiska uruchomieniowego musi być wyłączony w tym projekcie przez zastosowanie do zestawu atrybutu „System.Runtime.InteropServices.DisableRuntimeMarshallingAttribute”, aby umożliwić marshalling tego typu. + Runtime marshalling must be disabled in this project by applying the 'System.Runtime.CompilerServices.DisableRuntimeMarshallingAttribute' to the assembly to enable marshalling this type. The size of parameter '{0}' that is marshalled to the callee must be defined when the method is called, but count parameter '{1}' is an 'out' parameter. - Rozmiar parametru „{0}”, który jest kierowany do obiektu wywołującego, musi być zdefiniowany podczas wywoływania metody, ale parametr ILE.LICZB „{1}” jest parametrem „out”. + The size of parameter '{0}' that is marshalled to the callee must be defined when the method is called, but count parameter '{1}' is an 'out' parameter. The size of parameter '{0}' that is marshalled to the callee must be defined when the method is called, but the return value is used as the size of the collection. - Rozmiar parametru „{0}”, który jest kierowany do obiektu wywołującego, musi być zdefiniowany podczas wywoływania metody, ale wartość zwracana jest używana jako rozmiar kolekcji. + The size of parameter '{0}' that is marshalled to the callee must be defined when the method is called, but the return value is used as the size of the collection. The size of a collection that is marshalled to the callee must be defined when the method is called. - Rozmiar kolekcji kierowanej do obiektu wywołującego musi być zdefiniowany podczas wywoływania metody. + The size of a collection that is marshalled to the callee must be defined when the method is called. A stateful marshaller must have a zero-parameter void-returning instance method named 'Free'. - Stanowy marshaller musi mieć metodę wystąpienia zwracającą wartość nieważną o parametrze 0 o nazwie „Free”. + A stateful marshaller must have a zero-parameter void-returning instance method named 'Free'. The type '{0}' is a stateful marshaller and does not have a zero-parameter void-returning instance method named 'Free' - Typ „{0}” jest stanowym marshallerem i nie ma metody wystąpienia zwracającego wartość nieważną o parametrze 0 o nazwie „Free” + The type '{0}' is a stateful marshaller and does not have a zero-parameter void-returning instance method named 'Free' A stateful marshaller that supports marshalling from managed to unmanaged must provide a 'FromManaged' instance method that takes the managed value as a parameter and returns 'void'. - Stanowu marshaller obsługujący kierowanie z zarządzanego do niezarządzanego musi udostępniać metodę wystąpienia „ZNiezarządzane”, która przyjmuje wartość zarządzaną jako parametr i zwraca wartość „nieważne” + A stateful marshaller that supports marshalling from managed to unmanaged must provide a 'FromManaged' instance method that takes the managed value as a parameter and returns 'void'. The type '{0}' specifies that it supports the '{1}' marshal mode for '{2}' but it does not provide a one-parameter instance method named 'FromManaged' that takes a '{2}' as a parameter and returns 'void' - Typ „{0}” określa, że obsługuje tryb marshalingu „{1}” dla „{2}”, ale nie udostępnia metody wystąpienia z jednym parametrem o nazwie „ZNiezarządzane”, która przyjmuje jako parametr „{2}” i zwraca wartość „nieważne” + The type '{0}' specifies that it supports the '{1}' marshal mode for '{2}' but it does not provide a one-parameter instance method named 'FromManaged' that takes a '{2}' as a parameter and returns 'void' A stateful marshaller that supports marshalling from unmanaged to managed must provide a 'FromUnmanaged' instance method that takes the unmanaged value as a parameter and returns 'void'. - Stanowy marshaller obsługujący kierowanie z niezarządzanego do zarządzanego musi udostępniać metodę wystąpienia „ZNiezarządzane”, która przyjmuje wartość niezarządzaną jako parametr i zwraca wartość „nieważne”. + A stateful marshaller that supports marshalling from unmanaged to managed must provide a 'FromUnmanaged' instance method that takes the unmanaged value as a parameter and returns 'void'. The type '{0}' specifies that it supports the '{1}' marshal mode for '{2}' but it does not provide a one-parameter instance method named 'FromUnmanaged' that takes the 'unmanaged' value as a parameter and returns 'void' - Typ „{0}” określa, że obsługuje tryb marshalingu „{1}” dla elementu „{2}”, ale nie udostępnia metody wystąpienia jednego parametru o nazwie „ZNiezarządzane”, która przyjmuje wartość „niezarządzane” jako parametr i zwraca wartość „nieważne” + The type '{0}' specifies that it supports the '{1}' marshal mode for '{2}' but it does not provide a one-parameter instance method named 'FromUnmanaged' that takes the 'unmanaged' value as a parameter and returns 'void' A stateful marshaller that supports marshalling from unmanaged to managed must provide a 'ToManaged' instance method that takes no parameters and returns the managed type. - Marshaller stanu obsługujący kierowanie z niezarządzanego do zarządzanego musi udostępniać metodę wystąpienia „DoZarządzane”, która nie przyjmuje parametrów i zwraca typ zarządzany. + A stateful marshaller that supports marshalling from unmanaged to managed must provide a 'ToManaged' instance method that takes no parameters and returns the managed type. The type '{0}' specifies that it supports the '{1}' marshal mode for '{2}' but it does not provide a zero-parameter instance method named 'ToManaged' that returns '{2}' - Typ „{0}” określa, że obsługuje tryb marshalingu „{1}” dla elementu „{2}”, ale nie udostępnia metody wystąpienia o wartości zero parametrów o nazwie „DoZarządzane”, która zwraca wartość „{2}” + The type '{0}' specifies that it supports the '{1}' marshal mode for '{2}' but it does not provide a zero-parameter instance method named 'ToManaged' that returns '{2}' A stateful marshaller that supports marshalling from managed to unmanaged must provide a 'ToUnmanaged' instance method that takes no parameters and returns the 'unmanaged' type. - Stanowy marshaller obsługujący kierowanie z zarządzanego do niezarządzanego musi udostępniać metodę wystąpienia „DoNiezarządzane”, która nie przyjmuje parametrów i zwraca typ „niezarządzane”. + A stateful marshaller that supports marshalling from managed to unmanaged must provide a 'ToUnmanaged' instance method that takes no parameters and returns the 'unmanaged' type. The type '{0}' specifies that it supports the '{1}' marshal mode for '{2}' but it does not provide a zero-parameter instance method named 'ToUnmanaged' that returns the 'unmanaged' type for the marshaller - Typ „{0}” określa, że obsługuje tryb marshalingu „{1}” dla elementu „{2}”, ale nie udostępnia metody wystąpienia o wartości zero parametrów o nazwie „DoNiezarządzane”, która zwraca typ „niezarządzane” dla marshalera + The type '{0}' specifies that it supports the '{1}' marshal mode for '{2}' but it does not provide a zero-parameter instance method named 'ToUnmanaged' that returns the 'unmanaged' type for the marshaller When the 'Managed to Unmanaged with Caller-Allocated Buffer' shape is used by providing an 'AllocateContainerForUnmanagedElements' method that takes a 'Span<T>' on the marshaller type, the type must provide a static 'BufferSize' property to provide the number of elements in the caller-allocated buffer. - Gdy kształt „Zarządzane do niezarządzanych za pomocą buforu przydzielonego przez wywołującego” jest używany poprzez zapewnienie metody „AllocateContainerForUnmanagedElements”, która przyjmuje wartość „Span< T>” w przypadku typu organizatora, typ musi zapewniać statyczną właściwość „BufferSize”, aby określić liczbę elementów w buforze przydzielonym przez wywołującego. + When the 'Managed to Unmanaged with Caller-Allocated Buffer' shape is used by providing an 'AllocateContainerForUnmanagedElements' method that takes a 'Span<T>' on the marshaller type, the type must provide a static 'BufferSize' property to provide the number of elements in the caller-allocated buffer. The marshaller type '{0}' must have a static read-only 'int' 'BufferSize' property to specify the size of the caller-allocated buffer because it has an 'AllocateContainerForUnmanagedElements' method that takes a caller-allocated 'Span<{1}>' - Typ organizatora „{0}” musi mieć statyczną właściwość „BufferSize” „int” tylko do odczytu, aby określić rozmiar buforu przydzielonego przez wywołującego, ponieważ ma metodę „AllocateContainerForUnmanagedElements”, która przyjmuje przydzieloną przez wywołującego wartość „Span<{1}>” + The marshaller type '{0}' must have a static read-only 'int' 'BufferSize' property to specify the size of the caller-allocated buffer because it has an 'AllocateContainerForUnmanagedElements' method that takes a caller-allocated 'Span<{1}>' A contiguous collection marshaller that supports marshalling from managed to unmanaged must provide a 'GetManagedValuesSource' that takes the managed value as a parameter and returns a 'ReadOnlySpan<>' and a 'GetUnmanagedValuesDestination' method that takes the unmanaged value as a parameter and returns a 'Span<>' - Organizator zwartej kolekcji, który obsługuje przeprowadzanie marshalingu z niezarządzanych do zarządzanych, musi zapewniać metodę „GetManagedValuesSource”, która przyjmuje zarządzaną wartość jako parametr i zwraca wartość „ReadOnlySpan<>”, oraz metodę „GetUnmanagedValuesDestination”, która przyjmuje niezarządzaną wartość jako parametr i zwraca wartość „Span<>”. + A contiguous collection marshaller that supports marshalling from managed to unmanaged must provide a 'GetManagedValuesSource' that takes the managed value as a parameter and returns a 'ReadOnlySpan<>' and a 'GetUnmanagedValuesDestination' method that takes the unmanaged value as a parameter and returns a 'Span<>' The type '{0}' specifies that it supports the '{1}' marshal mode, but it does not provide a 'GetManagedValuesSource' that takes '{2}' as a parameter and returns a 'ReadOnlySpan<>' and a 'GetUnmanagedValuesDestination' method that takes the unmanaged value as a parameter and returns a 'Span<>' - Typ „{0}” określa, że obsługuje tryb przeprowadzania marshalingu „{1}”, ale nie zapewnia metody „GetManagedValuesSource”, która przyjmuje wartość „{2}” jako parametr i zwraca wartość „ReadOnlySpan<>”, oraz metodę „GetUnmanagedValuesDestination”, która przyjmuje niezarządzaną wartość jako parametr i zwraca wartość „Span<>” + The type '{0}' specifies that it supports the '{1}' marshal mode, but it does not provide a 'GetManagedValuesSource' that takes '{2}' as a parameter and returns a 'ReadOnlySpan<>' and a 'GetUnmanagedValuesDestination' method that takes the unmanaged value as a parameter and returns a 'Span<>' A contiguous collection marshaller that supports marshalling from unmanaged to managed must provide a 'GetManagedValuesDestination' that takes the managed value and returns a 'Span<>' and a 'GetUnmanagedValuesSource' method that takes the unmanaged value and an 'int' and returns a 'ReadOnlySpan<>'. - Organizator zwartej kolekcji, który obsługuje przeprowadzanie marshalingu z niezarządzanych do zarządzanych, musi zapewniać metodę „GetManagedValuesDestination”, która przyjmuje zarządzaną wartość i zwraca wartość „Span<>”, oraz metodę „GetUnmanagedValuesSource”, która przyjmuje niezarządzaną wartość i wartość „int” oraz zwraca wartość „ReadOnlySpan<>”. + A contiguous collection marshaller that supports marshalling from unmanaged to managed must provide a 'GetManagedValuesDestination' that takes the managed value and returns a 'Span<>' and a 'GetUnmanagedValuesSource' method that takes the unmanaged value and an 'int' and returns a 'ReadOnlySpan<>'. The type '{0}' specifies that it supports the '{1}' marshal mode, but it does not provide a 'GetManagedValuesDestination' that takes '{2}' and returns a 'Span<>' and a 'GetUnmanagedValuesSource' method that takes the unmanaged value and an 'int' and returns a 'ReadOnlySpan<>' - Typ „{0}” określa, że obsługuje tryb przeprowadzania marshalingu „{1}”, ale nie zapewnia metody „GetManagedValuesDestination”, która przyjmuje wartość „{2}” i zwraca wartość „Span<>”, oraz metodę „GetUnmanagedValuesSource”, która przyjmuje wartość niezarządzaną i „int” oraz zwraca wartość „ReadOnlySpan<>” + The type '{0}' specifies that it supports the '{1}' marshal mode, but it does not provide a 'GetManagedValuesDestination' that takes '{2}' and returns a 'Span<>' and a 'GetUnmanagedValuesSource' method that takes the unmanaged value and an 'int' and returns a 'ReadOnlySpan<>' A stateless contiguous collection marshaller that supports marshalling from managed to unmanaged must provide an 'AllocateContainerForManagedElements' method taking the unmanaged type as the first parameter and the number of elements as an 'int' parameter - Bezstanowy organizator zwartej kolekcji, który obsługuje przeprowadzanie marshalingu z zarządzanych do niezarządzanych, musi zapewniać metodę „AllocateContainerForManagedElements”, przyjmując typ niezarządzany jako pierwszy parametr oraz liczbę elementów jako parametr „int” + A stateless contiguous collection marshaller that supports marshalling from managed to unmanaged must provide an 'AllocateContainerForManagedElements' method taking the unmanaged type as the first parameter and the number of elements as an 'int' parameter The type '{0}' specifies that it supports the '{1}' marshal mode for '{2}' but does not provide a two-parameter 'AllocateContainerForManagedElements' method that takes the unmanaged type as the first parameter and an 'int' as the second parameter - Typ „{0}” określa, że obsługuje tryb przeprowadzania marshalingu „{1}” dla „{2}”, ale nie zapewnia metody „AllocateContainerForManagedElements” z dwoma parametrami, która przyjmuje typ niezarządzany jako pierwszy parametr i wartość „int” jako drugi parametr + The type '{0}' specifies that it supports the '{1}' marshal mode for '{2}' but does not provide a two-parameter 'AllocateContainerForManagedElements' method that takes the unmanaged type as the first parameter and an 'int' as the second parameter A stateless contiguous collection marshaller that supports marshalling from managed to unmanaged must provide an 'AllocateContainerForUnmanagedElements' method taking the managed type as the first parameter and providing the number of elements as an 'out int' parameter - Bezstanowy organizator zwartej kolekcji, który obsługuje przeprowadzanie marshalingu z zarządzanych do niezarządzanych, musi zapewniać metodę „AllocateContainerForUnmanagedElements”, przyjmując typ zarządzany jako pierwszy parametr oraz określając liczbę elementów jako parametr „out int” + A stateless contiguous collection marshaller that supports marshalling from managed to unmanaged must provide an 'AllocateContainerForUnmanagedElements' method taking the managed type as the first parameter and providing the number of elements as an 'out int' parameter The type '{0}' specifies that it supports the '{1}' marshal mode for '{2}' but does not provide a two-parameter 'AllocateContainerForUnmanagedElements' method that takes a '{2}' as the first parameter and an 'out int' as the second parameter - Typ „{0}” określa, że obsługuje tryb przeprowadzania marshalingu „{1}” dla „{2}”, ale nie zapewnia metody „AllocateContainerForUnmanagedElements” z dwoma parametrami, która przyjmuje wartość „{2}” jako pierwszy parametr i wartość „out int” jako drugi parametr + The type '{0}' specifies that it supports the '{1}' marshal mode for '{2}' but does not provide a two-parameter 'AllocateContainerForUnmanagedElements' method that takes a '{2}' as the first parameter and an 'out int' as the second parameter A stateless value marshaller that supports marshalling from unmanaged to managed must provide a 'ConvertToManaged' method that takes the unmanaged type as a parameter and returns the the managed type. - Bezstanowy organizator wartości, który obsługuje przeprowadzanie marshalingu z zarządzanych do niezarządzanych, musi zapewniać metodę „ConvertToManaged”, która przyjmuje typ niezarządzany jako parametr i zwraca typ zarządzany. + A stateless value marshaller that supports marshalling from unmanaged to managed must provide a 'ConvertToManaged' method that takes the unmanaged type as a parameter and returns the the managed type. The type '{0}' specifies it supports the '{1}' marshal mode, but it does not provide a 'ConvertToManaged' method that takes the unmanaged type as a parameter and returns '{2}' - Typ „{0}” określa, że obsługuje tryb przeprowadzania marshalingu „{1}”, ale nie zapewnia metody „ConvertToManaged”, która przyjmuje typ niezarządzany jako parametr i zwraca wartość „{2}” + The type '{0}' specifies it supports the '{1}' marshal mode, but it does not provide a 'ConvertToManaged' method that takes the unmanaged type as a parameter and returns '{2}' A stateless value marshaller that supports marshalling from managed to unmanaged must provide a one-parameter 'ConvertToUnmanaged' method that takes the managed value as the parameter and returns a value of the 'unmanaged' type. - Bezstanowy organizator wartości, który obsługuje przeprowadzanie marshalingu z zarządzanych do niezarządzanych, musi zapewniać metodę „ConvertToUnmanaged” z jednym parametrem, która przyjmuje wartość zarządzaną jako parametr i zwraca wartość typu „niezarządzany”. + A stateless value marshaller that supports marshalling from managed to unmanaged must provide a one-parameter 'ConvertToUnmanaged' method that takes the managed value as the parameter and returns a value of the 'unmanaged' type. The type '{0}' specifies that it supports the '{1}' marshal mode for '{2}' but does not provide a one-parameter 'ConvertToUnmanaged' method that takes a '{2}' as a parameter and returns a value of an 'unmanaged' type - Typ „{0}” określa, że obsługuje tryb przeprowadzania marshalingu „{1}” dla „{2}”, ale nie zapewnia metody „ConvertToUnmanaged” z jednym parametrem, która przyjmuje wartość „{2}” jako parametr i zwraca wartość typu „niezarządzany” + The type '{0}' specifies that it supports the '{1}' marshal mode for '{2}' but does not provide a one-parameter 'ConvertToUnmanaged' method that takes a '{2}' as a parameter and returns a value of an 'unmanaged' type The type '{0}' specified as 'GeneratedComInterfaceAttribute.StringMarshallingCustomType' is not accessible by generated code. The type must have at least 'internal' accessibility. {1} - Typ „{0}” określony jako „GeneratedComInterfaceAttribute.StringMarshallingCustomType” jest niedostępny za pomocą wygenerowanego kodu. Typ musi mieć co najmniej ułatwienia dostępu „wewnętrzny”. {1} + The type '{0}' specified as 'GeneratedComInterfaceAttribute.StringMarshallingCustomType' is not accessible by generated code. The type must have at least 'internal' accessibility. {1} {1} is details about which type/containing type is not accessible The return type of 'ToUnmanaged' and the parameter type of 'FromUnmanaged' must be the same. - Zwracany typ elementu „ToUnmanaged” i typ parametru elementu „FromUnmanaged” muszą być takie same. + The return type of 'ToUnmanaged' and the parameter type of 'FromUnmanaged' must be the same. The return type of 'ToUnmanaged' and the parameter type of 'FromUnmanaged' must be the same - Zwracany typ elementu „ToUnmanaged” i typ parametru elementu „FromUnmanaged” muszą być takie same + The return type of 'ToUnmanaged' and the parameter type of 'FromUnmanaged' must be the same The return type of 'ConvertToUnmanaged' and the parameter type of 'ConvertToManaged' must be the same. - Zwracany typ elementu „ConvertToUnmanaged” i typ parametru elementu „ConvertToManaged” muszą być takie same. + The return type of 'ConvertToUnmanaged' and the parameter type of 'ConvertToManaged' must be the same. The return type of 'ConvertToUnmanaged' and the parameter type of 'ConvertToManaged' must be the same - Zwracany typ elementu „ConvertToUnmanaged” i typ parametru elementu „ConvertToManaged” muszą być takie same + The return type of 'ConvertToUnmanaged' and the parameter type of 'ConvertToManaged' must be the same '{0}' has accessibility '{1}'. - „{0}” ma ułatwienia dostępu „{1}”. + '{0}' has accessibility '{1}'. The unmanaged type for a custom marshaller must be a C# unmanaged type. - Typ niezarządzany dla niestandardowego organizatora musi być niezarządzanym typem języka C#. + The unmanaged type for a custom marshaller must be a C# unmanaged type. The return type of '{0}' must be unmanaged - Zwracany typ „{0}” musi być niezarządzany + The return type of '{0}' must be unmanaged 'void*' must be castable to the type so the pinned result of the static 'GetPinnableReference' method can be passed to the native context after being pinned. - Element „void*” musi być rzutowany na typ, aby przypięty wynik statycznej metody „GetPinnableReference” mógł zostać przekazany do kontekstu macierzystego po przypięciu. + 'void*' must be castable to the type so the pinned result of the static 'GetPinnableReference' method can be passed to the native context after being pinned. 'void*' must be castable to the type '{0}' because the managed type '{1}' has a static 'GetPinnableReference' method - Element „void*” musi być rzutowany na typ „{0}”, ponieważ typ zarządzany „{1}” ma statyczną metodę „GetPinnableReference” + 'void*' must be castable to the type '{0}' because the managed type '{1}' has a static 'GetPinnableReference' method For types that are not supported by source-generated COM, the resulting function pointer will rely on the underlying runtime to marshal the specified type. - W przypadku typów, które nie są obsługiwane przez COM wygenerowany przez źródło, wynikowy wskaźnik funkcji będzie polegał na bazowym środowisku uruchomieniowym w celu skierowania określonego typu. + For types that are not supported by source-generated COM, the resulting function pointer will rely on the underlying runtime to marshal the specified type. For types that are not supported by source-generated P/Invokes, the resulting P/Invoke will rely on the underlying runtime to marshal the specified type. - W przypadku typów, które nie są obsługiwane przez funkcję P/Invokes generowaną przez źródło, wynikowa funkcja P/Invoke będzie polegać na bazowym środowisku uruchomieniowym, aby skierować określony typ. + For types that are not supported by source-generated P/Invokes, the resulting P/Invoke will rely on the underlying runtime to marshal the specified type. The type '{0}' is not supported by source-generated COM. The generated source will not handle marshalling of parameter '{1}'. - Typ „{0}” nie jest obsługiwany przez COM generowany przez źródło. Wygenerowane źródło nie będzie obsługiwać skierowania parametru „{1}”. + The type '{0}' is not supported by source-generated COM. The generated source will not handle marshalling of parameter '{1}'. The type '{0}' is not supported by source-generated P/Invokes. The generated source will not handle marshalling of parameter '{1}'. - Typ „{0}” nie jest obsługiwany przez funkcję P/Invokes generowaną przez źródło. Wygenerowane źródło nie obsługuje skierowania parametru „{1}”. + The type '{0}' is not supported by source-generated P/Invokes. The generated source will not handle marshalling of parameter '{1}'. {0} The generated source will not handle marshalling of parameter '{1}'. - {0} Wygenerowane źródło nie obsługuje skierowania parametru „{1}”. + {0} The generated source will not handle marshalling of parameter '{1}'. {0} is a message containing additional details about what is not supported {1} is the name of the parameter The type '{0}' is not supported by source-generated COM. The generated source will not handle marshalling of the return value of method '{1}'. - Typ „{0}” nie jest obsługiwany przez COM generowany przez źródło. Wygenerowane źródło nie będzie obsługiwać skierowania wartości zwracanej przez metodę „{1}”. + The type '{0}' is not supported by source-generated COM. The generated source will not handle marshalling of the return value of method '{1}'. The type '{0}' is not supported by source-generated P/Invokes. The generated source will not handle marshalling of the return value of method '{1}'. - Typ „{0}” nie jest obsługiwany przez funkcję P/Invokes generowaną przez źródło. Wygenerowane źródło nie obsługuje skierowania wartości zwracanej przez metodę „{1}”. + The type '{0}' is not supported by source-generated P/Invokes. The generated source will not handle marshalling of the return value of method '{1}'. {0} The generated source will not handle marshalling of the return value of method '{1}'. - {0}Wygenerowane źródło nie obsługuje skierowania wartości zwracanej przez metodę „{1}”. + {0} The generated source will not handle marshalling of the return value of method '{1}'. {0} is a message containing additional details about what is not supported {1} is the name of the method Specified type is not supported by source-generated P/Invokes - Określony typ nie jest obsługiwany przez funkcję P/Invokes generowaną przez źródło + Specified type is not supported by source-generated P/Invokes Specified type is not supported by source-generated COM - Określony typ nie jest obsługiwany przez źródłowy COM + Specified type is not supported by source-generated COM The specified parameter needs to be marshalled from unmanaged to managed, but the marshaller type '{0}' does not support it. - Określony parametr musi być kierowany z niezarządzanego do zarządzanego, ale typ marszałka „{0}” go nie obsługuje. + The specified parameter needs to be marshalled from unmanaged to managed, but the marshaller type '{0}' does not support it. Unnecesssary marshalling info was provided. This marshalling information can be removed without any change in behavior to the application. - Niepotrzebne informacje o marshallingu zostały przekazane. Te informacje o marshallingu można usunąć bez żadnych zmian w zachowaniu aplikacji. + Unnecesssary marshalling info was provided. This marshalling information can be removed without any change in behavior to the application. Unnecessary marshalling info was provided and can be removed. - Niepotrzebne informacje o marshallingu zostały przekazane i można je usunąć. + Unnecessary marshalling info was provided and can be removed. Unnecessary marshalling info '{0}' was provided for parameter '{1}'. {2} - Niepotrzebne informacje o marshallingu „{0}” zostały przekazane dla parametru „{1}”. {2} + Unnecessary marshalling info '{0}' was provided for parameter '{1}'. {2} Unnecessary marshalling info '{0}' was provided for the return type of method '{1}'. {2} - Niepotrzebne informacje o marshallingu „{0}” zostały przekazane dla zwracanego typu metody „{1}”. {2} + Unnecessary marshalling info '{0}' was provided for the return type of method '{1}'. {2} A 'Value'-kind native type that supports the 'CallerAllocatedBuffer' feature must provide a two-parameter constructor taking the managed type and a 'Span' of an 'unmanaged' type as parameters - Typ natywny rodzaju „Value”, który obsługuje funkcję „CallerAllocatedBuffer” musi zapewniać konstruktora z dwoma parametrami przyjmującego typ zarządzany i wartość „Span” typu „unmanaged” jako parametry + A 'Value'-kind native type that supports the 'CallerAllocatedBuffer' feature must provide a two-parameter constructor taking the managed type and a 'Span' of an 'unmanaged' type as parameters The type '{0}' specifies that it supports 'In' marshalling with the 'CallerAllocatedBuffer' feature for '{1}' but does not provide a two-parameter constructor that takes a '{1}' and 'Span' of an 'unmanaged' type as parameters - Typ „{0}” określa, że obsługuje marshalling „In” z funkcją „CallerAllocatedBuffer” dla elementu „{1}”, ale nie zapewnia konstruktora z dwoma parametrami, który przyjmuje wartośći „{1}””Span” typu „unmanaged” jako parametry + The type '{0}' specifies that it supports 'In' marshalling with the 'CallerAllocatedBuffer' feature for '{1}' but does not provide a two-parameter constructor that takes a '{1}' and 'Span' of an 'unmanaged' type as parameters A 'Value'-kind native type must provide a one-parameter constructor taking the managed type as a parameter - Typ natywny rodzaju „Value” musi zapewniać konstruktora z jednym parametrem przyjmującego typ zarządzany jako parametr + A 'Value'-kind native type must provide a one-parameter constructor taking the managed type as a parameter The type '{0}' specifies that it supports 'In' marshalling of '{1}' but does not provide a one-parameter constructor that takes a '{1}' as a parameter - Typ „{0}” określa, że obsługuje skierowanie „In” z elementu „{1}”, ale nie zapewnia konstruktora z jednym parametrem, który przyjmuje element „{1}” jako parametr + The type '{0}' specifies that it supports 'In' marshalling of '{1}' but does not provide a one-parameter constructor that takes a '{1}' as a parameter diff --git a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.pt-BR.xlf b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.pt-BR.xlf index 334ca83142b27..e1969dc8b8ab5 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.pt-BR.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.pt-BR.xlf @@ -67,6 +67,16 @@ A interface COM base falhou ao gerar a fonte. O código não será gerado para esta interface. + + The type '{0}' has a base interface '{1}' defined in a different assembly. This can cause a variety of difficult to diagnose issues in some scenarios + The type '{0}' has a base interface '{1}' defined in a different assembly. This can cause a variety of difficult to diagnose issues in some scenarios + + + + Specifying 'GeneratedComInterfaceAttribute' on an interface that has a base interface defined in another assembly is not supported + Specifying 'GeneratedComInterfaceAttribute' on an interface that has a base interface defined in another assembly is not supported + + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. Um 'GeneratedComInterface' não pode especificar 'ComInterfaceOptions.ManagedObjectWrapper' ou 'ComInterfaceOptions.ComObjectWrapper' a menos que o tipo de interface base não especifique opções ou especifique pelo menos as mesmas opções. diff --git a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ru.xlf b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ru.xlf index 4aa8943244c4c..d98f485c3e77a 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ru.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.ru.xlf @@ -67,6 +67,16 @@ Базовому COM-интерфейсу не удалось создать источник. Код не будет создан для этого интерфейса. + + The type '{0}' has a base interface '{1}' defined in a different assembly. This can cause a variety of difficult to diagnose issues in some scenarios + The type '{0}' has a base interface '{1}' defined in a different assembly. This can cause a variety of difficult to diagnose issues in some scenarios + + + + Specifying 'GeneratedComInterfaceAttribute' on an interface that has a base interface defined in another assembly is not supported + Specifying 'GeneratedComInterfaceAttribute' on an interface that has a base interface defined in another assembly is not supported + + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. Параметр "GeneratedComInterface" не может указывать "ComInterfaceOptions.ManagedObjectWrapper" или "ComInterfaceOptions.ComObjectWrapper" кроме случаев, когда базовый тип интерфейса не указывает параметры или указывает по крайней мере те же параметры. diff --git a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.tr.xlf b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.tr.xlf index e10c9326eb789..cb79284da8216 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.tr.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.tr.xlf @@ -67,6 +67,16 @@ Temel COM arabirimi, kaynak oluşturamadı. Bu arabirim için kod oluşturulmayacak. + + The type '{0}' has a base interface '{1}' defined in a different assembly. This can cause a variety of difficult to diagnose issues in some scenarios + The type '{0}' has a base interface '{1}' defined in a different assembly. This can cause a variety of difficult to diagnose issues in some scenarios + + + + Specifying 'GeneratedComInterfaceAttribute' on an interface that has a base interface defined in another assembly is not supported + Specifying 'GeneratedComInterfaceAttribute' on an interface that has a base interface defined in another assembly is not supported + + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. Temel arabirim seçenekleri belirtmediği veya en azından aynı seçenekleri belirttiği sürece bir 'GeneratedComInterface' arabirimi 'ComInterfaceOptions.ManagedObjectWrapper' veya 'ComInterfaceOptions.ComObjectWrapper' seçeneğini belirtemez. diff --git a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.zh-Hans.xlf b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.zh-Hans.xlf index 08ca317623bb1..bfaa9c0b22c78 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.zh-Hans.xlf @@ -67,6 +67,16 @@ 基本 COM 接口无法生成源。不会为此接口生成代码。 + + The type '{0}' has a base interface '{1}' defined in a different assembly. This can cause a variety of difficult to diagnose issues in some scenarios + The type '{0}' has a base interface '{1}' defined in a different assembly. This can cause a variety of difficult to diagnose issues in some scenarios + + + + Specifying 'GeneratedComInterfaceAttribute' on an interface that has a base interface defined in another assembly is not supported + Specifying 'GeneratedComInterfaceAttribute' on an interface that has a base interface defined in another assembly is not supported + + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. "GeneratedComInterface" 不能指定 "ComInterfaceOptions.ManagedObjectWrapper" 或 "ComInterfaceOptions.ComObjectWrapper",除非基接口类型未指定选项或至少指定了相同的选项。 diff --git a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.zh-Hant.xlf b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.zh-Hant.xlf index 58ec86913e203..c8880476fda35 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/libraries/System.Runtime.InteropServices/gen/Common/Resources/xlf/Strings.zh-Hant.xlf @@ -67,6 +67,16 @@ 基底 COM 介面無法產生來源。將不會產生此介面的程式碼。 + + The type '{0}' has a base interface '{1}' defined in a different assembly. This can cause a variety of difficult to diagnose issues in some scenarios + The type '{0}' has a base interface '{1}' defined in a different assembly. This can cause a variety of difficult to diagnose issues in some scenarios + + + + Specifying 'GeneratedComInterfaceAttribute' on an interface that has a base interface defined in another assembly is not supported + Specifying 'GeneratedComInterfaceAttribute' on an interface that has a base interface defined in another assembly is not supported + + A 'GeneratedComInterface' cannot specify 'ComInterfaceOptions.ManagedObjectWrapper' or 'ComInterfaceOptions.ComObjectWrapper' unless the base interface type did not specify options or specified at least the same options. 除非基本介面類型未指定選項或至少指定了相同的選項,否則 'GeneratedComInterface' 不能指定 'ComInterfaceOptions.ManagedObjectWrapper' 或 'ComInterfaceOptions.ComObjectWrapper'。 diff --git a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/IncrementalValuesProviderExtensions.cs b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/IncrementalValuesProviderExtensions.cs index 5455510ac356c..51bd58dafc827 100644 --- a/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/IncrementalValuesProviderExtensions.cs +++ b/src/libraries/System.Runtime.InteropServices/gen/Microsoft.Interop.SourceGeneration/IncrementalValuesProviderExtensions.cs @@ -51,5 +51,10 @@ public static (IncrementalValuesProvider, IncrementalValuesProvider) Spli { return (provider.Select(static (data, ct) => data.Item1), provider.Select(static (data, ct) => data.Item2)); } + + public static IncrementalValuesProvider Concat(this IncrementalValuesProvider first, IncrementalValuesProvider second) + { + return first.Collect().Combine(second.Collect()).SelectMany((data, ct) => data.Left.AddRange(data.Right)); + } } } diff --git a/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/CompileFails.cs b/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/CompileFails.cs index a4edda428c66c..d7acb49fd7d81 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/CompileFails.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/CompileFails.cs @@ -567,76 +567,6 @@ public partial interface {|#0:I|} await VerifyComInterfaceGenerator.VerifySourceGeneratorAsync(containingTypeIsNotPartial, new DiagnosticResult(GeneratorDiagnostics.InvalidAttributedInterfaceMissingPartialModifiers).WithLocation(0).WithArguments("I")); } - [Fact] - public async Task VerifyComInterfaceInheritingFromComInterfaceInOtherAssemblyReportsDiagnostic() - { - string additionalSource = $$""" - using System.Runtime.InteropServices; - using System.Runtime.InteropServices.Marshalling; - - [GeneratedComInterface] - [Guid("9D3FD745-3C90-4C10-B140-FAFB01E3541D")] - public partial interface I - { - void Method(); - } - """; - - string source = $$""" - using System.Runtime.InteropServices; - using System.Runtime.InteropServices.Marshalling; - - [GeneratedComInterface] - [Guid("0DB41042-0255-4CDD-B73A-9C5D5F31303D")] - partial interface {|#0:J|} : I - { - void MethodA(); - } - """; - - var test = new VerifyComInterfaceGenerator.Test(referenceAncillaryInterop: false) - { - TestState = - { - Sources = - { - ("Source.cs", source) - }, - AdditionalProjects = - { - ["Other"] = - { - Sources = - { - ("Other.cs", additionalSource) - }, - }, - }, - AdditionalProjectReferences = - { - "Other" - } - }, - TestBehaviors = TestBehaviors.SkipGeneratedSourcesCheck | TestBehaviors.SkipGeneratedCodeCheck, - }; - test.TestState.AdditionalProjects["Other"].AdditionalReferences.AddRange(test.TestState.AdditionalReferences); - - test.ExpectedDiagnostics.Add( - VerifyComInterfaceGenerator - .Diagnostic(GeneratorDiagnostics.BaseInterfaceIsNotGenerated) - .WithLocation(0) - .WithArguments("J", "I")); - - // The Roslyn SDK doesn't apply the compilation options from CreateCompilationOptions to AdditionalProjects-based projects. - test.SolutionTransforms.Add((sln, _) => - { - var additionalProject = sln.Projects.First(proj => proj.Name == "Other"); - return additionalProject.WithCompilationOptions(new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary, allowUnsafe: true)).Solution; - }); - - await test.RunAsync(); - } - [Fact] public async Task VerifyDiagnosticIsOnAttributedSyntax() { diff --git a/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/TargetSignatureTests.cs b/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/TargetSignatureTests.cs index 7181fe9f91f98..140106f6cd858 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/TargetSignatureTests.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/ComInterfaceGenerator.Unit.Tests/TargetSignatureTests.cs @@ -7,6 +7,7 @@ using System.Reflection.Metadata; using System.Threading.Tasks; using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Operations; using Microsoft.CodeAnalysis.Testing; using Microsoft.Interop; @@ -296,9 +297,196 @@ await VerifyComInterfaceGeneratorAsync(source, "IComInterface", "Method", (newCo }); } + [Fact] + public async Task ComInterfaceInheritingAcrossCompilationsCalculatesCorrectVTableIndex() + { + string baseSource = $$""" + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + using System.Runtime.InteropServices.Marshalling; + + [GeneratedComInterface] + [Guid("0A617667-4961-4F90-B74F-6DC368E98179")] + public partial interface IComInterface + { + void Method(); + } + """; + + string derivedSource = $$""" + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + using System.Runtime.InteropServices.Marshalling; + + [GeneratedComInterface] + [Guid("0A617667-4961-4F90-B74F-6DC368E9817A")] + partial interface {|#1:IComInterface2|} : IComInterface + { + void DerivedMethod(); + } + """; + + await VerifyInvocationWithMultipleProjectsAsync( + derivedSource, + baseSource, + "IComInterface2", + "DerivedMethod", + (newComp, invocation) => + { + Assert.Equal(4, Assert.IsAssignableFrom(Assert.IsAssignableFrom(invocation.Target).Operand.ChildOperations.Last()).ConstantValue.Value); + }, + VerifyCS.DiagnosticWithArguments(GeneratorDiagnostics.BaseInterfaceDefinedInOtherAssembly, "IComInterface2", "IComInterface").WithLocation(1).WithSeverity(DiagnosticSeverity.Warning)); + } + + [Fact] + public async Task ComInterfaceInheritingAcrossCompilationsChainInBaseCalculatesCorrectVTableIndex() + { + string baseSource = $$""" + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + using System.Runtime.InteropServices.Marshalling; + + [GeneratedComInterface] + [Guid("0A617667-4961-4F90-B74F-6DC368E98179")] + public partial interface IComInterface + { + void Method(); + } + + [GeneratedComInterface] + [Guid("0A617667-4961-4F90-B74F-6DC368E98178")] + public partial interface IComInterface2 : IComInterface + { + void MiddleMethod(); + } + """; + + string derivedSource = $$""" + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + using System.Runtime.InteropServices.Marshalling; + + [GeneratedComInterface] + [Guid("0A617667-4961-4F90-B74F-6DC368E9817A")] + partial interface {|#1:IComInterface3|} : IComInterface2 + { + void DerivedMethod(); + } + """; + + await VerifyInvocationWithMultipleProjectsAsync( + derivedSource, + baseSource, + "IComInterface3", + "DerivedMethod", + (newComp, invocation) => + { + Assert.Equal(5, Assert.IsAssignableFrom(Assert.IsAssignableFrom(invocation.Target).Operand.ChildOperations.Last()).ConstantValue.Value); + }, + VerifyCS.DiagnosticWithArguments(GeneratorDiagnostics.BaseInterfaceDefinedInOtherAssembly, "IComInterface3", "IComInterface2").WithLocation(1).WithSeverity(DiagnosticSeverity.Warning)); + } + + [Fact] + public async Task ComInterfaceInheritingAcrossCompilationsChainInDerivedCalculatesCorrectVTableIndex() + { + string baseSource = $$""" + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + using System.Runtime.InteropServices.Marshalling; + + [GeneratedComInterface] + [Guid("0A617667-4961-4F90-B74F-6DC368E98179")] + public partial interface IComInterface + { + void Method(); + } + """; + + string derivedSource = $$""" + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + using System.Runtime.InteropServices.Marshalling; + + [GeneratedComInterface] + [Guid("0A617667-4961-4F90-B74F-6DC368E98178")] + public partial interface {|#1:IComInterface2|} : IComInterface + { + void MiddleMethod(); + } + + [GeneratedComInterface] + [Guid("0A617667-4961-4F90-B74F-6DC368E9817A")] + partial interface IComInterface3 : IComInterface2 + { + void DerivedMethod(); + } + """; + + await VerifyInvocationWithMultipleProjectsAsync( + derivedSource, + baseSource, + "IComInterface3", + "DerivedMethod", + (newComp, invocation) => + { + Assert.Equal(5, Assert.IsAssignableFrom(Assert.IsAssignableFrom(invocation.Target).Operand.ChildOperations.Last()).ConstantValue.Value); + }, + VerifyCS.DiagnosticWithArguments(GeneratorDiagnostics.BaseInterfaceDefinedInOtherAssembly, "IComInterface2", "IComInterface").WithLocation(1).WithSeverity(DiagnosticSeverity.Warning)); + } + + private static async Task VerifyInvocationWithMultipleProjectsAsync( + string thisSource, + string baseSource, + string interfaceName, + string methodName, + Action invocationValidator, + params DiagnosticResult[] diagnostics) + { + TargetFunctionPointerInvocationTest test = new( + interfaceName, + methodName, + invocationValidator, + new ComInterfaceImplementationLocator(), + [typeof(Microsoft.Interop.ComInterfaceGenerator)] + ) + { + TestState = + { + Sources = { thisSource }, + AdditionalProjects = + { + ["Base"] = + { + Sources = { baseSource } + } + }, + AdditionalProjectReferences = { "Base" }, + }, + TestBehaviors = TestBehaviors.SkipGeneratedSourcesCheck + }; + + test.TestState.AdditionalProjects["Base"].AdditionalReferences.AddRange(test.TestState.AdditionalReferences); + + // The Roslyn SDK doesn't apply the compilation options from CreateCompilationOptions to AdditionalProjects-based projects. + test.SolutionTransforms.Add((sln, _) => + { + var additionalProject = sln.Projects.First(proj => proj.Name == "Base"); + return additionalProject.WithCompilationOptions(new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary, allowUnsafe: true)).Solution; + }); + + test.ExpectedDiagnostics.AddRange(diagnostics); + + await test.RunAsync(); + } + private static async Task VerifyVirtualMethodIndexGeneratorAsync(string source, string interfaceName, string methodName, Action signatureValidator) { - VirtualMethodIndexTargetSignatureTest test = new(interfaceName, methodName, signatureValidator) + TargetFunctionPointerInvocationTest test = new( + interfaceName, + methodName, + (newComp, invocation) => signatureValidator(newComp, invocation.GetFunctionPointerSignature()), + new VirtualMethodIndexImplementationLocator(), + [typeof(VtableIndexStubGenerator)]) { TestCode = source, TestBehaviors = TestBehaviors.SkipGeneratedSourcesCheck @@ -306,9 +494,15 @@ private static async Task VerifyVirtualMethodIndexGeneratorAsync(string source, await test.RunAsync(); } + private static async Task VerifyComInterfaceGeneratorAsync(string source, string interfaceName, string methodName, Action signatureValidator) { - ComInterfaceTargetSignatureTest test = new(interfaceName, methodName, signatureValidator) + TargetFunctionPointerInvocationTest test = new( + interfaceName, + methodName, + (newComp, invocation) => signatureValidator(newComp, invocation.GetFunctionPointerSignature()), + new ComInterfaceImplementationLocator(), + [typeof(Microsoft.Interop.ComInterfaceGenerator)]) { TestCode = source, TestBehaviors = TestBehaviors.SkipGeneratedSourcesCheck @@ -317,34 +511,34 @@ private static async Task VerifyComInterfaceGeneratorAsync(string source, string await test.RunAsync(); } - private abstract class TargetSignatureTestBase : VerifyCS.Test + private interface IImplementationLocator { - private readonly Action _signatureValidator; - private readonly string _interfaceName; - private readonly string _methodName; - - protected TargetSignatureTestBase(string interfaceName, string methodName, Action signatureValidator) - : base(referenceAncillaryInterop: true) - { - _signatureValidator = signatureValidator; - _interfaceName = interfaceName; - _methodName = methodName; - } + INamedTypeSymbol FindImplementationInterface(Compilation compilation, INamedTypeSymbol userDefinedInterface); + } + private sealed class TargetFunctionPointerInvocationTest( + string interfaceName, + string methodName, + Action signatureValidator, + IImplementationLocator implementationTypeLocator, + IEnumerable sourceGenerators) + : VerifyCS.Test(referenceAncillaryInterop: true) + { protected override void VerifyFinalCompilation(Compilation compilation) { - _signatureValidator(compilation, FindFunctionPointerInvocationSignature(compilation)); + signatureValidator(compilation, FindFunctionPointerInvocation(compilation)); } - protected abstract INamedTypeSymbol FindImplementationInterface(Compilation compilation, INamedTypeSymbol userDefinedInterface); - private IMethodSymbol FindFunctionPointerInvocationSignature(Compilation compilation) + protected sealed override IEnumerable GetSourceGenerators() => sourceGenerators; + + private IFunctionPointerInvocationOperation FindFunctionPointerInvocation(Compilation compilation) { - INamedTypeSymbol? userDefinedInterface = compilation.Assembly.GetTypeByMetadataName(_interfaceName); + INamedTypeSymbol? userDefinedInterface = compilation.Assembly.GetTypeByMetadataName(interfaceName); Assert.NotNull(userDefinedInterface); - INamedTypeSymbol generatedInterfaceImplementation = FindImplementationInterface(compilation, userDefinedInterface); + INamedTypeSymbol generatedInterfaceImplementation = implementationTypeLocator.FindImplementationInterface(compilation, userDefinedInterface); - IMethodSymbol methodImplementation = Assert.Single(generatedInterfaceImplementation.GetMembers($"global::{_interfaceName}.{_methodName}").OfType()); + IMethodSymbol methodImplementation = Assert.Single(generatedInterfaceImplementation.GetMembers($"global::{interfaceName}.{methodName}").OfType()); SyntaxNode emittedImplementationSyntax = methodImplementation.DeclaringSyntaxReferences[0].GetSyntax(); @@ -352,30 +546,18 @@ private IMethodSymbol FindFunctionPointerInvocationSignature(Compilation compila IOperation body = model.GetOperation(emittedImplementationSyntax)!; - return Assert.Single(body.Descendants().OfType()).GetFunctionPointerSignature(); + return Assert.Single(body.Descendants().OfType()); } } - private sealed class VirtualMethodIndexTargetSignatureTest : TargetSignatureTestBase + private sealed class VirtualMethodIndexImplementationLocator : IImplementationLocator { - public VirtualMethodIndexTargetSignatureTest(string interfaceName, string methodName, Action signatureValidator) - : base(interfaceName, methodName, signatureValidator) - { - } - - protected override IEnumerable GetSourceGenerators() => new[] { typeof(VtableIndexStubGenerator) }; - - protected override INamedTypeSymbol FindImplementationInterface(Compilation compilation, INamedTypeSymbol userDefinedInterface) => Assert.Single(userDefinedInterface.GetTypeMembers("Native")); + public INamedTypeSymbol FindImplementationInterface(Compilation compilation, INamedTypeSymbol userDefinedInterface) => Assert.Single(userDefinedInterface.GetTypeMembers("Native")); } - private sealed class ComInterfaceTargetSignatureTest : TargetSignatureTestBase + private sealed class ComInterfaceImplementationLocator : IImplementationLocator { - public ComInterfaceTargetSignatureTest(string interfaceName, string methodName, Action signatureValidator) : base(interfaceName, methodName, signatureValidator) - { - } - protected override IEnumerable GetSourceGenerators() => new[] { typeof(Microsoft.Interop.ComInterfaceGenerator) }; - - protected override INamedTypeSymbol FindImplementationInterface(Compilation compilation, INamedTypeSymbol userDefinedInterface) + public INamedTypeSymbol FindImplementationInterface(Compilation compilation, INamedTypeSymbol userDefinedInterface) { INamedTypeSymbol? iUnknownDerivedAttributeType = compilation.GetTypeByMetadataName("System.Runtime.InteropServices.Marshalling.IUnknownDerivedAttribute`2"); diff --git a/src/libraries/System.Runtime.InteropServices/tests/Common/Verifiers/CSharpSourceGeneratorVerifier.cs b/src/libraries/System.Runtime.InteropServices/tests/Common/Verifiers/CSharpSourceGeneratorVerifier.cs index 55b90860b4260..36d2be1c0b90f 100644 --- a/src/libraries/System.Runtime.InteropServices/tests/Common/Verifiers/CSharpSourceGeneratorVerifier.cs +++ b/src/libraries/System.Runtime.InteropServices/tests/Common/Verifiers/CSharpSourceGeneratorVerifier.cs @@ -149,7 +149,14 @@ protected override ParseOptions CreateParseOptions() protected async override Task<(Compilation compilation, ImmutableArray generatorDiagnostics)> GetProjectCompilationAsync(Project project, IVerifier verifier, CancellationToken cancellationToken) { var (compilation, diagnostics) = await base.GetProjectCompilationAsync(project, verifier, cancellationToken); - VerifyFinalCompilation(compilation); + + if (project.Name == TestState.Name) + { + // Only try to verify the final compilation for the project we're testing, not any additional projects + // in the test harness. + VerifyFinalCompilation(compilation); + } + return (compilation, diagnostics); }