未验证 提交 91a119b2 编写于 作者: J Julien Couvreur 提交者: GitHub

Async-streams: allow pattern-based disposal in await using and foreach (#32731)

上级 8501a7c0
......@@ -64,6 +64,9 @@ Just like in iterator methods, there are several restrictions on where a yield s
An asynchronous `using` is lowered just like a regular `using`, except that `Dispose()` is replaced with `await DisposeAsync()`.
Note that pattern-based lookup for `DisposeAsync` binds to instance methods that can be invoked without arguments.
Extension methods do not contribute. The result of `DisposeAsync` must be awaitable.
### Detailed design for `await foreach` statement
An `await foreach` is lowered just like a regular `foreach`, except that:
......@@ -71,8 +74,9 @@ An `await foreach` is lowered just like a regular `foreach`, except that:
- `MoveNext()` is replaced with `await MoveNextAsync()`
- `Dispose()` is replaced with `await DisposeAsync()`
Note that pattern-based lookup for `GetAsyncEnumerator` and `MoveNextAsync` do not place particular requirements on those methods,
as long as they could be invoked without arguments.
Note that pattern-based lookup for `GetAsyncEnumerator`, `MoveNextAsync` and `DisposeAsync` binds to instance methods that can be invoked without arguments.
Extension methods do not contribute. The result of `MoveNextAsync` and `DisposeAsync` must be awaitable.
Disposal for `await foreach` does not include a fallback to a runtime check for an interface implementation.
Asynchronous foreach loops are disallowed on collections of type dynamic,
as there is no asynchronous equivalent of the non-generic `IEnumerable` interface.
......
......@@ -9,6 +9,8 @@ namespace Microsoft.CodeAnalysis.CSharp
/// </summary>
internal sealed class AwaitableInfo
{
public static readonly AwaitableInfo Empty = new AwaitableInfo(getAwaiterMethod: null, isCompletedProperty: null, getResultMethod: null);
public readonly MethodSymbol GetAwaiter;
public readonly PropertySymbol IsCompleted;
public readonly MethodSymbol GetResult;
......
......@@ -34,18 +34,24 @@ private BoundAwaitExpression BindAwait(BoundExpression expression, SyntaxNode no
return new BoundAwaitExpression(node, expression, info, awaitExpressionType, hasErrors);
}
internal AwaitableInfo BindAwaitInfo(BoundExpression expression, SyntaxNode node, Location location, DiagnosticBag diagnostics, ref bool hasErrors)
internal AwaitableInfo BindAwaitInfo(BoundExpression expressionOpt, SyntaxNode node, Location location, DiagnosticBag diagnostics, ref bool hasErrors)
{
MethodSymbol getAwaiter;
PropertySymbol isCompleted;
MethodSymbol getResult;
hasErrors |= ReportBadAwaitWithoutAsync(location, diagnostics);
hasErrors |= ReportBadAwaitContext(node, location, diagnostics);
hasErrors |=
ReportBadAwaitWithoutAsync(location, diagnostics) |
ReportBadAwaitContext(node, location, diagnostics) |
!GetAwaitableExpressionInfo(expression, out getAwaiter, out isCompleted, out getResult, out _, node, diagnostics);
if (expressionOpt is null)
{
return AwaitableInfo.Empty;
}
else
{
MethodSymbol getAwaiter;
PropertySymbol isCompleted;
MethodSymbol getResult;
hasErrors |= !GetAwaitableExpressionInfo(expressionOpt, out getAwaiter, out isCompleted, out getResult, out _, node, diagnostics);
return new AwaitableInfo(getAwaiter, isCompleted, getResult);
return new AwaitableInfo(getAwaiter, isCompleted, getResult);
}
}
/// <summary>
......
......@@ -677,7 +677,7 @@ internal MethodSymbol TryFindDisposePatternMethod(BoundExpression expr, SyntaxNo
{
Debug.Assert(!(expr is null));
Debug.Assert(!(expr.Type is null));
Debug.Assert(expr.Type.IsValueType && expr.Type.IsRefLikeType); // pattern dispose lookup is only valid on ref structs
Debug.Assert(expr.Type.IsRefLikeType || hasAwait); // pattern dispose lookup is only valid on ref structs or asynchronous usings
// Don't try and lookup if we're not enabled
if (MessageID.IDS_FeatureUsingDeclarations.RequiredVersion() > Compilation.LanguageVersion)
......@@ -691,8 +691,15 @@ internal MethodSymbol TryFindDisposePatternMethod(BoundExpression expr, SyntaxNo
diagnostics,
out var disposeMethod);
if ((!hasAwait && disposeMethod?.ReturnsVoid == false)
|| (hasAwait && disposeMethod?.ReturnType.TypeSymbol.IsNonGenericTaskType(Compilation) == false)
if (disposeMethod?.IsExtensionMethod == true)
{
// Extension methods should just be ignored, rather than rejected after-the-fact
// Tracked by https://github.com/dotnet/roslyn/issues/32767
// extension methods do not contribute to pattern-based disposal
disposeMethod = null;
}
else if ((!hasAwait && disposeMethod?.ReturnsVoid == false)
|| result == PatternLookupResult.NotAMethod)
{
HashSet<DiagnosticInfo> useSiteDiagnostics = null;
......
......@@ -49,7 +49,7 @@ internal bool IsAsync
MethodSymbol getEnumeratorMethod,
MethodSymbol currentPropertyGetter,
MethodSymbol moveNextMethod,
bool needsDisposeMethod,
bool needsDisposal,
AwaitableInfo disposeAwaitableInfo,
MethodSymbol disposeMethod,
Conversion collectionConversion,
......@@ -68,7 +68,7 @@ internal bool IsAsync
this.GetEnumeratorMethod = getEnumeratorMethod;
this.CurrentPropertyGetter = currentPropertyGetter;
this.MoveNextMethod = moveNextMethod;
this.NeedsDisposal = needsDisposeMethod;
this.NeedsDisposal = needsDisposal;
this.DisposeAwaitableInfo = disposeAwaitableInfo;
this.DisposeMethod = disposeMethod;
this.CollectionConversion = collectionConversion;
......
......@@ -209,7 +209,7 @@ private BoundForEachStatement BindForEachPartsWorker(DiagnosticBag diagnostics,
MethodSymbol getEnumeratorMethod = builder.GetEnumeratorMethod;
if (IsAsync)
{
BoundExpression placeholder = new BoundAwaitableValuePlaceholder(_syntax.Expression, builder.MoveNextMethod?.ReturnType.TypeSymbol ?? CreateErrorType());
var placeholder = new BoundAwaitableValuePlaceholder(_syntax.Expression, builder.MoveNextMethod?.ReturnType.TypeSymbol ?? CreateErrorType());
awaitInfo = BindAwaitInfo(placeholder, _syntax.Expression, _syntax.AwaitKeyword.GetLocation(), diagnostics, ref hasErrors);
if (!hasErrors && awaitInfo.GetResult?.ReturnType.SpecialType != SpecialType.System_Boolean)
......@@ -503,8 +503,11 @@ private BoundForEachStatement BindForEachPartsWorker(DiagnosticBag diagnostics,
private bool GetAwaitDisposeAsyncInfo(ref ForEachEnumeratorInfo.Builder builder, DiagnosticBag diagnostics)
{
BoundExpression placeholder = new BoundAwaitableValuePlaceholder(_syntax.Expression,
this.GetWellKnownType(WellKnownType.System_Threading_Tasks_ValueTask, diagnostics, this._syntax));
var awaitableType = builder.DisposeMethod is null
? this.GetWellKnownType(WellKnownType.System_Threading_Tasks_ValueTask, diagnostics, this._syntax)
: builder.DisposeMethod.ReturnType.TypeSymbol;
var placeholder = new BoundAwaitableValuePlaceholder(_syntax.Expression, awaitableType);
bool hasErrors = false;
builder.DisposeAwaitableInfo = BindAwaitInfo(placeholder, _syntax.Expression, _syntax.AwaitKeyword.GetLocation(), diagnostics, ref hasErrors);
......@@ -836,16 +839,17 @@ private void GetDisposalInfoForEnumerator(ref ForEachEnumeratorInfo.Builder buil
TypeSymbol enumeratorType = builder.GetEnumeratorMethod.ReturnType.TypeSymbol;
HashSet<DiagnosticInfo> useSiteDiagnostics = null;
if (!enumeratorType.IsSealed ||
// For async foreach, we don't do the runtime check
if ((!enumeratorType.IsSealed && !isAsync) ||
this.Conversions.ClassifyImplicitConversionFromType(enumeratorType,
isAsync ? this.Compilation.GetWellKnownType(WellKnownType.System_IAsyncDisposable) : this.Compilation.GetSpecialType(SpecialType.System_IDisposable),
ref useSiteDiagnostics).IsImplicit)
{
builder.NeedsDisposal = true;
}
else if (enumeratorType.IsRefLikeType)
else if (enumeratorType.IsRefLikeType || isAsync)
{
// if it wasn't directly convertable to IDisposable, see if it is pattern disposable
// if it wasn't directly convertable to IDisposable, see if it is pattern-disposable
// again, we throw away any binding diagnostics, and assume it's not disposable if we encounter errors
var patternDisposeDiags = new DiagnosticBag();
var receiver = new BoundDisposableValuePlaceholder(_syntax, enumeratorType);
......
......@@ -90,6 +90,7 @@ internal static BoundStatement BindUsingStatementOrDeclarationFromParts(SyntaxNo
AwaitableInfo awaitOpt = null;
TypeSymbol declarationTypeOpt = null;
MethodSymbol disposeMethodOpt = null;
TypeSymbol awaitableTypeOpt = null;
if (isExpression)
{
......@@ -117,11 +118,19 @@ internal static BoundStatement BindUsingStatementOrDeclarationFromParts(SyntaxNo
if (hasAwait)
{
TypeSymbol taskType = originalBinder.Compilation.GetWellKnownType(WellKnownType.System_Threading_Tasks_ValueTask);
hasErrors |= ReportUseSiteDiagnostics(taskType, diagnostics, awaitKeyword);
BoundAwaitableValuePlaceholder placeholderOpt;
if (awaitableTypeOpt is null)
{
placeholderOpt = null;
}
else
{
hasErrors |= ReportUseSiteDiagnostics(awaitableTypeOpt, diagnostics, awaitKeyword);
placeholderOpt = new BoundAwaitableValuePlaceholder(syntax, awaitableTypeOpt).MakeCompilerGenerated();
}
BoundExpression placeholder = new BoundAwaitableValuePlaceholder(syntax, taskType).MakeCompilerGenerated();
awaitOpt = originalBinder.BindAwaitInfo(placeholder, syntax, awaitKeyword.GetLocation(), diagnostics, ref hasErrors);
// even if we don't have a proper value to await, we'll still report bad usages of `await`
awaitOpt = originalBinder.BindAwaitInfo(placeholderOpt, syntax, awaitKeyword.GetLocation(), diagnostics, ref hasErrors);
}
// This is not awesome, but its factored.
......@@ -146,6 +155,7 @@ internal static BoundStatement BindUsingStatementOrDeclarationFromParts(SyntaxNo
hasErrors);
}
// initializes iDisposableConversion, awaitableTypeOpt and disposeMethodOpt
bool populateDisposableConversionOrDisposeMethod(bool fromExpression)
{
HashSet<DiagnosticInfo> useSiteDiagnostics = null;
......@@ -155,14 +165,18 @@ bool populateDisposableConversionOrDisposeMethod(bool fromExpression)
if (iDisposableConversion.IsImplicit)
{
if (hasAwait)
{
awaitableTypeOpt = originalBinder.Compilation.GetWellKnownType(WellKnownType.System_Threading_Tasks_ValueTask);
}
return true;
}
TypeSymbol type = fromExpression ? expressionOpt.Type : declarationTypeOpt;
// If this is a ref struct, try binding via pattern.
// If this is a ref struct, or we're in a valid asynchronous using, try binding via pattern.
// We won't need to try and bind a second time if it fails, as async dispose can't be pattern based (ref structs are not allowed in async methods)
if (!(type is null) && type.IsValueType && type.IsRefLikeType)
if (!(type is null) && (type.IsRefLikeType || hasAwait))
{
BoundExpression receiver = fromExpression
? expressionOpt
......@@ -171,6 +185,10 @@ bool populateDisposableConversionOrDisposeMethod(bool fromExpression)
disposeMethodOpt = originalBinder.TryFindDisposePatternMethod(receiver, syntax, hasAwait, diagnostics);
if (!(disposeMethodOpt is null))
{
if (hasAwait)
{
awaitableTypeOpt = disposeMethodOpt.ReturnType.TypeSymbol;
}
return true;
}
}
......
......@@ -7234,7 +7234,7 @@ internal class CSharpResources {
}
/// <summary>
/// Looks up a localized string similar to &apos;{0}&apos;: type used in an async using statement must be implicitly convertible to &apos;System.IAsyncDisposable&apos;.
/// Looks up a localized string similar to &apos;{0}&apos;: type used in an async using statement must be implicitly convertible to &apos;System.IAsyncDisposable&apos; or implement a suitable &apos;DisposeAsync&apos; method..
/// </summary>
internal static string ERR_NoConvToIAsyncDisp {
get {
......@@ -7243,7 +7243,7 @@ internal class CSharpResources {
}
/// <summary>
/// Looks up a localized string similar to &apos;{0}&apos;: type used in an async using statement must be implicitly convertible to &apos;System.IAsyncDisposable&apos;. Did you mean &apos;using&apos; rather than &apos;await using&apos;?.
/// Looks up a localized string similar to &apos;{0}&apos;: type used in an async using statement must be implicitly convertible to &apos;System.IAsyncDisposable&apos; or implement a suitable &apos;DisposeAsync&apos; method. Did you mean &apos;using&apos; rather than &apos;await using&apos;?.
/// </summary>
internal static string ERR_NoConvToIAsyncDispWrongAsync {
get {
......@@ -7252,7 +7252,7 @@ internal class CSharpResources {
}
/// <summary>
/// Looks up a localized string similar to &apos;{0}&apos;: type used in a using statement must be implicitly convertible to &apos;System.IDisposable&apos;..
/// Looks up a localized string similar to &apos;{0}&apos;: type used in a using statement must be implicitly convertible to &apos;System.IDisposable&apos; or implement a suitable &apos;Dispose&apos; method..
/// </summary>
internal static string ERR_NoConvToIDisp {
get {
......@@ -7261,7 +7261,7 @@ internal class CSharpResources {
}
/// <summary>
/// Looks up a localized string similar to &apos;{0}&apos;: type used in a using statement must be implicitly convertible to &apos;System.IDisposable&apos;. Did you mean &apos;await using&apos; rather than &apos;using&apos;?.
/// Looks up a localized string similar to &apos;{0}&apos;: type used in a using statement must be implicitly convertible to &apos;System.IDisposable&apos; or implement a suitable &apos;Dispose&apos; method. Did you mean &apos;await using&apos; rather than &apos;using&apos;?.
/// </summary>
internal static string ERR_NoConvToIDispWrongAsync {
get {
......
......@@ -2981,16 +2981,16 @@ A catch() block after a catch (System.Exception e) block can catch non-CLS excep
<value>Anonymous methods, lambda expressions, and query expressions inside structs cannot access instance members of 'this'. Consider copying 'this' to a local variable outside the anonymous method, lambda expression or query expression and using the local instead.</value>
</data>
<data name="ERR_NoConvToIDisp" xml:space="preserve">
<value>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'.</value>
<value>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.</value>
</data>
<data name="ERR_NoConvToIDispWrongAsync" xml:space="preserve">
<value>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'. Did you mean 'await using' rather than 'using'?</value>
<value>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method. Did you mean 'await using' rather than 'using'?</value>
</data>
<data name="ERR_NoConvToIAsyncDisp" xml:space="preserve">
<value>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'</value>
<value>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</value>
</data>
<data name="ERR_NoConvToIAsyncDispWrongAsync" xml:space="preserve">
<value>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'. Did you mean 'using' rather than 'await using'?</value>
<value>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</value>
</data>
<data name="ERR_BadParamRef" xml:space="preserve">
<value>Parameter {0} must be declared with the '{1}' keyword</value>
......
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics;
using Microsoft.CodeAnalysis.CSharp.Symbols;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.PooledObjects;
namespace Microsoft.CodeAnalysis.CSharp
{
......@@ -182,11 +180,10 @@ private BoundStatement RewriteEnumeratorForEachStatement(BoundForEachStatement n
hasErrors: false);
BoundStatement result;
MethodSymbol disposeMethod = enumeratorInfo.DisposeMethod;
if (enumeratorInfo.NeedsDisposal && (!(disposeMethod is null) || TryGetDisposeMethod(forEachSyntax, enumeratorInfo, out disposeMethod)))
if (enumeratorInfo.NeedsDisposal)
{
BoundStatement tryFinally = WrapWithTryFinallyDispose(forEachSyntax, enumeratorInfo, enumeratorType, boundEnumeratorVar, whileLoop, disposeMethod);
BoundStatement tryFinally = WrapWithTryFinallyDispose(forEachSyntax, enumeratorInfo, enumeratorType, boundEnumeratorVar, whileLoop);
// E e = ((C)(x)).GetEnumerator();
// try {
......@@ -225,9 +222,33 @@ private bool TryGetDisposeMethod(CommonForEachStatementSyntax forEachSyntax, For
return Binder.TryGetSpecialTypeMember(_compilation, SpecialMember.System_IDisposable__Dispose, forEachSyntax, _diagnostics, out disposeMethod);
}
/// <summary>
/// There are three possible cases where we need disposal:
/// - pattern-based disposal (we have a Dispose/DisposeAsync method)
/// - interface-based disposal (the enumerator type converts to IDisposable/IAsyncDisposable)
/// - we need to do a runtime check for IDisposable
/// </summary>
private BoundStatement WrapWithTryFinallyDispose(CommonForEachStatementSyntax forEachSyntax, ForEachEnumeratorInfo enumeratorInfo,
TypeSymbol enumeratorType, BoundLocal boundEnumeratorVar, BoundStatement rewrittenBody, MethodSymbol disposeMethod)
TypeSymbol enumeratorType, BoundLocal boundEnumeratorVar, BoundStatement rewrittenBody)
{
Debug.Assert(enumeratorInfo.NeedsDisposal);
NamedTypeSymbol idisposableTypeSymbol = null;
bool isImplicit = false;
MethodSymbol disposeMethod = enumeratorInfo.DisposeMethod; // pattern-based
if (disposeMethod is null)
{
TryGetDisposeMethod(forEachSyntax, enumeratorInfo, out disposeMethod); // interface-based
idisposableTypeSymbol = disposeMethod.ContainingType;
var conversions = new TypeConversions(_factory.CurrentFunction.ContainingAssembly.CorLibrary);
HashSet<DiagnosticInfo> useSiteDiagnostics = null;
isImplicit = conversions.ClassifyImplicitConversionFromType(enumeratorType, idisposableTypeSymbol, ref useSiteDiagnostics).IsImplicit;
_diagnostics.Add(forEachSyntax, useSiteDiagnostics);
}
Binder.ReportDiagnosticsIfObsolete(_diagnostics, disposeMethod, forEachSyntax,
hasBaseReceiver: false,
containingMember: _factory.CurrentFunction,
......@@ -235,26 +256,15 @@ private bool TryGetDisposeMethod(CommonForEachStatementSyntax forEachSyntax, For
location: enumeratorInfo.Location);
BoundBlock finallyBlockOpt;
var idisposableTypeSymbol = disposeMethod.ContainingType;
var conversions = new TypeConversions(_factory.CurrentFunction.ContainingAssembly.CorLibrary);
var disposeAwaitableInfoOpt = enumeratorInfo.DisposeAwaitableInfo;
HashSet<DiagnosticInfo> useSiteDiagnostics = null;
var isImplicit = conversions.ClassifyImplicitConversionFromType(enumeratorType, idisposableTypeSymbol, ref useSiteDiagnostics).IsImplicit;
_diagnostics.Add(forEachSyntax, useSiteDiagnostics);
var isExtension = disposeMethod?.IsExtensionMethod == true;
if (isImplicit || isExtension)
if (isImplicit || !(enumeratorInfo.DisposeMethod is null))
{
Debug.Assert(enumeratorInfo.NeedsDisposal);
Conversion receiverConversion = enumeratorType.IsStructType() ?
Conversion.Boxing :
Conversion.ImplicitReference;
BoundExpression receiver = isExtension || idisposableTypeSymbol.IsRefLikeType ?
boundEnumeratorVar :
ConvertReceiverForInvocation(forEachSyntax, boundEnumeratorVar, disposeMethod, receiverConversion, idisposableTypeSymbol);
BoundExpression receiver = enumeratorInfo.DisposeMethod is null ?
ConvertReceiverForInvocation(forEachSyntax, boundEnumeratorVar, disposeMethod, receiverConversion, idisposableTypeSymbol) :
boundEnumeratorVar;
// ((IDisposable)e).Dispose() or e.Dispose() or await ((IAsyncDisposable)e).DisposeAsync() or await e.DisposeAsync()
BoundExpression disposeCall = MakeCallWithNoExplicitArgument(
......@@ -263,6 +273,7 @@ private bool TryGetDisposeMethod(CommonForEachStatementSyntax forEachSyntax, For
disposeMethod);
BoundStatement disposeCallStatement;
var disposeAwaitableInfoOpt = enumeratorInfo.DisposeAwaitableInfo;
if (disposeAwaitableInfoOpt != null)
{
// await /* disposeCall */
......@@ -316,7 +327,10 @@ private bool TryGetDisposeMethod(CommonForEachStatementSyntax forEachSyntax, For
}
else
{
// If we couldn't find either pattern-based or interface-based disposal, and the enumerator type isn't sealed,
// and the loop isn't async, then we include a runtime check.
Debug.Assert(!enumeratorType.IsSealed);
Debug.Assert(!enumeratorInfo.IsAsync);
// IDisposable d
LocalSymbol disposableVar = _factory.SynthesizedLocal(idisposableTypeSymbol);
......@@ -338,19 +352,9 @@ private bool TryGetDisposeMethod(CommonForEachStatementSyntax forEachSyntax, For
// IDisposable d = e as IDisposable;
BoundStatement disposableVarDecl = MakeLocalDeclaration(forEachSyntax, disposableVar, disposableVarInitValue);
// d.Dispose() or async variant
// d.Dispose()
BoundExpression disposeCall = BoundCall.Synthesized(syntax: forEachSyntax, receiverOpt: boundDisposableVar, method: disposeMethod);
BoundStatement disposeCallStatement;
if (disposeAwaitableInfoOpt != null)
{
// await d.DisposeAsync()
disposeCallStatement = WrapWithAwait(forEachSyntax, disposeCall, disposeAwaitableInfoOpt);
_sawAwaitInExceptionHandler = true;
}
else
{
disposeCallStatement = new BoundExpressionStatement(forEachSyntax, expression: disposeCall);
}
BoundStatement disposeCallStatement = new BoundExpressionStatement(forEachSyntax, expression: disposeCall);
// if (d != null) d.Dispose();
BoundStatement ifStmt = RewriteIfStatement(
......
......@@ -193,13 +193,13 @@
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDispWrongAsync">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'. Did you mean 'using' rather than 'await using'?</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'. Did you mean 'using' rather than 'await using'?</target>
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDispWrongAsync">
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'. Did you mean 'await using' rather than 'using'?</source>
<target state="new">'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'. Did you mean 'await using' rather than 'using'?</target>
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method. Did you mean 'await using' rather than 'using'?</source>
<target state="new">'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method. Did you mean 'await using' rather than 'using'?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NullableDirectiveQualifierExpected">
......@@ -2564,12 +2564,12 @@
</trans-unit>
<trans-unit id="WRN_PatternBadSignature">
<source>'{0}' does not implement the '{1}' pattern. '{2}' has the wrong signature.</source>
<target state="translated">'{0} neimplementuje vzorek {1}. {2} nemá správný podpis.</target>
<target state="needs-review-translation">'{0} neimplementuje vzorek {1}. {2} nemá správný podpis.</target>
<note />
</trans-unit>
<trans-unit id="WRN_PatternBadSignature_Title">
<source>Type does not implement the collection pattern; member has the wrong signature</source>
<target state="translated">Typ neimplementuje vzorek kolekce. Člen nemá správný podpis.</target>
<target state="needs-review-translation">Typ neimplementuje vzorek kolekce. Člen nemá správný podpis.</target>
<note />
</trans-unit>
<trans-unit id="ERR_FriendRefNotEqualToThis">
......@@ -5571,7 +5571,7 @@ Blok catch() po bloku catch (System.Exception e) může zachytit výjimky, kter
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDisp">
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'.</source>
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.</source>
<target state="needs-review-translation">'{0}: Typ použitý v příkazu using musí být implicitně převeditelný na System.IDisposable.</target>
<note />
</trans-unit>
......@@ -9457,8 +9457,8 @@ Pokud chcete odstranit toto varování, můžete místo toho použít /reference
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDisp">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'</target>
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetAsyncEnumerator">
......
......@@ -193,13 +193,13 @@
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDispWrongAsync">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'. Did you mean 'using' rather than 'await using'?</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'. Did you mean 'using' rather than 'await using'?</target>
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDispWrongAsync">
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'. Did you mean 'await using' rather than 'using'?</source>
<target state="new">'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'. Did you mean 'await using' rather than 'using'?</target>
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method. Did you mean 'await using' rather than 'using'?</source>
<target state="new">'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method. Did you mean 'await using' rather than 'using'?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NullableDirectiveQualifierExpected">
......@@ -2564,12 +2564,12 @@
</trans-unit>
<trans-unit id="WRN_PatternBadSignature">
<source>'{0}' does not implement the '{1}' pattern. '{2}' has the wrong signature.</source>
<target state="translated">'"{0}" implementiert das Muster "{1}" nicht. "{2}" weist die falsche Signatur auf.</target>
<target state="needs-review-translation">'"{0}" implementiert das Muster "{1}" nicht. "{2}" weist die falsche Signatur auf.</target>
<note />
</trans-unit>
<trans-unit id="WRN_PatternBadSignature_Title">
<source>Type does not implement the collection pattern; member has the wrong signature</source>
<target state="translated">Der Typ implementiert nicht das Sammlungsmuster. Das Element weist die falsche Signatur auf.</target>
<target state="needs-review-translation">Der Typ implementiert nicht das Sammlungsmuster. Das Element weist die falsche Signatur auf.</target>
<note />
</trans-unit>
<trans-unit id="ERR_FriendRefNotEqualToThis">
......@@ -5571,7 +5571,7 @@ Ein catch()-Block nach einem catch (System.Exception e)-Block kann nicht-CLS-Aus
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDisp">
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'.</source>
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.</source>
<target state="needs-review-translation">'"{0}": Der in einer using-Anweisung verwendete Typ muss implizit in System.IDisposable konvertiert werden können.</target>
<note />
</trans-unit>
......@@ -9470,8 +9470,8 @@ Um die Warnung zu beheben, können Sie stattdessen /reference verwenden (Einbett
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDisp">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'</target>
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetAsyncEnumerator">
......
......@@ -193,13 +193,13 @@
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDispWrongAsync">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'. Did you mean 'using' rather than 'await using'?</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'. Did you mean 'using' rather than 'await using'?</target>
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDispWrongAsync">
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'. Did you mean 'await using' rather than 'using'?</source>
<target state="new">'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'. Did you mean 'await using' rather than 'using'?</target>
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method. Did you mean 'await using' rather than 'using'?</source>
<target state="new">'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method. Did you mean 'await using' rather than 'using'?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NullableDirectiveQualifierExpected">
......@@ -2564,12 +2564,12 @@
</trans-unit>
<trans-unit id="WRN_PatternBadSignature">
<source>'{0}' does not implement the '{1}' pattern. '{2}' has the wrong signature.</source>
<target state="translated">'{0}' no implementa el patrón '{1}'. '{2}' tiene una firma incorrecta.</target>
<target state="needs-review-translation">'{0}' no implementa el patrón '{1}'. '{2}' tiene una firma incorrecta.</target>
<note />
</trans-unit>
<trans-unit id="WRN_PatternBadSignature_Title">
<source>Type does not implement the collection pattern; member has the wrong signature</source>
<target state="translated">El tipo no implementa la trama de colección. El miembro tiene la firma incorrecta</target>
<target state="needs-review-translation">El tipo no implementa la trama de colección. El miembro tiene la firma incorrecta</target>
<note />
</trans-unit>
<trans-unit id="ERR_FriendRefNotEqualToThis">
......@@ -5571,7 +5571,7 @@ Un bloque catch() después de un bloque catch (System.Exception e) puede abarcar
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDisp">
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'.</source>
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.</source>
<target state="needs-review-translation">'{0}': el tipo usado en una instrucción using debe poder convertirse implícitamente en 'System.IDisposable'</target>
<note />
</trans-unit>
......@@ -9444,8 +9444,8 @@ Para eliminar la advertencia puede usar /reference (establezca la propiedad Embe
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDisp">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'</target>
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetAsyncEnumerator">
......
......@@ -193,13 +193,13 @@
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDispWrongAsync">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'. Did you mean 'using' rather than 'await using'?</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'. Did you mean 'using' rather than 'await using'?</target>
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDispWrongAsync">
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'. Did you mean 'await using' rather than 'using'?</source>
<target state="new">'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'. Did you mean 'await using' rather than 'using'?</target>
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method. Did you mean 'await using' rather than 'using'?</source>
<target state="new">'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method. Did you mean 'await using' rather than 'using'?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NullableDirectiveQualifierExpected">
......@@ -2564,12 +2564,12 @@
</trans-unit>
<trans-unit id="WRN_PatternBadSignature">
<source>'{0}' does not implement the '{1}' pattern. '{2}' has the wrong signature.</source>
<target state="translated">'{0}' n'implémente pas le modèle '{1}'. '{2}' a une signature erronée.</target>
<target state="needs-review-translation">'{0}' n'implémente pas le modèle '{1}'. '{2}' a une signature erronée.</target>
<note />
</trans-unit>
<trans-unit id="WRN_PatternBadSignature_Title">
<source>Type does not implement the collection pattern; member has the wrong signature</source>
<target state="translated">Un type n'implémente pas le modèle de la collection ; un membre n'a pas la bonne signature</target>
<target state="needs-review-translation">Un type n'implémente pas le modèle de la collection ; un membre n'a pas la bonne signature</target>
<note />
</trans-unit>
<trans-unit id="ERR_FriendRefNotEqualToThis">
......@@ -5571,7 +5571,7 @@ Un bloc catch() après un bloc catch (System.Exception e) peut intercepter des e
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDisp">
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'.</source>
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.</source>
<target state="needs-review-translation">'{0}' : le type utilisé dans une instruction using doit être implicitement convertible en 'System.IDisposable'</target>
<note />
</trans-unit>
......@@ -9445,8 +9445,8 @@ Pour supprimer l'avertissement, vous pouvez utiliser la commande /reference (dé
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDisp">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'</target>
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetAsyncEnumerator">
......
......@@ -193,13 +193,13 @@
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDispWrongAsync">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'. Did you mean 'using' rather than 'await using'?</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'. Did you mean 'using' rather than 'await using'?</target>
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDispWrongAsync">
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'. Did you mean 'await using' rather than 'using'?</source>
<target state="new">'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'. Did you mean 'await using' rather than 'using'?</target>
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method. Did you mean 'await using' rather than 'using'?</source>
<target state="new">'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method. Did you mean 'await using' rather than 'using'?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NullableDirectiveQualifierExpected">
......@@ -2564,12 +2564,12 @@
</trans-unit>
<trans-unit id="WRN_PatternBadSignature">
<source>'{0}' does not implement the '{1}' pattern. '{2}' has the wrong signature.</source>
<target state="translated">'{0}' non implementa il modello '{1}'. La firma di '{2}' è errata.</target>
<target state="needs-review-translation">'{0}' non implementa il modello '{1}'. La firma di '{2}' è errata.</target>
<note />
</trans-unit>
<trans-unit id="WRN_PatternBadSignature_Title">
<source>Type does not implement the collection pattern; member has the wrong signature</source>
<target state="translated">Il tipo non implementa il modello di raccolta. La firma del membro è errata</target>
<target state="needs-review-translation">Il tipo non implementa il modello di raccolta. La firma del membro è errata</target>
<note />
</trans-unit>
<trans-unit id="ERR_FriendRefNotEqualToThis">
......@@ -5571,7 +5571,7 @@ Un blocco catch() dopo un blocco catch (System.Exception e) è in grado di rilev
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDisp">
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'.</source>
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.</source>
<target state="needs-review-translation">'{0}': il tipo usato in un'istruzione using deve essere convertibile in modo implicito in 'System.IDisposable'</target>
<note />
</trans-unit>
......@@ -9446,8 +9446,8 @@ Per rimuovere l'avviso, è invece possibile usare /reference (impostare la propr
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDisp">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'</target>
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetAsyncEnumerator">
......
......@@ -193,13 +193,13 @@
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDispWrongAsync">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'. Did you mean 'using' rather than 'await using'?</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'. Did you mean 'using' rather than 'await using'?</target>
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDispWrongAsync">
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'. Did you mean 'await using' rather than 'using'?</source>
<target state="new">'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'. Did you mean 'await using' rather than 'using'?</target>
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method. Did you mean 'await using' rather than 'using'?</source>
<target state="new">'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method. Did you mean 'await using' rather than 'using'?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NullableDirectiveQualifierExpected">
......@@ -2564,12 +2564,12 @@
</trans-unit>
<trans-unit id="WRN_PatternBadSignature">
<source>'{0}' does not implement the '{1}' pattern. '{2}' has the wrong signature.</source>
<target state="translated">'{0}' は、パターン '{1}' を実装しません。'{2}' には正しくないシグネチャが含まれます。</target>
<target state="needs-review-translation">'{0}' は、パターン '{1}' を実装しません。'{2}' には正しくないシグネチャが含まれます。</target>
<note />
</trans-unit>
<trans-unit id="WRN_PatternBadSignature_Title">
<source>Type does not implement the collection pattern; member has the wrong signature</source>
<target state="translated">型は、コレクション パターンを実装しません。メンバーには正しくないシグネチャが含まれます</target>
<target state="needs-review-translation">型は、コレクション パターンを実装しません。メンバーには正しくないシグネチャが含まれます</target>
<note />
</trans-unit>
<trans-unit id="ERR_FriendRefNotEqualToThis">
......@@ -5571,7 +5571,7 @@ AssemblyInfo.cs ファイルで RuntimeCompatibilityAttribute が false に設
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDisp">
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'.</source>
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.</source>
<target state="needs-review-translation">'{0}': using ステートメントで使用される型は、暗黙的に 'System.IDisposable' への変換が可能でなければなりません。</target>
<note />
</trans-unit>
......@@ -9470,8 +9470,8 @@ To remove the warning, you can use /reference instead (set the Embed Interop Typ
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDisp">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'</target>
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetAsyncEnumerator">
......
......@@ -193,13 +193,13 @@
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDispWrongAsync">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'. Did you mean 'using' rather than 'await using'?</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'. Did you mean 'using' rather than 'await using'?</target>
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDispWrongAsync">
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'. Did you mean 'await using' rather than 'using'?</source>
<target state="new">'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'. Did you mean 'await using' rather than 'using'?</target>
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method. Did you mean 'await using' rather than 'using'?</source>
<target state="new">'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method. Did you mean 'await using' rather than 'using'?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NullableDirectiveQualifierExpected">
......@@ -2564,12 +2564,12 @@
</trans-unit>
<trans-unit id="WRN_PatternBadSignature">
<source>'{0}' does not implement the '{1}' pattern. '{2}' has the wrong signature.</source>
<target state="translated">'{0}'이(가) '{1}' 패턴을 구현하지 않습니다. '{2}'에 잘못된 시그니처가 있습니다.</target>
<target state="needs-review-translation">'{0}'이(가) '{1}' 패턴을 구현하지 않습니다. '{2}'에 잘못된 시그니처가 있습니다.</target>
<note />
</trans-unit>
<trans-unit id="WRN_PatternBadSignature_Title">
<source>Type does not implement the collection pattern; member has the wrong signature</source>
<target state="translated">형식은 컬렉션 패턴을 구현하지 않습니다. 멤버의 서명이 잘못되었습니다.</target>
<target state="needs-review-translation">형식은 컬렉션 패턴을 구현하지 않습니다. 멤버의 서명이 잘못되었습니다.</target>
<note />
</trans-unit>
<trans-unit id="ERR_FriendRefNotEqualToThis">
......@@ -5571,7 +5571,7 @@ catch (System.Exception e) 블록 뒤의 catch() 블록은 RuntimeCompatibilityA
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDisp">
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'.</source>
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.</source>
<target state="needs-review-translation">'{0}': using 문에 사용된 형식은 암시적으로 'System.IDisposable'로 변환할 수 있어야 합니다.</target>
<note />
</trans-unit>
......@@ -9470,8 +9470,8 @@ To remove the warning, you can use /reference instead (set the Embed Interop Typ
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDisp">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'</target>
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetAsyncEnumerator">
......
......@@ -193,13 +193,13 @@
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDispWrongAsync">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'. Did you mean 'using' rather than 'await using'?</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'. Did you mean 'using' rather than 'await using'?</target>
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDispWrongAsync">
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'. Did you mean 'await using' rather than 'using'?</source>
<target state="new">'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'. Did you mean 'await using' rather than 'using'?</target>
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method. Did you mean 'await using' rather than 'using'?</source>
<target state="new">'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method. Did you mean 'await using' rather than 'using'?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NullableDirectiveQualifierExpected">
......@@ -2564,12 +2564,12 @@
</trans-unit>
<trans-unit id="WRN_PatternBadSignature">
<source>'{0}' does not implement the '{1}' pattern. '{2}' has the wrong signature.</source>
<target state="translated">'Element „{0}” nie implementuje wzorca „{1}”. Element „{2}” ma nieprawidłową sygnaturę.</target>
<target state="needs-review-translation">'Element „{0}” nie implementuje wzorca „{1}”. Element „{2}” ma nieprawidłową sygnaturę.</target>
<note />
</trans-unit>
<trans-unit id="WRN_PatternBadSignature_Title">
<source>Type does not implement the collection pattern; member has the wrong signature</source>
<target state="translated">Typ nie zawiera implementacji wzorca kolekcji; składowa ma niewłaściwą sygnaturę</target>
<target state="needs-review-translation">Typ nie zawiera implementacji wzorca kolekcji; składowa ma niewłaściwą sygnaturę</target>
<note />
</trans-unit>
<trans-unit id="ERR_FriendRefNotEqualToThis">
......@@ -5571,7 +5571,7 @@ Blok catch() po bloku catch (System.Exception e) może przechwytywać wyjątki n
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDisp">
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'.</source>
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.</source>
<target state="needs-review-translation">'„{0}”: musi istnieć możliwość niejawnego przekonwertowania typu użytego w instrukcji using na interfejs „System.IDisposable”</target>
<note />
</trans-unit>
......@@ -9449,8 +9449,8 @@ Aby usunąć ostrzeżenie, możesz zamiast tego użyć opcji /reference (ustaw w
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDisp">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'</target>
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetAsyncEnumerator">
......
......@@ -193,13 +193,13 @@
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDispWrongAsync">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'. Did you mean 'using' rather than 'await using'?</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'. Did you mean 'using' rather than 'await using'?</target>
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDispWrongAsync">
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'. Did you mean 'await using' rather than 'using'?</source>
<target state="new">'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'. Did you mean 'await using' rather than 'using'?</target>
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method. Did you mean 'await using' rather than 'using'?</source>
<target state="new">'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method. Did you mean 'await using' rather than 'using'?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NullableDirectiveQualifierExpected">
......@@ -2564,12 +2564,12 @@
</trans-unit>
<trans-unit id="WRN_PatternBadSignature">
<source>'{0}' does not implement the '{1}' pattern. '{2}' has the wrong signature.</source>
<target state="translated">'"{0}" não implementa o padrão "{1}". "{2}" tem a assinatura errada.</target>
<target state="needs-review-translation">'"{0}" não implementa o padrão "{1}". "{2}" tem a assinatura errada.</target>
<note />
</trans-unit>
<trans-unit id="WRN_PatternBadSignature_Title">
<source>Type does not implement the collection pattern; member has the wrong signature</source>
<target state="translated">O tipo não implementa o padrão de coleção; o membro possui a assinatura incorreta</target>
<target state="needs-review-translation">O tipo não implementa o padrão de coleção; o membro possui a assinatura incorreta</target>
<note />
</trans-unit>
<trans-unit id="ERR_FriendRefNotEqualToThis">
......@@ -5571,7 +5571,7 @@ Um bloco catch() depois de um bloco catch (System.Exception e) poderá capturar
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDisp">
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'.</source>
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.</source>
<target state="needs-review-translation">'"{0}": tipo usado em uma instrução using deve ser implicitamente conversível para "System. IDisposable"</target>
<note />
</trans-unit>
......@@ -9450,8 +9450,8 @@ Para incorporar informações de tipo de interoperabilidade para os dois assembl
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDisp">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'</target>
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetAsyncEnumerator">
......
......@@ -193,13 +193,13 @@
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDispWrongAsync">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'. Did you mean 'using' rather than 'await using'?</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'. Did you mean 'using' rather than 'await using'?</target>
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDispWrongAsync">
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'. Did you mean 'await using' rather than 'using'?</source>
<target state="new">'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'. Did you mean 'await using' rather than 'using'?</target>
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method. Did you mean 'await using' rather than 'using'?</source>
<target state="new">'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method. Did you mean 'await using' rather than 'using'?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NullableDirectiveQualifierExpected">
......@@ -2564,12 +2564,12 @@
</trans-unit>
<trans-unit id="WRN_PatternBadSignature">
<source>'{0}' does not implement the '{1}' pattern. '{2}' has the wrong signature.</source>
<target state="translated">'"{0}" не реализует шаблон "{1}". "{2}" имеет неправильную сигнатуру.</target>
<target state="needs-review-translation">'"{0}" не реализует шаблон "{1}". "{2}" имеет неправильную сигнатуру.</target>
<note />
</trans-unit>
<trans-unit id="WRN_PatternBadSignature_Title">
<source>Type does not implement the collection pattern; member has the wrong signature</source>
<target state="translated">Тип не реализует шаблон коллекции: член содержит неправильную подпись</target>
<target state="needs-review-translation">Тип не реализует шаблон коллекции: член содержит неправильную подпись</target>
<note />
</trans-unit>
<trans-unit id="ERR_FriendRefNotEqualToThis">
......@@ -5571,7 +5571,7 @@ A catch() block after a catch (System.Exception e) block can catch non-CLS excep
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDisp">
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'.</source>
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.</source>
<target state="needs-review-translation">'{0}": тип, использованный в операторе using, должен иметь неявное преобразование в System.IDisposable.</target>
<note />
</trans-unit>
......@@ -9452,8 +9452,8 @@ To remove the warning, you can use /reference instead (set the Embed Interop Typ
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDisp">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'</target>
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetAsyncEnumerator">
......
......@@ -193,13 +193,13 @@
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDispWrongAsync">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'. Did you mean 'using' rather than 'await using'?</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'. Did you mean 'using' rather than 'await using'?</target>
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDispWrongAsync">
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'. Did you mean 'await using' rather than 'using'?</source>
<target state="new">'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'. Did you mean 'await using' rather than 'using'?</target>
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method. Did you mean 'await using' rather than 'using'?</source>
<target state="new">'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method. Did you mean 'await using' rather than 'using'?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NullableDirectiveQualifierExpected">
......@@ -2564,12 +2564,12 @@
</trans-unit>
<trans-unit id="WRN_PatternBadSignature">
<source>'{0}' does not implement the '{1}' pattern. '{2}' has the wrong signature.</source>
<target state="translated">'{0}', '{1}' kalıbını uygulamaz. '{2}' yanlış imzaya sahip.</target>
<target state="needs-review-translation">'{0}', '{1}' kalıbını uygulamaz. '{2}' yanlış imzaya sahip.</target>
<note />
</trans-unit>
<trans-unit id="WRN_PatternBadSignature_Title">
<source>Type does not implement the collection pattern; member has the wrong signature</source>
<target state="translated">Tür koleksiyon desenini uygulamaz; üye yanlış imzaya sahip</target>
<target state="needs-review-translation">Tür koleksiyon desenini uygulamaz; üye yanlış imzaya sahip</target>
<note />
</trans-unit>
<trans-unit id="ERR_FriendRefNotEqualToThis">
......@@ -5571,7 +5571,7 @@ RuntimeCompatibilityAttribute AssemblyInfo.cs dosyasında false olarak ayarlanm
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDisp">
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'.</source>
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.</source>
<target state="needs-review-translation">'{0}': bir using deyiminde kullanılan tür açıkça 'System.IDisposable' öğesine dönüştürülebilir olmalıdır</target>
<note />
</trans-unit>
......@@ -9458,8 +9458,8 @@ Uyarıyı kaldırmak için, /reference kullanabilirsiniz (Birlikte Çalışma T
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDisp">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'</target>
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetAsyncEnumerator">
......
......@@ -193,13 +193,13 @@
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDispWrongAsync">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'. Did you mean 'using' rather than 'await using'?</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'. Did you mean 'using' rather than 'await using'?</target>
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDispWrongAsync">
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'. Did you mean 'await using' rather than 'using'?</source>
<target state="new">'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'. Did you mean 'await using' rather than 'using'?</target>
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method. Did you mean 'await using' rather than 'using'?</source>
<target state="new">'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method. Did you mean 'await using' rather than 'using'?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NullableDirectiveQualifierExpected">
......@@ -2564,12 +2564,12 @@
</trans-unit>
<trans-unit id="WRN_PatternBadSignature">
<source>'{0}' does not implement the '{1}' pattern. '{2}' has the wrong signature.</source>
<target state="translated">'“{0}”不实现“{1}”模式。“{2}”有错误的签名。</target>
<target state="needs-review-translation">'“{0}”不实现“{1}”模式。“{2}”有错误的签名。</target>
<note />
</trans-unit>
<trans-unit id="WRN_PatternBadSignature_Title">
<source>Type does not implement the collection pattern; member has the wrong signature</source>
<target state="translated">类型不实现集合模式;成员有错误的签名</target>
<target state="needs-review-translation">类型不实现集合模式;成员有错误的签名</target>
<note />
</trans-unit>
<trans-unit id="ERR_FriendRefNotEqualToThis">
......@@ -5571,7 +5571,7 @@ A catch() block after a catch (System.Exception e) block can catch non-CLS excep
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDisp">
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'.</source>
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.</source>
<target state="needs-review-translation">'“{0}”: using 语句中使用的类型必须可隐式转换为“System.IDisposable”</target>
<note />
</trans-unit>
......@@ -9470,8 +9470,8 @@ To remove the warning, you can use /reference instead (set the Embed Interop Typ
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDisp">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'</target>
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetAsyncEnumerator">
......
......@@ -193,13 +193,13 @@
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDispWrongAsync">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'. Did you mean 'using' rather than 'await using'?</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'. Did you mean 'using' rather than 'await using'?</target>
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method. Did you mean 'using' rather than 'await using'?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDispWrongAsync">
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'. Did you mean 'await using' rather than 'using'?</source>
<target state="new">'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'. Did you mean 'await using' rather than 'using'?</target>
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method. Did you mean 'await using' rather than 'using'?</source>
<target state="new">'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method. Did you mean 'await using' rather than 'using'?</target>
<note />
</trans-unit>
<trans-unit id="ERR_NullableDirectiveQualifierExpected">
......@@ -2564,12 +2564,12 @@
</trans-unit>
<trans-unit id="WRN_PatternBadSignature">
<source>'{0}' does not implement the '{1}' pattern. '{2}' has the wrong signature.</source>
<target state="translated">'{0}' 未實作 '{1}' 模式。'{2}' 的簽章錯誤。</target>
<target state="needs-review-translation">'{0}' 未實作 '{1}' 模式。'{2}' 的簽章錯誤。</target>
<note />
</trans-unit>
<trans-unit id="WRN_PatternBadSignature_Title">
<source>Type does not implement the collection pattern; member has the wrong signature</source>
<target state="translated">類型未實作集合模式; 成員的簽章錯誤</target>
<target state="needs-review-translation">類型未實作集合模式; 成員的簽章錯誤</target>
<note />
</trans-unit>
<trans-unit id="ERR_FriendRefNotEqualToThis">
......@@ -5571,7 +5571,7 @@ A catch() block after a catch (System.Exception e) block can catch non-CLS excep
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIDisp">
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable'.</source>
<source>'{0}': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.</source>
<target state="needs-review-translation">'{0}': 在 using 陳述式中所用的類型,必須可以隱含轉換成 'System.IDisposable'。</target>
<note />
</trans-unit>
......@@ -9470,8 +9470,8 @@ To remove the warning, you can use /reference instead (set the Embed Interop Typ
<note />
</trans-unit>
<trans-unit id="ERR_NoConvToIAsyncDisp">
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable'</target>
<source>'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</source>
<target state="new">'{0}': type used in an async using statement must be implicitly convertible to 'System.IAsyncDisposable' or implement a suitable 'DisposeAsync' method.</target>
<note />
</trans-unit>
<trans-unit id="ERR_BadGetAsyncEnumerator">
......
......@@ -1493,7 +1493,7 @@ static void Main()
{
foreach (var x in new Enumerable1())
{
System.Console.WriteLine(x);
System.Console.Write(x);
}
}
}
......@@ -1512,17 +1512,51 @@ class Enumerable1
static class DisposeExtension
{
public static void Dispose(this DisposableEnumerator de) { System.Console.WriteLine(""Done with DisposableEnumerator""); }
public static void Dispose(this DisposableEnumerator de) => throw null;
}
";
// extension methods do not contribute to disposal
CompileAndVerify(source, expectedOutput: @"123");
}
[Fact]
public void TestForEachPatternDisposableRefStructWithTwoExtensionMethods()
{
var source = @"
class C
{
static void Main()
{
foreach (var x in new Enumerable1())
{
System.Console.Write(x);
}
}
}
var compilation = CompileAndVerify(source, expectedOutput: @"
1
2
3
Done with DisposableEnumerator");
class Enumerable1
{
public DisposableEnumerator GetEnumerator() { return new DisposableEnumerator(); }
}
ref struct DisposableEnumerator
{
int x;
public int Current { get { return x; } }
public bool MoveNext() { return ++x < 4; }
}
static class DisposeExtension1
{
public static void Dispose(this DisposableEnumerator de) => throw null;
}
static class DisposeExtension2
{
public static void Dispose(this DisposableEnumerator de) => throw null;
}
";
// extension methods do not contribute to disposal
CompileAndVerify(source, expectedOutput: @"123");
}
[Fact]
......@@ -1535,7 +1569,7 @@ static void Main()
{
foreach (var x in new Enumerable1())
{
System.Console.WriteLine(x);
System.Console.Write(x);
}
}
}
......@@ -1554,17 +1588,11 @@ class Enumerable1
static class DisposeExtension
{
public static void Dispose(this DisposableEnumerator de, int arg = 4) { System.Console.WriteLine($""Done with DisposableEnumerator. arg was {arg}""); }
public static void Dispose(this DisposableEnumerator de, int arg = 4) => throw null;
}
";
var compilation = CompileAndVerify(source, expectedOutput: @"
1
2
3
Done with DisposableEnumerator. arg was 4");
// extension methods do not contribute to disposal
CompileAndVerify(source, expectedOutput: @"123");
}
[Fact]
......@@ -1577,7 +1605,7 @@ static void Main()
{
foreach (var x in new Enumerable1())
{
System.Console.WriteLine(x);
System.Console.Write(x);
}
}
}
......@@ -1596,17 +1624,11 @@ class Enumerable1
static class DisposeExtension
{
public static void Dispose(this DisposableEnumerator de, params object[] args) { System.Console.WriteLine($""Done with DisposableEnumerator. Args was {args}, length {args.Length}""); }
public static void Dispose(this DisposableEnumerator de, params object[] args) => throw null;
}
";
var compilation = CompileAndVerify(source, expectedOutput: @"
1
2
3
Done with DisposableEnumerator. Args was System.Object[], length 0");
// extension methods do not contribute to disposal
CompileAndVerify(source, expectedOutput: @"123");
}
[Fact]
......
......@@ -812,27 +812,12 @@ static void Main(string[] args)
}
}";
var output = @"Disposed; ";
CompileAndVerify(source, expectedOutput: output).VerifyIL("Program.Main", @"
{
// Code size 18 (0x12)
.maxstack 1
.locals init (S1 V_0) //s1
IL_0000: ldloca.s V_0
IL_0002: initobj ""S1""
.try
{
IL_0008: leave.s IL_0011
}
finally
{
IL_000a: ldloc.0
IL_000b: call ""void C2.Dispose(S1)""
IL_0010: endfinally
}
IL_0011: ret
}
");
var comp = CreateCompilation(source);
comp.VerifyDiagnostics(
// (17,13): error CS1674: 'S1': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.
// using S1 s1 = new S1();
Diagnostic(ErrorCode.ERR_NoConvToIDisp, "using S1 s1 = new S1();").WithArguments("S1").WithLocation(17, 13)
);
}
[Fact]
......
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.CodeAnalysis.CSharp.Symbols;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.CSharp.UnitTests.Emit;
using Microsoft.CodeAnalysis.Test.Utilities;
using Roslyn.Test.Utilities;
using Xunit;
......@@ -1125,7 +1121,6 @@ .maxstack 1
public void UsingPatternExtensionMethodTest()
{
var source = @"
using System;
ref struct S1
{
}
......@@ -1134,7 +1129,6 @@ static class C2
{
public static void Dispose(this S1 s1)
{
Console.WriteLine(""C2.Dispose(S1)"");
}
}
......@@ -1147,26 +1141,12 @@ static void Main()
}
}
}";
CompileAndVerify(source, expectedOutput: "C2.Dispose(S1)").VerifyIL("C3.Main()", @"
{
// Code size 18 (0x12)
.maxstack 1
.locals init (S1 V_0) //s
IL_0000: ldloca.s V_0
IL_0002: initobj ""S1""
.try
{
IL_0008: leave.s IL_0011
}
finally
{
IL_000a: ldloc.0
IL_000b: call ""void C2.Dispose(S1)""
IL_0010: endfinally
}
IL_0011: ret
}
");
var comp = CreateCompilation(source);
comp.VerifyDiagnostics(
// (17,16): error CS1674: 'S1': type used in a using statement must be implicitly convertible to 'System.IDisposable'.
// using (S1 s = new S1())
Diagnostic(ErrorCode.ERR_NoConvToIDisp, "S1 s = new S1()").WithArguments("S1").WithLocation(17, 16)
);
}
[Fact]
......@@ -1231,7 +1211,7 @@ public void UsingPatternExtensionMethodWithDefaultArguments()
static class C2
{
internal static void Dispose(this S1 s1, int a = 1) { System.Console.WriteLine($""Dispose default param {a}""); }
internal static void Dispose(this S1 s1, int a = 1) { }
}
class C3
......@@ -1243,7 +1223,12 @@ static void Main()
}
}
}";
CompileAndVerify(source, expectedOutput: "Dispose default param 1");
var comp = CreateCompilation(source);
comp.VerifyDiagnostics(
// (15,15): error CS1674: 'S1': type used in a using statement must be implicitly convertible to 'System.IDisposable'.
// using (S1 s = new S1())
Diagnostic(ErrorCode.ERR_NoConvToIDisp, "S1 s = new S1()").WithArguments("S1").WithLocation(15, 15)
);
}
[Fact]
......@@ -1256,7 +1241,7 @@ public void UsingPatternExtensionMethodWithParams()
static class C2
{
internal static void Dispose(this S1 s1, params int[] args) { System.Console.WriteLine($""Dispose params {args.Length}""); }
internal static void Dispose(this S1 s1, params int[] args) { }
}
class C3
......@@ -1268,7 +1253,12 @@ static void Main()
}
}
}";
CompileAndVerify(source, expectedOutput: "Dispose params 0");
var comp = CreateCompilation(source);
comp.VerifyDiagnostics(
// (15,15): error CS1674: 'S1': type used in a using statement must be implicitly convertible to 'System.IDisposable'.
// using (S1 s = new S1())
Diagnostic(ErrorCode.ERR_NoConvToIDisp, "S1 s = new S1()").WithArguments("S1").WithLocation(15, 15)
);
}
// The object could be created outside the "using" statement
......
......@@ -38,7 +38,6 @@ static void Main()
Diagnostic(ErrorCode.ERR_SingleTypeNameNotFound, "MissingType").WithArguments("MissingType"));
}
[Fact]
public void TestErrorNullLiteralCollection()
{
......
......@@ -338,7 +338,14 @@ static void Main()
using (s1b) { }
}
}";
CreateCompilation(source).VerifyDiagnostics();
CreateCompilation(source).VerifyDiagnostics(
// (15,16): error CS1674: 'S1': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.
// using (S1 s = new S1())
Diagnostic(ErrorCode.ERR_NoConvToIDisp, "S1 s = new S1()").WithArguments("S1").WithLocation(15, 16),
// (19,16): error CS1674: 'S1': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.
// using (s1b) { }
Diagnostic(ErrorCode.ERR_NoConvToIDisp, "s1b").WithArguments("S1").WithLocation(19, 16)
);
}
[Fact]
......@@ -366,7 +373,14 @@ static void Main()
using (s1b) { }
}
}";
CreateCompilation(source).VerifyDiagnostics();
CreateCompilation(source).VerifyDiagnostics(
// (16,16): error CS1674: 'S1': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.
// using (S1 s = new S1())
Diagnostic(ErrorCode.ERR_NoConvToIDisp, "S1 s = new S1()").WithArguments("S1").WithLocation(16, 16),
// (20,16): error CS1674: 'S1': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.
// using (s1b) { }
Diagnostic(ErrorCode.ERR_NoConvToIDisp, "s1b").WithArguments("S1").WithLocation(20, 16)
);
}
[Fact]
......@@ -425,6 +439,9 @@ static void Main()
}
}
}";
// Extension methods should just be ignored, rather than rejected after-the-fact. So there should be no error about ambiguities
// Tracked by https://github.com/dotnet/roslyn/issues/32767
CreateCompilation(source).VerifyDiagnostics(
// (20,16): error CS0121: The call is ambiguous between the following methods or properties: 'C2.Dispose(S1)' and 'C3.Dispose(S1)'
// using (S1 c = new S1())
......@@ -445,7 +462,7 @@ public void UsingPatternScopedExtensionMethodTest()
namespace N1
{
static class C2
static class C2
{
public static void Dispose(this S1 s1) { }
}
......@@ -453,7 +470,7 @@ static class C2
namespace N2
{
static class C3
static class C3
{
public static void Dispose(this S1 s1) { }
}
......@@ -461,7 +478,7 @@ static class C3
namespace N3
{
static class C4
static class C4
{
public static int Dispose(this S1 s1) { return 0; }
}
......@@ -474,7 +491,7 @@ partial class C5
{
static void M()
{
using (S1 s = new S1()) // error 1: no extension in scope
using (S1 s = new S1()) // error 1
{
}
}
......@@ -487,7 +504,7 @@ partial class C5
{
static void M2()
{
using (S1 s = new S1()) // success: resolve against C2.Dispose
using (S1 s = new S1()) // error 2
{
}
}
......@@ -500,7 +517,7 @@ partial class C5
{
static void M3()
{
using (S1 s = new S1()) // error 2: C4.Dispose does not match pattern
using (S1 s = new S1()) // error 3
{
}
}
......@@ -514,7 +531,7 @@ partial class C5
{
static void M4()
{
using (S1 s = new S1()) // error 3: C2.Dispose and C4.Dispose are ambiguous
using (S1 s = new S1()) // error 4
{
}
}
......@@ -529,7 +546,7 @@ partial class C5
{
static void M5()
{
using (S1 s = new S1()) // error 4: C4.Dispose does not match pattern
using (S1 s = new S1()) // error 5
{
}
}
......@@ -542,36 +559,39 @@ partial class C5
{
static void M6()
{
using (S1 s = new S1()) // success: resolve against C2.Dispose
{
using (S1 s = new S1()) // error 6
{
}
}
}
}
}
}";
// Extension methods should just be ignored, rather than rejected after-the-fact. So there should be no error about ambiguities
// Tracked by https://github.com/dotnet/roslyn/issues/32767
CreateCompilation(source).VerifyDiagnostics(
// (37,20): error CS1674: 'S1': type used in a using statement must be implicitly convertible to 'System.IDisposable'.
// using (S1 s = new S1()) // error 1: no extension in scope
// (37,20): error CS1674: 'S1': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.
// using (S1 s = new S1()) // error 1
Diagnostic(ErrorCode.ERR_NoConvToIDisp, "S1 s = new S1()").WithArguments("S1").WithLocation(37, 20),
// (63,20): warning CS0280: 'S1' does not implement the 'disposable' pattern. 'C4.Dispose(S1)' has the wrong signature.
// using (S1 s = new S1()) // error 2: C4.Dispose does not match pattern
Diagnostic(ErrorCode.WRN_PatternBadSignature, "S1 s = new S1()").WithArguments("S1", "disposable", "N3.C4.Dispose(S1)").WithLocation(63, 20),
// (63,20): error CS1674: 'S1': type used in a using statement must be implicitly convertible to 'System.IDisposable'.
// using (S1 s = new S1()) // error 2: C4.Dispose does not match pattern
// (50,20): error CS1674: 'S1': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.
// using (S1 s = new S1()) // error 2
Diagnostic(ErrorCode.ERR_NoConvToIDisp, "S1 s = new S1()").WithArguments("S1").WithLocation(50, 20),
// (63,20): error CS1674: 'S1': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.
// using (S1 s = new S1()) // error 3
Diagnostic(ErrorCode.ERR_NoConvToIDisp, "S1 s = new S1()").WithArguments("S1").WithLocation(63, 20),
// (77,20): error CS0121: The call is ambiguous between the following methods or properties: 'N1.C2.Dispose(S1)' and 'N3.C4.Dispose(S1)'
// using (S1 s = new S1()) // error 3: C2.Dispose and C4.Dispose are ambiguous
// using (S1 s = new S1()) // error 4
Diagnostic(ErrorCode.ERR_AmbigCall, "S1 s = new S1()").WithArguments("N1.C2.Dispose(S1)", "N3.C4.Dispose(S1)").WithLocation(77, 20),
// (77,20): error CS1674: 'S1': type used in a using statement must be implicitly convertible to 'System.IDisposable'.
// using (S1 s = new S1()) // error 3: C2.Dispose and C4.Dispose are ambiguous
// (77,20): error CS1674: 'S1': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.
// using (S1 s = new S1()) // error 4
Diagnostic(ErrorCode.ERR_NoConvToIDisp, "S1 s = new S1()").WithArguments("S1").WithLocation(77, 20),
// (92,24): warning CS0280: 'S1' does not implement the 'disposable' pattern. 'C4.Dispose(S1)' has the wrong signature.
// using (S1 s = new S1()) // error 4: C4.Dispose does not match pattern
Diagnostic(ErrorCode.WRN_PatternBadSignature, "S1 s = new S1()").WithArguments("S1", "disposable", "N3.C4.Dispose(S1)").WithLocation(92, 24),
// (92,24): error CS1674: 'S1': type used in a using statement must be implicitly convertible to 'System.IDisposable'.
// using (S1 s = new S1()) // error 4: C4.Dispose does not match pattern
Diagnostic(ErrorCode.ERR_NoConvToIDisp, "S1 s = new S1()").WithArguments("S1").WithLocation(92, 24)
// (92,24): error CS1674: 'S1': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.
// using (S1 s = new S1()) // error 5
Diagnostic(ErrorCode.ERR_NoConvToIDisp, "S1 s = new S1()").WithArguments("S1").WithLocation(92, 24),
// (105,28): error CS1674: 'S1': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.
// using (S1 s = new S1()) // error 6
Diagnostic(ErrorCode.ERR_NoConvToIDisp, "S1 s = new S1()").WithArguments("S1").WithLocation(105, 28)
);
}
......@@ -612,7 +632,20 @@ static void Main()
using (s2b) { }
}
}";
CreateCompilation(source).VerifyDiagnostics();
CreateCompilation(source).VerifyDiagnostics(
// (22,16): error CS1674: 'S1': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.
// using (S1 s = new S1())
Diagnostic(ErrorCode.ERR_NoConvToIDisp, "S1 s = new S1()").WithArguments("S1").WithLocation(22, 16),
// (26,16): error CS1674: 'S1': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.
// using (s1b) { }
Diagnostic(ErrorCode.ERR_NoConvToIDisp, "s1b").WithArguments("S1").WithLocation(26, 16),
// (28,16): error CS1674: 'S2': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.
// using (S2 s = new S2())
Diagnostic(ErrorCode.ERR_NoConvToIDisp, "S2 s = new S2()").WithArguments("S2").WithLocation(28, 16),
// (32,16): error CS1674: 'S2': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.
// using (s2b) { }
Diagnostic(ErrorCode.ERR_NoConvToIDisp, "s2b").WithArguments("S2").WithLocation(32, 16)
);
}
[Fact]
......@@ -643,6 +676,9 @@ static void Main()
}
}
}";
// Extension methods should just be ignored, rather than rejected after-the-fact. So there should be no error about ambiguities
// Tracked by https://github.com/dotnet/roslyn/issues/32767
CreateCompilation(source).VerifyDiagnostics(
// (21,15): error CS0121: The call is ambiguous between the following methods or properties: 'C2.Dispose(S1, int)' and 'C3.Dispose(S1, int)'
// using (S1 s = new S1())
......@@ -677,7 +713,14 @@ static void Main()
using (s1b) { }
}
}";
CreateCompilation(source).VerifyDiagnostics();
CreateCompilation(source).VerifyDiagnostics(
// (15,15): error CS1674: 'S1': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.
// using (S1 s = new S1())
Diagnostic(ErrorCode.ERR_NoConvToIDisp, "S1 s = new S1()").WithArguments("S1").WithLocation(15, 15),
// (19,15): error CS1674: 'S1': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.
// using (s1b) { }
Diagnostic(ErrorCode.ERR_NoConvToIDisp, "s1b").WithArguments("S1").WithLocation(19, 15)
);
}
[Fact]
......@@ -739,7 +782,11 @@ static void Main()
}
}
}";
CreateCompilation(source).VerifyDiagnostics();
CreateCompilation(source).VerifyDiagnostics(
// (16,15): error CS1674: 'S1': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.
// using (S1 s = new S1())
Diagnostic(ErrorCode.ERR_NoConvToIDisp, "S1 s = new S1()").WithArguments("S1").WithLocation(16, 15)
);
}
[Fact]
......@@ -766,7 +813,14 @@ static void Main()
using (s1b) { }
}
}";
CreateCompilation(source).VerifyDiagnostics();
CreateCompilation(source).VerifyDiagnostics(
// (15,15): error CS1674: 'S1': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.
// using (S1 s = new S1())
Diagnostic(ErrorCode.ERR_NoConvToIDisp, "S1 s = new S1()").WithArguments("S1").WithLocation(15, 15),
// (19,15): error CS1674: 'S1': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.
// using (s1b) { }
Diagnostic(ErrorCode.ERR_NoConvToIDisp, "s1b").WithArguments("S1").WithLocation(19, 15)
);
}
[Fact]
......@@ -791,7 +845,11 @@ static void Main()
}
}
}";
var compilation = CreateCompilation(source).VerifyDiagnostics();
var compilation = CreateCompilation(source).VerifyDiagnostics(
// (15,15): error CS1674: 'S1': type used in a using statement must be implicitly convertible to 'System.IDisposable' or implement a suitable 'Dispose' method.
// using (S1 s = new S1())
Diagnostic(ErrorCode.ERR_NoConvToIDisp, "S1 s = new S1()").WithArguments("S1").WithLocation(15, 15)
);
}
[Fact]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册