Skip to content

Commit

Permalink
Reword diagnostic about which types can use [out], remove unused diag…
Browse files Browse the repository at this point in the history
…nostics (#90188)
  • Loading branch information
jtschuster authored Aug 9, 2023
1 parent a67d5f1 commit 9a5fa74
Show file tree
Hide file tree
Showing 16 changed files with 60 additions and 340 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public class Ids
public static readonly DiagnosticDescriptor ParameterTypeNotSupported =
new DiagnosticDescriptor(
Ids.TypeNotSupported,
GetResourceString(nameof(SR.TypeNotSupportedTitle)),
GetResourceString(nameof(SR.TypeNotSupportedTitleCom)),
GetResourceString(nameof(SR.TypeNotSupportedMessageParameterCom)),
Category,
DiagnosticSeverity.Error,
Expand All @@ -165,7 +165,7 @@ public class Ids
public static readonly DiagnosticDescriptor ReturnTypeNotSupported =
new DiagnosticDescriptor(
Ids.TypeNotSupported,
GetResourceString(nameof(SR.TypeNotSupportedTitle)),
GetResourceString(nameof(SR.TypeNotSupportedTitleCom)),
GetResourceString(nameof(SR.TypeNotSupportedMessageReturnCom)),
Category,
DiagnosticSeverity.Error,
Expand All @@ -176,7 +176,7 @@ public class Ids
public static readonly DiagnosticDescriptor ParameterTypeNotSupportedWithDetails =
new DiagnosticDescriptor(
Ids.TypeNotSupported,
GetResourceString(nameof(SR.TypeNotSupportedTitle)),
GetResourceString(nameof(SR.TypeNotSupportedTitleCom)),
GetResourceString(nameof(SR.TypeNotSupportedMessageParameterWithDetails)),
Category,
DiagnosticSeverity.Error,
Expand All @@ -187,7 +187,7 @@ public class Ids
public static readonly DiagnosticDescriptor ReturnTypeNotSupportedWithDetails =
new DiagnosticDescriptor(
Ids.TypeNotSupported,
GetResourceString(nameof(SR.TypeNotSupportedTitle)),
GetResourceString(nameof(SR.TypeNotSupportedTitleCom)),
GetResourceString(nameof(SR.TypeNotSupportedMessageReturnWithDetails)),
Category,
DiagnosticSeverity.Error,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@
<data name="TypeNotSupportedTitle" xml:space="preserve">
<value>Specified type is not supported by source-generated P/Invokes</value>
</data>
<data name="TypeNotSupportedTitle1" xml:space="preserve">
<data name="TypeNotSupportedTitleCom" xml:space="preserve">
<value>Specified type is not supported by source-generated COM</value>
</data>
<data name="UnnecessaryMarshallingInfoDescription" xml:space="preserve">
Expand Down Expand Up @@ -874,25 +874,13 @@
<data name="InOutAttributes" xml:space="preserve">
<value>[In] and [Out] attributes</value>
</data>
<data name="InAttributeOnlyNotSupportedOnPinnedParameters" xml:space="preserve">
<value>This parameter is marshalled by pinning and does not support the '[In]' attribute without the '[Out]' attribute.</value>
</data>
<data name="PinnedMarshallingIsInOutByDefault" xml:space="preserve">
<value>This parameter is marshalled by pinning and is '[In, Out]' by default.</value>
</data>
<data name="InRefKindIsNotSupportedOnPinnedParameters" xml:space="preserve">
<value>The 'in' keyword is not supported on parameters that are marshalled by pinning. Use 'ref' or 'out' instead.</value>
</data>
<data name="TypeDoesNotSupportByValueMarshalingAttributes" xml:space="preserve">
<value>'[In]' and '[Out]' attributes are not supported on this type.</value>
</data>
<data name="OutAttributeNotSupportedOnByValueParameters" xml:space="preserve">
<value>The `[Out]` attribute is only supported on array parameters and parameters marshalled by pinning. Consider using 'out' or 'ref' keywords to make the parameter mutable.</value>
<value>The `[Out]` attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable.</value>
</data>
<data name="ComMethodReturningIntWillBeOutParameterMessage" xml:space="preserve">
<value>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.</value>
</data>
<data name="ComMethodReturningIntWillBeOutParameterTitle" xml:space="preserve">
<value>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.</value>
</data>
</root>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -447,11 +447,6 @@
<target state="translated">Atribut „[In]“ není nezbytný, pokud není použit také atribut „[Out]“. Chování atributu „[In]“ bez atributu „[Out]“ je stejné, jako výchozí chování.</target>
<note />
</trans-unit>
<trans-unit id="InAttributeOnlyNotSupportedOnPinnedParameters">
<source>This parameter is marshalled by pinning and does not support the '[In]' attribute without the '[Out]' attribute.</source>
<target state="translated">Tento parametr je zařazován připnutím a nepodporuje atribut [In] bez atributu [Out].</target>
<note />
</trans-unit>
<trans-unit id="InOutAttributeByRefNotSupported">
<source>The '[In]' and '[Out]' attributes are unsupported on parameters passed by reference. Use the 'in', 'ref', or 'out' keywords instead.</source>
<target state="translated">Atributy „[In]“ a „[Out]“ se nepodporují u parametrů předaných odkazem. Použijte místo nich klíčová slova „in“, „ref“ nebo „out“.</target>
Expand All @@ -467,11 +462,6 @@
<target state="translated">atributy [In] a [Out]</target>
<note />
</trans-unit>
<trans-unit id="InRefKindIsNotSupportedOnPinnedParameters">
<source>The 'in' keyword is not supported on parameters that are marshalled by pinning. Use 'ref' or 'out' instead.</source>
<target state="translated">Klíčové slovo „in“ není podporováno u parametrů, které jsou zařazeny připnutím. Místo toho použijte „ref“ nebo „out“.</target>
<note />
</trans-unit>
<trans-unit id="InstanceEventDeclaredInInterfaceDescription">
<source>Events are not a concept in COM, so no interop code will be source generated for instance events on source-generated COM interfaces.</source>
<target state="translated">Události nejsou konceptem COM, takže pro události instance na rozhraních COM generovaných zdrojem nebude vygenerován žádný kód spolupráce.</target>
Expand Down Expand Up @@ -903,8 +893,8 @@
<note />
</trans-unit>
<trans-unit id="OutAttributeNotSupportedOnByValueParameters">
<source>The `[Out]` attribute is only supported on array parameters and parameters marshalled by pinning. Consider using 'out' or 'ref' keywords to make the parameter mutable.</source>
<target state="translated">Atribut [Out] je podporován pouze u parametrů pole a parametrů zařazených připnutím. Zvažte použití klíčových slov out nebo ref, aby byl parametr měnitelný.</target>
<source>The `[Out]` attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable.</source>
<target state="needs-review-translation">Atribut [Out] je podporován pouze u parametrů pole a parametrů zařazených připnutím. Zvažte použití klíčových slov out nebo ref, aby byl parametr měnitelný.</target>
<note />
</trans-unit>
<trans-unit id="OutRequiresToManagedDescription">
Expand All @@ -917,11 +907,6 @@
<target state="translated">Typ {0}určuje, že podporuje zařazování ve směru „Out“, ale neposkytuje metodu ToManaged, která vrací spravovaný typ</target>
<note />
</trans-unit>
<trans-unit id="PinnedMarshallingIsInOutByDefault">
<source>This parameter is marshalled by pinning and is '[In, Out]' by default.</source>
<target state="translated">Tento parametr se zařazuje připnutím a ve výchozím nastavení je [In, Out].</target>
<note />
</trans-unit>
<trans-unit id="RequiresAllowUnsafeBlocksDescriptionCom">
<source>'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. Project must be updated with '&lt;AllowUnsafeBlocks&gt;true&lt;/AllowUnsafeBlocks&gt;'.</source>
<target state="translated">GeneratedComInterfaceAttribute a GeneratedComClassAttribute vyžadují nebezpečný kód. Projekt se musí aktualizovat na &lt;AllowUnsafeBlocks&gt;true&lt;/AllowUnsafeBlocks&gt;.</target>
Expand Down Expand Up @@ -1162,11 +1147,6 @@
<target state="translated">„{0}“ má přístupnost „{1}“.</target>
<note />
</trans-unit>
<trans-unit id="TypeDoesNotSupportByValueMarshalingAttributes">
<source>'[In]' and '[Out]' attributes are not supported on this type.</source>
<target state="translated">Atributy [In] a [Out] nejsou u tohoto typu podporovány.</target>
<note />
</trans-unit>
<trans-unit id="TypeMustBeUnmanagedDescription">
<source>The unmanaged type for a custom marshaller must be a C# unmanaged type.</source>
<target state="translated">Nespravovaný typ vlastního zařazovacího modulu musí být nespravovaný typ jazyka C#.</target>
Expand Down Expand Up @@ -1234,9 +1214,9 @@
<target state="translated">Určený typ nepodporují zdrojem generovaná volání P/Invokes.</target>
<note />
</trans-unit>
<trans-unit id="TypeNotSupportedTitle1">
<trans-unit id="TypeNotSupportedTitleCom">
<source>Specified type is not supported by source-generated COM</source>
<target state="translated">Zadaný typ není podporován modelem COM generovaným zdrojem.</target>
<target state="new">Specified type is not supported by source-generated COM</target>
<note />
</trans-unit>
<trans-unit id="UnmanagedToManagedMissingRequiredMarshaller">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,11 +447,6 @@
<target state="translated">Das [In]-Attribut ist nur erforderlich, wenn auch das [Out]-Attribut verwendet wird. Das Verhalten des [In]-Attributs ohne das [Out]-Attribut entspricht dem Standardverhalten.</target>
<note />
</trans-unit>
<trans-unit id="InAttributeOnlyNotSupportedOnPinnedParameters">
<source>This parameter is marshalled by pinning and does not support the '[In]' attribute without the '[Out]' attribute.</source>
<target state="translated">Dieser Parameter wird durch Anheften gemarshallt und unterstützt das [In]-Attribut ohne das [Out]-Attribut nicht.</target>
<note />
</trans-unit>
<trans-unit id="InOutAttributeByRefNotSupported">
<source>The '[In]' and '[Out]' attributes are unsupported on parameters passed by reference. Use the 'in', 'ref', or 'out' keywords instead.</source>
<target state="translated">Die Attribute \"[In]\" und \"[Out]\" werden für Parameter, die als Verweis übergeben werden, nicht unterstützt. Verwenden Sie stattdessen die Schlüsselwörter \"in\", \"ref\" oder \"out\".</target>
Expand All @@ -467,11 +462,6 @@
<target state="translated">[In]- und [Out]-Attribute</target>
<note />
</trans-unit>
<trans-unit id="InRefKindIsNotSupportedOnPinnedParameters">
<source>The 'in' keyword is not supported on parameters that are marshalled by pinning. Use 'ref' or 'out' instead.</source>
<target state="translated">Das Schlüsselwort "in" wird für Parameter, die durch Anheften gemarshallt werden, nicht unterstützt. Verwenden Sie stattdessen "ref" oder "out".</target>
<note />
</trans-unit>
<trans-unit id="InstanceEventDeclaredInInterfaceDescription">
<source>Events are not a concept in COM, so no interop code will be source generated for instance events on source-generated COM interfaces.</source>
<target state="translated">Ereignisse sind kein Konzept in COM, daher wird kein Interopcode für Instanzereignisse auf von der Quelle generierten COM-Schnittstellen generiert.</target>
Expand Down Expand Up @@ -903,8 +893,8 @@
<note />
</trans-unit>
<trans-unit id="OutAttributeNotSupportedOnByValueParameters">
<source>The `[Out]` attribute is only supported on array parameters and parameters marshalled by pinning. Consider using 'out' or 'ref' keywords to make the parameter mutable.</source>
<target state="translated">Das [Out]-Attribut wird nur für Arrayparameter und Parameter unterstützt, die durch Anheften gemarshallt werden. Erwägen Sie die Verwendung der Schlüsselwörter "out" oder "ref", um den Parameter änderbar zu machen.</target>
<source>The `[Out]` attribute is only supported on array parameters. Consider using 'out' or 'ref' keywords to make the parameter mutable.</source>
<target state="needs-review-translation">Das [Out]-Attribut wird nur für Arrayparameter und Parameter unterstützt, die durch Anheften gemarshallt werden. Erwägen Sie die Verwendung der Schlüsselwörter "out" oder "ref", um den Parameter änderbar zu machen.</target>
<note />
</trans-unit>
<trans-unit id="OutRequiresToManagedDescription">
Expand All @@ -917,11 +907,6 @@
<target state="translated">Der Typ \"{0}\" gibt an, dass das Marshalling in der Out-Richtung unterstützt wird. Er stellt jedoch keine ToManaged-Methode bereit, die den verwalteten Typ zurückgibt.</target>
<note />
</trans-unit>
<trans-unit id="PinnedMarshallingIsInOutByDefault">
<source>This parameter is marshalled by pinning and is '[In, Out]' by default.</source>
<target state="translated">Dieser Parameter wird durch Anheften gemarshallt und ist standardmäßig "[In, Out]".</target>
<note />
</trans-unit>
<trans-unit id="RequiresAllowUnsafeBlocksDescriptionCom">
<source>'GeneratedComInterfaceAttribute' and 'GeneratedComClassAttribute' require unsafe code. Project must be updated with '&lt;AllowUnsafeBlocks&gt;true&lt;/AllowUnsafeBlocks&gt;'.</source>
<target state="translated">'GeneratedComInterfaceAttribute' und 'GeneratedComClassAttribute' erfordern unsicheren Code. Das Projekt muss mit '&lt;AllowUnsafeBlocks&gt;wahr&lt;/AllowUnsafeBlocks&gt;' aktualisiert werden.</target>
Expand Down Expand Up @@ -1162,11 +1147,6 @@
<target state="translated">'{0}' verfügt über Barrierefreiheit '{1}'.</target>
<note />
</trans-unit>
<trans-unit id="TypeDoesNotSupportByValueMarshalingAttributes">
<source>'[In]' and '[Out]' attributes are not supported on this type.</source>
<target state="translated">Die Attribute "[In]" und "[Out]" werden für diesen Typ nicht unterstützt.</target>
<note />
</trans-unit>
<trans-unit id="TypeMustBeUnmanagedDescription">
<source>The unmanaged type for a custom marshaller must be a C# unmanaged type.</source>
<target state="translated">Der nicht verwaltete Typ für einen benutzerdefinierten Marshaller muss ein nicht verwalteter C#-Typ sein.</target>
Expand Down Expand Up @@ -1234,9 +1214,9 @@
<target state="translated">Der angegebene Typ wird von quellgenerierten P/Invokes nicht unterstützt.</target>
<note />
</trans-unit>
<trans-unit id="TypeNotSupportedTitle1">
<trans-unit id="TypeNotSupportedTitleCom">
<source>Specified type is not supported by source-generated COM</source>
<target state="translated">Der angegebene Typ wird vom quellgenerierten COM nicht unterstützt.</target>
<target state="new">Specified type is not supported by source-generated COM</target>
<note />
</trans-unit>
<trans-unit id="UnmanagedToManagedMissingRequiredMarshaller">
Expand Down
Loading

0 comments on commit 9a5fa74

Please sign in to comment.