Merge remote-tracking branch 'upstream/v15.8' into fix255
This commit is contained in:
Коммит
a2b5f3b337
|
@ -40,7 +40,7 @@ steps:
|
|||
- task: MicroBuildIBCMergePlugin@0
|
||||
displayName: MicroBuild IBCMerge Plugin
|
||||
inputs:
|
||||
branch: lab/vsuvscore
|
||||
branch: lab/d15.8stg
|
||||
condition: and(succeeded(), ne(variables['Hosted'], 'true'))
|
||||
|
||||
- task: MicroBuildSigningPlugin@1
|
||||
|
|
|
@ -1,14 +1,18 @@
|
|||
# VSTHRD011 Avoid using `Lazy<T>` where `T` is `Task<T2>`
|
||||
# VSTHRD011 Use `AsyncLazy<T>`
|
||||
|
||||
The `Lazy<T>` type executes the value factory just once and
|
||||
the value factory inherits the context of the first one to request the
|
||||
`Lazy<T>.Value` property's value.
|
||||
`Lazy<T>.Value` property's value. This can lead to deadlocks when
|
||||
the value factory attempts to switch to the main thread.
|
||||
|
||||
## Examples of patterns that are flagged by this analyzer
|
||||
|
||||
### Using `Lazy<T>` where `T` is `Task<T2>`
|
||||
|
||||
When `T` is `Task<T2>` (because the value factory is an async method),
|
||||
if the first caller had no access to the main thread, and the value factory
|
||||
requires it, it will block. If later a second caller calls the `Value` property
|
||||
and that second caller is blocking the UI thread for its result, it will deadlock.
|
||||
|
||||
## Examples of patterns that are flagged by this analyzer
|
||||
and that second caller is blocking the UI thread for its result, it will deadlock.
|
||||
|
||||
```csharp
|
||||
var lazy = new Lazy<Task<int>>(async delegate // analyzer flags this line
|
||||
|
@ -20,9 +24,27 @@ var lazy = new Lazy<Task<int>>(async delegate // analyzer flags this line
|
|||
int value = await lazy.Value;
|
||||
```
|
||||
|
||||
### Using synchronously blocking methods in `Lazy<T>` value factories
|
||||
|
||||
When the value factory passed to the `Lazy<T>` constructor calls synchronously
|
||||
blocking methods such as `JoinableTaskFactory.Run`, only the first caller
|
||||
can help any required transition to the main thread.
|
||||
|
||||
```csharp
|
||||
var lazy = new Lazy<int>(delegate
|
||||
{
|
||||
return joinableTaskFactory.Run(async delegate { // analyzer flags this line
|
||||
int result = await SomeAsyncMethod();
|
||||
return result + 3;
|
||||
});
|
||||
});
|
||||
|
||||
int value = lazy.Value;
|
||||
```
|
||||
|
||||
## Solution
|
||||
|
||||
Instead of using `Lazy<Task<T>>` when the value factory is async, use `AsyncLazy<T>`:
|
||||
Use `AsyncLazy<T>` with an async value factory:
|
||||
|
||||
```csharp
|
||||
var lazy = new AsyncLazy<int>(async delegate
|
||||
|
|
|
@ -10,7 +10,7 @@ ID | Title | Severity | Supports
|
|||
[VSTHRD003](VSTHRD003.md) | Avoid awaiting foreign Tasks | Critical | [3rd rule](../threading_rules.md#Rule3)
|
||||
[VSTHRD004](VSTHRD004.md) | Await SwitchToMainThreadAsync | Critical | [1st rule](../threading_rules.md#Rule1)
|
||||
[VSTHRD010](VSTHRD010.md) | Invoke single-threaded types on Main thread | Critical | [1st rule](../threading_rules.md#Rule1)
|
||||
[VSTHRD011](VSTHRD011.md) | Avoid using `Lazy<T>` where `T` is `Task<T2>` | Critical | [3rd rule](../threading_rules.md#Rule3)
|
||||
[VSTHRD011](VSTHRD011.md) | Use `AsyncLazy<T>` | Critical | [3rd rule](../threading_rules.md#Rule3)
|
||||
[VSTHRD012](VSTHRD012.md) | Provide JoinableTaskFactory where allowed | Critical | [All rules](../threading_rules.md)
|
||||
[VSTHRD100](VSTHRD100.md) | Avoid `async void` methods | Advisory
|
||||
[VSTHRD101](VSTHRD101.md) | Avoid unsupported async delegates | Advisory | [VSTHRD100](VSTHRD100.md)
|
||||
|
|
|
@ -165,14 +165,21 @@ namespace Microsoft.VisualStudio.Threading.Analyzers.Tests
|
|||
}
|
||||
}
|
||||
|
||||
Assert.True(fixApplied, "No code fix offered.");
|
||||
|
||||
// After applying all of the code fixes, compare the resulting string to the inputted one
|
||||
int j = 0;
|
||||
foreach (var document in project.Documents)
|
||||
if (newSources != null && newSources[0] != null)
|
||||
{
|
||||
var actual = GetStringFromDocument(document);
|
||||
Assert.Equal(newSources[j++], actual, ignoreLineEndingDifferences: true);
|
||||
Assert.True(fixApplied, "No code fix offered.");
|
||||
|
||||
// After applying all of the code fixes, compare the resulting string to the inputted one
|
||||
int j = 0;
|
||||
foreach (var document in project.Documents)
|
||||
{
|
||||
var actual = GetStringFromDocument(document);
|
||||
Assert.Equal(newSources[j++], actual, ignoreLineEndingDifferences: true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.False(fixApplied, "No code fix expected, but was offered.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,82 +0,0 @@
|
|||
namespace Microsoft.VisualStudio.Threading.Analyzers.Tests
|
||||
{
|
||||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis.CodeFixes;
|
||||
using Microsoft.CodeAnalysis.Diagnostics;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
public class VSTHRD011LazyOfTaskAnalyzerTests : DiagnosticVerifier
|
||||
{
|
||||
private DiagnosticResult expect = new DiagnosticResult
|
||||
{
|
||||
Id = VSTHRD011LazyOfTaskAnalyzer.Id,
|
||||
Severity = DiagnosticSeverity.Error,
|
||||
};
|
||||
|
||||
public VSTHRD011LazyOfTaskAnalyzerTests(ITestOutputHelper logger)
|
||||
: base(logger)
|
||||
{
|
||||
}
|
||||
|
||||
protected override DiagnosticAnalyzer GetCSharpDiagnosticAnalyzer()
|
||||
{
|
||||
return new VSTHRD011LazyOfTaskAnalyzer();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ReportErrorOnLazyOfTConstructionInFieldValueTypeArg()
|
||||
{
|
||||
var test = @"
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
class Test {
|
||||
Lazy<Task<int>> t = new Lazy<Task<int>>();
|
||||
Lazy<Task<int>> t2;
|
||||
Lazy<int> tInt = new Lazy<int>();
|
||||
}
|
||||
";
|
||||
this.expect.Locations = new[] {
|
||||
new DiagnosticResultLocation("Test0.cs", 6, 25),
|
||||
};
|
||||
this.VerifyCSharpDiagnostic(test, this.expect);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ReportErrorOnLazyOfTConstructionInFieldRefTypeArg()
|
||||
{
|
||||
var test = @"
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
class Test {
|
||||
Lazy<Task<object>> t3 = new Lazy<Task<object>>();
|
||||
}
|
||||
";
|
||||
this.expect.Locations = new[] {
|
||||
new DiagnosticResultLocation("Test0.cs", 6, 29),
|
||||
};
|
||||
this.VerifyCSharpDiagnostic(test, this.expect);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ReportErrorOnLazyOfTConstructionInLocalVariable()
|
||||
{
|
||||
var test = @"
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
class Test {
|
||||
void Foo() {
|
||||
var t4 = new Lazy<Task<object>>();
|
||||
}
|
||||
}
|
||||
";
|
||||
this.expect.Locations = new[] {
|
||||
new DiagnosticResultLocation("Test0.cs", 7, 18),
|
||||
};
|
||||
this.VerifyCSharpDiagnostic(test, this.expect);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,207 @@
|
|||
namespace Microsoft.VisualStudio.Threading.Analyzers.Tests
|
||||
{
|
||||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis.CodeFixes;
|
||||
using Microsoft.CodeAnalysis.Diagnostics;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
public class VSTHRD011UseAsyncLazyAnalyzerTests : DiagnosticVerifier
|
||||
{
|
||||
private DiagnosticResult expect = new DiagnosticResult
|
||||
{
|
||||
Id = VSTHRD011UseAsyncLazyAnalyzer.Id,
|
||||
Severity = DiagnosticSeverity.Error,
|
||||
};
|
||||
|
||||
public VSTHRD011UseAsyncLazyAnalyzerTests(ITestOutputHelper logger)
|
||||
: base(logger)
|
||||
{
|
||||
}
|
||||
|
||||
protected override DiagnosticAnalyzer GetCSharpDiagnosticAnalyzer()
|
||||
{
|
||||
return new VSTHRD011UseAsyncLazyAnalyzer();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ReportErrorOnLazyOfTConstructionInFieldValueTypeArg()
|
||||
{
|
||||
var test = @"
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
class Test {
|
||||
Lazy<Task<int>> t = new Lazy<Task<int>>();
|
||||
Lazy<Task<int>> t2;
|
||||
Lazy<int> tInt = new Lazy<int>();
|
||||
}
|
||||
";
|
||||
var expect = this.CreateDiagnostic(6, 29, 15);
|
||||
this.VerifyCSharpDiagnostic(test, expect);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ReportErrorOnLazyOfTConstructionInFieldRefTypeArg()
|
||||
{
|
||||
var test = @"
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
class Test {
|
||||
Lazy<Task<object>> t3 = new Lazy<Task<object>>();
|
||||
}
|
||||
";
|
||||
var expect = this.CreateDiagnostic(6, 33, 18);
|
||||
this.VerifyCSharpDiagnostic(test, expect);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ReportErrorOnLazyOfTConstructionInFieldNoTypeArg()
|
||||
{
|
||||
var test = @"
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
class Test {
|
||||
Lazy<Task> t3 = new Lazy<Task>();
|
||||
}
|
||||
";
|
||||
var expect = this.CreateDiagnostic(6, 25, 10);
|
||||
this.VerifyCSharpDiagnostic(test, expect);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void JTFRunInLazyValueFactory_Delegate()
|
||||
{
|
||||
var test = @"
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.VisualStudio.Threading;
|
||||
|
||||
class Test {
|
||||
JoinableTaskFactory jtf;
|
||||
|
||||
void Foo() {
|
||||
var t4 = new Lazy<int>(delegate {
|
||||
jtf.Run(async delegate {
|
||||
await Task.Yield();
|
||||
});
|
||||
|
||||
return 3;
|
||||
});
|
||||
}
|
||||
}
|
||||
";
|
||||
var expect = this.CreateDiagnostic(11, 13, 7);
|
||||
this.VerifyCSharpDiagnostic(test, expect);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void JTFRunInLazyValueFactory_Lambda()
|
||||
{
|
||||
var test = @"
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.VisualStudio.Threading;
|
||||
|
||||
class Test {
|
||||
JoinableTaskFactory jtf;
|
||||
|
||||
void Foo() {
|
||||
var t4 = new Lazy<int>(() => {
|
||||
jtf.Run(async delegate {
|
||||
await Task.Yield();
|
||||
});
|
||||
|
||||
return 3;
|
||||
});
|
||||
}
|
||||
}
|
||||
";
|
||||
var expect = this.CreateDiagnostic(11, 13, 7);
|
||||
this.VerifyCSharpDiagnostic(test, expect);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void JTFRunAsyncInLazyValueFactory_Lambda()
|
||||
{
|
||||
var test = @"
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.VisualStudio.Threading;
|
||||
|
||||
class Test {
|
||||
JoinableTaskFactory jtf;
|
||||
|
||||
void Foo() {
|
||||
var t4 = new Lazy<Task<int>>(async () => {
|
||||
await jtf.RunAsync(async delegate {
|
||||
await Task.Yield();
|
||||
});
|
||||
|
||||
return 3;
|
||||
});
|
||||
}
|
||||
}
|
||||
";
|
||||
var expect = this.CreateDiagnostic(10, 22, 15);
|
||||
this.VerifyCSharpDiagnostic(test, expect);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void JTFRunInLazyValueFactory_MethodGroup()
|
||||
{
|
||||
var test = @"
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.VisualStudio.Threading;
|
||||
|
||||
class Test {
|
||||
JoinableTaskFactory jtf;
|
||||
|
||||
void Foo() {
|
||||
var t4 = new Lazy<int>(LazyValueFactory);
|
||||
}
|
||||
|
||||
int LazyValueFactory() {
|
||||
jtf.Run(async delegate {
|
||||
await Task.Yield();
|
||||
});
|
||||
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
";
|
||||
|
||||
// We can change this to verify a diagnostic is reported if we ever implement this.
|
||||
this.VerifyCSharpDiagnostic(test);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ReportErrorOnLazyOfTConstructionInLocalVariable()
|
||||
{
|
||||
var test = @"
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
class Test {
|
||||
void Foo() {
|
||||
var t4 = new Lazy<Task<object>>();
|
||||
}
|
||||
}
|
||||
";
|
||||
var expect = this.CreateDiagnostic(7, 22, 18);
|
||||
this.VerifyCSharpDiagnostic(test, expect);
|
||||
}
|
||||
|
||||
private DiagnosticResult CreateDiagnostic(int line, int column, int length, string messagePattern = null) =>
|
||||
new DiagnosticResult
|
||||
{
|
||||
Id = this.expect.Id,
|
||||
MessagePattern = messagePattern ?? this.expect.MessagePattern,
|
||||
Severity = this.expect.Severity,
|
||||
Locations = new[] { new DiagnosticResultLocation("Test0.cs", line, column, line, column + length) },
|
||||
};
|
||||
}
|
||||
}
|
|
@ -254,6 +254,116 @@ class Test {
|
|||
this.VerifyCSharpFix(test, withFix);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void IVsTaskWaitInTaskReturningMethodGeneratesWarning()
|
||||
{
|
||||
var test = @"
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.VisualStudio.Shell;
|
||||
using Microsoft.VisualStudio.Shell.Interop;
|
||||
using Task = System.Threading.Tasks.Task;
|
||||
|
||||
class Test {
|
||||
Task T() {
|
||||
IVsTask t = null;
|
||||
t.Wait();
|
||||
return Task.FromResult(1);
|
||||
}
|
||||
}
|
||||
";
|
||||
|
||||
var withFix = @"
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.VisualStudio.Shell;
|
||||
using Microsoft.VisualStudio.Shell.Interop;
|
||||
using Task = System.Threading.Tasks.Task;
|
||||
|
||||
class Test {
|
||||
async Task T() {
|
||||
IVsTask t = null;
|
||||
await t;
|
||||
}
|
||||
}
|
||||
";
|
||||
this.expect = this.CreateDiagnostic(10, 11, 4);
|
||||
this.VerifyCSharpDiagnostic(test, this.expect);
|
||||
this.VerifyCSharpFix(test, withFix);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void IVsTaskGetResultInTaskReturningMethodGeneratesWarning()
|
||||
{
|
||||
var test = @"
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.VisualStudio.Shell;
|
||||
using Microsoft.VisualStudio.Shell.Interop;
|
||||
using Task = System.Threading.Tasks.Task;
|
||||
|
||||
class Test {
|
||||
Task T() {
|
||||
IVsTask t = null;
|
||||
object result = t.GetResult();
|
||||
return Task.FromResult(1);
|
||||
}
|
||||
}
|
||||
";
|
||||
|
||||
var withFix = @"
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.VisualStudio.Shell;
|
||||
using Microsoft.VisualStudio.Shell.Interop;
|
||||
using Task = System.Threading.Tasks.Task;
|
||||
|
||||
class Test {
|
||||
async Task T() {
|
||||
IVsTask t = null;
|
||||
object result = await t;
|
||||
}
|
||||
}
|
||||
";
|
||||
this.expect = this.CreateDiagnostic(10, 27, 9);
|
||||
this.VerifyCSharpDiagnostic(test, this.expect);
|
||||
this.VerifyCSharpFix(test, withFix);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ensures we don't offer a code fix when the required using directive is not already present.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void IVsTaskGetResultInTaskReturningMethod_WithoutUsing_OffersNoFix()
|
||||
{
|
||||
var test = @"
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.VisualStudio.Shell.Interop;
|
||||
|
||||
class Test {
|
||||
Task T() {
|
||||
IVsTask t = null;
|
||||
object result = t.GetResult();
|
||||
return Task.FromResult(1);
|
||||
}
|
||||
}
|
||||
";
|
||||
|
||||
string withFix = null;
|
||||
//// var withFix = @"
|
||||
//// using System.Threading.Tasks;
|
||||
//// using Microsoft.VisualStudio.Shell;
|
||||
//// using Microsoft.VisualStudio.Shell.Interop;
|
||||
//// using Task = System.Threading.Tasks.Task;
|
||||
////
|
||||
//// class Test {
|
||||
//// async Task T() {
|
||||
//// IVsTask t = null;
|
||||
//// object result = await t;
|
||||
//// }
|
||||
//// }
|
||||
//// ";
|
||||
this.expect = this.CreateDiagnostic(8, 27, 9);
|
||||
this.VerifyCSharpDiagnostic(test, this.expect);
|
||||
this.VerifyCSharpFix(test, withFix);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TaskOfTResultInTaskReturningMethodGeneratesWarning()
|
||||
{
|
||||
|
@ -319,7 +429,7 @@ class Test {
|
|||
}
|
||||
";
|
||||
|
||||
this.expect.Locations = new[] { new DiagnosticResultLocation("Test0.cs", 9, 28, 9, 34) };
|
||||
this.expect = this.CreateDiagnostic(9, 28, 6);
|
||||
this.VerifyCSharpDiagnostic(test, this.expect);
|
||||
this.VerifyCSharpFix(test, withFix);
|
||||
}
|
||||
|
@ -874,7 +984,7 @@ using System.Threading.Tasks;
|
|||
|
||||
class Test {
|
||||
string Foo => string.Empty;
|
||||
string Bar => string.Join(""a"", string.Empty);
|
||||
string Bar => string.Join(""a"", string.Empty);
|
||||
}
|
||||
";
|
||||
|
||||
|
@ -1078,5 +1188,14 @@ class Test {
|
|||
|
||||
this.VerifyCSharpDiagnostic(test);
|
||||
}
|
||||
|
||||
private DiagnosticResult CreateDiagnostic(int line, int column, int length, string messagePattern = null) =>
|
||||
new DiagnosticResult
|
||||
{
|
||||
Id = this.expect.Id,
|
||||
MessagePattern = messagePattern ?? this.expect.MessagePattern,
|
||||
Severity = this.expect.Severity,
|
||||
Locations = new[] { new DiagnosticResultLocation("Test0.cs", line, column, line, column + length) },
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -148,6 +148,49 @@ class Test {
|
|||
this.VerifyCSharpDiagnostic(test);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ReturnStatement_ProducesNoDiagnostic()
|
||||
{
|
||||
var test = @"
|
||||
using System.Threading.Tasks;
|
||||
|
||||
class Test {
|
||||
Task Foo()
|
||||
{
|
||||
return BarAsync();
|
||||
}
|
||||
|
||||
Task BarAsync() => null;
|
||||
|
||||
void OtherMethod(Task t) { }
|
||||
}
|
||||
";
|
||||
|
||||
this.VerifyCSharpDiagnostic(test);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ContinueWith_ProducesDiagnostic()
|
||||
{
|
||||
var test = @"
|
||||
using System.Threading.Tasks;
|
||||
|
||||
class Test {
|
||||
void Foo()
|
||||
{
|
||||
BarAsync().ContinueWith(_ => { }); // ContinueWith returns the dropped task
|
||||
}
|
||||
|
||||
Task BarAsync() => null;
|
||||
|
||||
void OtherMethod(Task t) { }
|
||||
}
|
||||
";
|
||||
|
||||
this.expect = this.CreateDiagnostic(7, 20, 12);
|
||||
this.VerifyCSharpDiagnostic(test, this.expect);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AsyncMethod_ProducesNoDiagnostic()
|
||||
{
|
||||
|
@ -167,6 +210,23 @@ class Test {
|
|||
this.VerifyCSharpDiagnostic(test); // CS4014 should already take care of this case.
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CallToNonExistentMethod()
|
||||
{
|
||||
var test = @"
|
||||
using System;
|
||||
|
||||
class Test {
|
||||
void Foo() {
|
||||
a(); // this is intentionally a compile error to test analyzer resiliency when there is no method symbol.
|
||||
}
|
||||
|
||||
void Bar() { }
|
||||
}
|
||||
";
|
||||
this.VerifyCSharpDiagnostic(new[] { test }, hasEntrypoint: false, allowErrors: true);
|
||||
}
|
||||
|
||||
private DiagnosticResult CreateDiagnostic(int line, int column, int length, string messagePattern = null) =>
|
||||
new DiagnosticResult
|
||||
{
|
||||
|
|
|
@ -34,7 +34,11 @@ namespace Microsoft.VisualStudio.Threading.Analyzers
|
|||
new SyncBlockingMethod(new QualifiedMember(new QualifiedType(Namespaces.SystemRuntimeCompilerServices, nameof(TaskAwaiter)), nameof(TaskAwaiter.GetResult)), null),
|
||||
};
|
||||
|
||||
internal static readonly IEnumerable<SyncBlockingMethod> SyncBlockingMethods = JTFSyncBlockers.Concat(ProblematicSyncBlockingMethods);
|
||||
internal static readonly IEnumerable<SyncBlockingMethod> SyncBlockingMethods = JTFSyncBlockers.Concat(ProblematicSyncBlockingMethods).Concat(new[]
|
||||
{
|
||||
new SyncBlockingMethod(new QualifiedMember(new QualifiedType(Namespaces.MicrosoftVisualStudioShellInterop, "IVsTask"), "Wait"), extensionMethodNamespace: Namespaces.MicrosoftVisualStudioShell),
|
||||
new SyncBlockingMethod(new QualifiedMember(new QualifiedType(Namespaces.MicrosoftVisualStudioShellInterop, "IVsTask"), "GetResult"), extensionMethodNamespace: Namespaces.MicrosoftVisualStudioShell),
|
||||
});
|
||||
|
||||
internal static readonly IEnumerable<QualifiedMember> LegacyThreadSwitchingMethods = new[]
|
||||
{
|
||||
|
@ -381,15 +385,18 @@ namespace Microsoft.VisualStudio.Threading.Analyzers
|
|||
[DebuggerDisplay("{" + nameof(Method) + "} -> {" + nameof(AsyncAlternativeMethodName) + "}")]
|
||||
internal struct SyncBlockingMethod
|
||||
{
|
||||
public SyncBlockingMethod(QualifiedMember method, string asyncAlternativeMethodName)
|
||||
public SyncBlockingMethod(QualifiedMember method, string asyncAlternativeMethodName = null, IReadOnlyList<string> extensionMethodNamespace = null)
|
||||
{
|
||||
this.Method = method;
|
||||
this.AsyncAlternativeMethodName = asyncAlternativeMethodName;
|
||||
this.ExtensionMethodNamespace = extensionMethodNamespace;
|
||||
}
|
||||
|
||||
public QualifiedMember Method { get; }
|
||||
|
||||
public string AsyncAlternativeMethodName { get; }
|
||||
|
||||
public IReadOnlyList<string> ExtensionMethodNamespace { get; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,8 +76,8 @@ Use AsyncLazy<T> instead.</source>
|
|||
Použijte raději AsyncLazy<T>.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD011_Title" translate="yes" xml:space="preserve">
|
||||
<source>Avoid using Lazy<it id="1" pos="open"><T></it> where T is a Task<it id="2" pos="open"><T2></it></source>
|
||||
<target state="translated">Vyhněte se použití Lazy<it id="1" pos="open"><T></it>, kde T označuje Task<it id="2" pos="open"><T2></it></target>
|
||||
<source>Use AsyncLazy<it id="1" pos="open"><T></it></source>
|
||||
<target state="translated">Použijte AsyncLazy<it id="1" pos="open"><T></it></target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD103_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>{0} synchronously blocks. Await {1} instead.</source>
|
||||
|
@ -135,7 +135,7 @@ Použijte raději AsyncLazy<T>.</target>
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD104_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Expose an async version of this method that does not synchronously block. Then simplify this method to call that async method within a JoinableTaskFactory.Run delegate.</source>
|
||||
<target state="translated">Vystavte asynchronní verzi této metody, která neprovádí synchronní blokování. Potom tuto metodu zjednodušte tak, aby volala danou asynchronní metodu v rámci delegáta JoinableTaskFactory.Run.</target>
|
||||
<target state="translated">Nabízejte asynchronní verzi této metody, která se synchronně neblokuje. Pak zjednodušte tuto metodu tak, aby volala tuto asynchronní metodu v delegátovi JoinableTaskFactory.Run.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD104_Title" translate="yes" xml:space="preserve">
|
||||
<source>Offer async methods</source>
|
||||
|
@ -180,38 +180,44 @@ Použijte raději AsyncLazy<T>.</target>
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD109_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Avoid throwing when not on the main thread while in an async or Task-returning method. Switch to the thread required instead.</source>
|
||||
<target state="new">Avoid throwing when not on the main thread while in an async or Task-returning method. Switch to the thread required instead.</target>
|
||||
<target state="translated">Vyhněte se tomuto volání, pokud nejste v hlavním vláknu a jste v asynchronní metodě nebo metodě, která vrací Task. Místo toho přepněte na požadované vlákno.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD109_Title" translate="yes" xml:space="preserve">
|
||||
<source>Switch instead of assert in async methods</source>
|
||||
<target state="new">Switch instead of assert in async methods</target>
|
||||
<target state="translated">V asynchronních metodách použijte Switch místo Assert</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD010_MessageFormat_Sync" translate="yes" xml:space="preserve">
|
||||
<source>Accessing "{0}" should only be done on the main thread. Call {1}() first.</source>
|
||||
<target state="new">Accessing "{0}" should only be done on the main thread. Call {1}() first.</target>
|
||||
<target state="translated">Přístup k {0} by se měl provádět jenom v hlavním vláknu. Napřed volejte {1}().</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">{0} is a type or member name and {1} is the name of a method that throws if not called from the main thread.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD010_MessageFormat_Async" translate="yes" xml:space="preserve">
|
||||
<source>Accessing "{0}" should only be done on the main thread. Await JoinableTaskFactory.SwitchToMainThreadAsync() first.</source>
|
||||
<target state="new">Accessing "{0}" should only be done on the main thread. Await JoinableTaskFactory.SwitchToMainThreadAsync() first.</target>
|
||||
<target state="translated">Přístup k {0} by se měl provádět jenom v hlavním vláknu. Napřed počkejte na dokončení volání metody JoinableTaskFactory.SwitchToMainThreadAsync().</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">{0} is a type or member name.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD004_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Calls to JoinableTaskFactory.SwitchToMainThreadAsync() must be awaited.</source>
|
||||
<target state="new">Calls to JoinableTaskFactory.SwitchToMainThreadAsync() must be awaited.</target>
|
||||
<target state="translated">U volání JoinableTaskFactory.SwitchToMainThreadAsync() se musí čekat na dokončení.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD004_Title" translate="yes" xml:space="preserve">
|
||||
<source>Await SwitchToMainThreadAsync</source>
|
||||
<target state="new">Await SwitchToMainThreadAsync</target>
|
||||
<target state="translated">Použijte Await SwitchToMainThreadAsync</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">Do not translate either of these. The first is a keyword, the second is a method name.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD110_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Observe the awaitable result of this method call by awaiting it, assigning to a variable, or passing it to another method.</source>
|
||||
<target state="new">Observe the awaitable result of this method call by awaiting it, assigning to a variable, or passing it to another method.</target>
|
||||
<target state="translated">Přijměte očekávatelný výsledek volání této metody tak, že na něj počkáte, přiřadíte ho do proměnné nebo ho předáte další metodě.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD110_Title" translate="yes" xml:space="preserve">
|
||||
<source>Observe result of async calls</source>
|
||||
<target state="new">Observe result of async calls</target>
|
||||
<target state="translated">Přijměte výsledek asynchronních volání</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD011b_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Invoking or blocking on async code in a Lazy<it id="1" pos="open"><T></it> value factory can deadlock.
|
||||
Use AsyncLazy<it id="2" pos="open"><T></it> instead.</source>
|
||||
<target state="translated">Vyvolání nebo zablokování asynchronního kódu v objektu pro vytváření hodnot Lazy<it id="1" pos="open"><T></it> může způsobit zablokování.
|
||||
Použijte raději AsyncLazy<it id="2" pos="open"><T></it>.</target>
|
||||
</trans-unit>
|
||||
</group>
|
||||
</body>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD002_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Synchronously waiting on tasks or awaiters may cause deadlocks. Use await or JoinableTaskFactory.Run instead.</source>
|
||||
<target state="translated">Das synchrone Warten auf Tasks oder Awaiters führt unter Umständen zu Deadlocks. Verwenden Sie stattdessen "await" oder JoinableTaskFactory.Run.</target>
|
||||
<target state="translated">Das synchrone Warten auf Aufgaben oder Awaiters führt unter Umständen zu Deadlocks. Verwenden Sie stattdessen "await" oder "JoinableTaskFactory.Run".</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">"await" is a C# keyword and should not be translated.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD002_Title" translate="yes" xml:space="preserve">
|
||||
|
@ -72,12 +72,12 @@ Sie können dies vermeiden, indem Sie sicherstellen, dass der Task innerhalb des
|
|||
<trans-unit id="VSTHRD011_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Lazy<Task<T>>.Value can deadlock.
|
||||
Use AsyncLazy<T> instead.</source>
|
||||
<target state="translated">Lazy<Task<T>>.Value führt unter Umständen zu einem Deadlock.
|
||||
Verwenden Sie stattdessen AsyncLazy<T>.</target>
|
||||
<target state="translated">"Lazy<Task<T>>.Value" führt unter Umständen zu einem Deadlock.
|
||||
Verwenden Sie stattdessen "AsyncLazy<T>".</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD011_Title" translate="yes" xml:space="preserve">
|
||||
<source>Avoid using Lazy<it id="1" pos="open"><T></it> where T is a Task<it id="2" pos="open"><T2></it></source>
|
||||
<target state="translated">Die Verwendung von Lazy<it id="1" pos="open"><T></it> vermeiden, wenn T ein Task<it id="2" pos="open"><T2></it> ist</target>
|
||||
<source>Use AsyncLazy<it id="1" pos="open"><T></it></source>
|
||||
<target state="translated">"AsyncLazy<it id="1" pos="open"><T></it>" verwenden</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD103_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>{0} synchronously blocks. Await {1} instead.</source>
|
||||
|
@ -93,7 +93,7 @@ Verwenden Sie stattdessen AsyncLazy<T>.</target>
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD102_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Limit use of synchronously blocking method calls such as JoinableTaskFactory.Run or Task.Result to public entrypoint members where you must be synchronous. Using it for internal members can needlessly add synchronous frames between asynchronous frames, leading to threadpool exhaustion.</source>
|
||||
<target state="translated">Beschränken Sie die Verwendung synchron blockierender Methodenaufrufe wie JoinableTaskFactory.Run oder Task.Result auf öffentliche Einstiegspunktmitglieder, bei denen Sie synchron sein müssen. Wenn Sie sie für interne Mitglieder verwenden, werden asynchronen Frames unter Umständen unnötigerweise synchrone Frames hinzugefügt, was zu einer Auslastung des Threadpools führt.</target>
|
||||
<target state="translated">Beschränken Sie die Verwendung synchron blockierender Methodenaufrufe wie "JoinableTaskFactory.Run" oder "Task.Result" auf öffentliche Einstiegspunktmitglieder, bei denen Sie synchron sein müssen. Wenn Sie sie für interne Mitglieder verwenden, werden asynchronen Frames unter Umständen unnötigerweise synchrone Frames hinzugefügt, was zu einer Auslastung des Threadpools führt.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD102_Title" translate="yes" xml:space="preserve">
|
||||
<source>Implement internal logic asynchronously</source>
|
||||
|
@ -114,7 +114,7 @@ Verwenden Sie stattdessen AsyncLazy<T>.</target>
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD105_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Avoid method overloads that assume TaskScheduler.Current. Use an overload that accepts a TaskScheduler and specify TaskScheduler.Default (or any other) explicitly.</source>
|
||||
<target state="translated">Vermeiden Sie Methodenüberladungen, die TaskScheduler.Current annehmen. Verwenden Sie eine Überladung, die einen TaskScheduler akzeptiert, und geben Sie explizit TaskScheduler.Default (o. a.) an.</target>
|
||||
<target state="translated">Vermeiden Sie Methodenüberladungen, die "TaskScheduler.Current" annehmen. Verwenden Sie eine Überladung, die einen TaskScheduler akzeptiert, und geben Sie explizit "TaskScheduler.Default" (o. a.) an.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD105_Title" translate="yes" xml:space="preserve">
|
||||
<source>Avoid method overloads that assume TaskScheduler.Current</source>
|
||||
|
@ -135,7 +135,7 @@ Verwenden Sie stattdessen AsyncLazy<T>.</target>
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD104_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Expose an async version of this method that does not synchronously block. Then simplify this method to call that async method within a JoinableTaskFactory.Run delegate.</source>
|
||||
<target state="translated">Machen Sie eine async-Version dieser Methode verfügbar, die nicht synchron blockiert. Vereinfachen Sie dann diese Methode so, dass sie diese asynchrone Methode innerhalb eines JoinableTaskFactory.Run-Delegats aufruft.</target>
|
||||
<target state="translated">Machen Sie eine asynchrone Version dieser Methode verfügbar, die nicht synchron blockiert. Vereinfachen Sie diese Methode anschließend, um die asynchrone Methode innerhalb eines Delegaten vom Typ "JoinableTaskFactory.Run" aufzurufen.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD104_Title" translate="yes" xml:space="preserve">
|
||||
<source>Offer async methods</source>
|
||||
|
@ -180,38 +180,44 @@ Verwenden Sie stattdessen AsyncLazy<T>.</target>
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD109_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Avoid throwing when not on the main thread while in an async or Task-returning method. Switch to the thread required instead.</source>
|
||||
<target state="new">Avoid throwing when not on the main thread while in an async or Task-returning method. Switch to the thread required instead.</target>
|
||||
<target state="translated">Vermeiden Sie eine Auslösung in einer asynchronen Methode oder einer Methode mit Aufgabenrückgabe, sofern Sie sich nicht im Hauptthread befinden. Wechseln Sie stattdessen zum benötigten Thread.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD109_Title" translate="yes" xml:space="preserve">
|
||||
<source>Switch instead of assert in async methods</source>
|
||||
<target state="new">Switch instead of assert in async methods</target>
|
||||
<target state="translated">"switch" anstelle von "assert" in asynchronen Methoden</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD010_MessageFormat_Sync" translate="yes" xml:space="preserve">
|
||||
<source>Accessing "{0}" should only be done on the main thread. Call {1}() first.</source>
|
||||
<target state="new">Accessing "{0}" should only be done on the main thread. Call {1}() first.</target>
|
||||
<target state="translated">Der Zugriff auf "{0}" sollte nur im Hauptthread erfolgen. Rufen Sie zuerst "{1}()" auf.</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">{0} is a type or member name and {1} is the name of a method that throws if not called from the main thread.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD010_MessageFormat_Async" translate="yes" xml:space="preserve">
|
||||
<source>Accessing "{0}" should only be done on the main thread. Await JoinableTaskFactory.SwitchToMainThreadAsync() first.</source>
|
||||
<target state="new">Accessing "{0}" should only be done on the main thread. Await JoinableTaskFactory.SwitchToMainThreadAsync() first.</target>
|
||||
<target state="translated">Der Zugriff auf "{0}" sollte nur im Hauptthread erfolgen.
|
||||
Warten Sie zuerst auf "JoinableTaskFactory.SwitchToMainThreadAsync()".</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">{0} is a type or member name.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD004_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Calls to JoinableTaskFactory.SwitchToMainThreadAsync() must be awaited.</source>
|
||||
<target state="new">Calls to JoinableTaskFactory.SwitchToMainThreadAsync() must be awaited.</target>
|
||||
<target state="translated">Aufrufe an "JoinableTaskFactory.SwitchToMainThreadAsync()" müssen mit "await" abgewartet werden.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD004_Title" translate="yes" xml:space="preserve">
|
||||
<source>Await SwitchToMainThreadAsync</source>
|
||||
<target state="new">Await SwitchToMainThreadAsync</target>
|
||||
<target state="translated">Await SwitchToMainThreadAsync</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">Do not translate either of these. The first is a keyword, the second is a method name.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD110_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Observe the awaitable result of this method call by awaiting it, assigning to a variable, or passing it to another method.</source>
|
||||
<target state="new">Observe the awaitable result of this method call by awaiting it, assigning to a variable, or passing it to another method.</target>
|
||||
<target state="translated">Überwachen Sie das zu erwartende Ergebnis dieses Methodenaufrufs mit "await", weisen Sie es einer Variablen zu, oder übergeben Sie es an eine andere Methode.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD110_Title" translate="yes" xml:space="preserve">
|
||||
<source>Observe result of async calls</source>
|
||||
<target state="new">Observe result of async calls</target>
|
||||
<target state="translated">Ergebnis asynchroner Aufrufe überwachen</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD011b_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Invoking or blocking on async code in a Lazy<it id="1" pos="open"><T></it> value factory can deadlock.
|
||||
Use AsyncLazy<it id="2" pos="open"><T></it> instead.</source>
|
||||
<target state="translated">Das Aufrufen oder Blockieren von asynchronem Code in einer Lazy<it id="1" pos="open"><T></it>-Wertfactory kann zu einem Deadlock führen. Verwenden Sie stattdessen "AsyncLazy<it id="2" pos="open"><T></it>".</target>
|
||||
</trans-unit>
|
||||
</group>
|
||||
</body>
|
||||
|
|
|
@ -76,8 +76,8 @@ Use AsyncLazy<T> instead.</source>
|
|||
Use AsyncLazy<T> en su lugar.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD011_Title" translate="yes" xml:space="preserve">
|
||||
<source>Avoid using Lazy<it id="1" pos="open"><T></it> where T is a Task<it id="2" pos="open"><T2></it></source>
|
||||
<target state="translated">Evite el uso de Lazy<it id="1" pos="open"><T></it> donde T es Task<it id="2" pos="open"><T2></it></target>
|
||||
<source>Use AsyncLazy<it id="1" pos="open"><T></it></source>
|
||||
<target state="translated">Uso de AsyncLazy<it id="1" pos="open"><T></it></target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD103_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>{0} synchronously blocks. Await {1} instead.</source>
|
||||
|
@ -135,7 +135,7 @@ Use AsyncLazy<T> en su lugar.</target>
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD104_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Expose an async version of this method that does not synchronously block. Then simplify this method to call that async method within a JoinableTaskFactory.Run delegate.</source>
|
||||
<target state="translated">Exponga una versión asincrónica de este método que no bloquee sincrónicamente. Luego simplifique este método para llamar a ese método asincrónico con un delegado JoinableTaskFactory.Run.</target>
|
||||
<target state="translated">Exponga una versión asincrónica de este método que no cause bloqueo de manera sincrónica. A continuación, simplifique este método para llamar a ese método asincrónico dentro de un delegado JoinableTaskFactory.Run.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD104_Title" translate="yes" xml:space="preserve">
|
||||
<source>Offer async methods</source>
|
||||
|
@ -180,38 +180,44 @@ Use AsyncLazy<T> en su lugar.</target>
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD109_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Avoid throwing when not on the main thread while in an async or Task-returning method. Switch to the thread required instead.</source>
|
||||
<target state="new">Avoid throwing when not on the main thread while in an async or Task-returning method. Switch to the thread required instead.</target>
|
||||
<target state="translated">Evite lanzar cuando no esté en el subproceso principal durante un método asincrónico o que devuelve tareas. Cambie en su lugar al subproceso requerido.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD109_Title" translate="yes" xml:space="preserve">
|
||||
<source>Switch instead of assert in async methods</source>
|
||||
<target state="new">Switch instead of assert in async methods</target>
|
||||
<target state="translated">Cambiar en lugar de declarar en métodos asincrónicos</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD010_MessageFormat_Sync" translate="yes" xml:space="preserve">
|
||||
<source>Accessing "{0}" should only be done on the main thread. Call {1}() first.</source>
|
||||
<target state="new">Accessing "{0}" should only be done on the main thread. Call {1}() first.</target>
|
||||
<target state="translated">El acceso a "{0}" solo se debe realizar en el subproceso principal. Llame primero a {1}().</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">{0} is a type or member name and {1} is the name of a method that throws if not called from the main thread.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD010_MessageFormat_Async" translate="yes" xml:space="preserve">
|
||||
<source>Accessing "{0}" should only be done on the main thread. Await JoinableTaskFactory.SwitchToMainThreadAsync() first.</source>
|
||||
<target state="new">Accessing "{0}" should only be done on the main thread. Await JoinableTaskFactory.SwitchToMainThreadAsync() first.</target>
|
||||
<target state="translated">El acceso a "{0}" solo se debe realizar en el subproceso principal. Espere primero a JoinableTaskFactory.SwitchToMainThreadAsync().</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">{0} is a type or member name.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD004_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Calls to JoinableTaskFactory.SwitchToMainThreadAsync() must be awaited.</source>
|
||||
<target state="new">Calls to JoinableTaskFactory.SwitchToMainThreadAsync() must be awaited.</target>
|
||||
<target state="translated">Se deben esperar las llamadas a JoinableTaskFactory.SwitchToMainThreadAsync().</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD004_Title" translate="yes" xml:space="preserve">
|
||||
<source>Await SwitchToMainThreadAsync</source>
|
||||
<target state="new">Await SwitchToMainThreadAsync</target>
|
||||
<target state="translated">Esperar a SwitchToMainThreadAsync</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">Do not translate either of these. The first is a keyword, the second is a method name.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD110_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Observe the awaitable result of this method call by awaiting it, assigning to a variable, or passing it to another method.</source>
|
||||
<target state="new">Observe the awaitable result of this method call by awaiting it, assigning to a variable, or passing it to another method.</target>
|
||||
<target state="translated">Observe el resultado que se puede esperar de esta llamada a método cuando se espera, se asigna a una variable o se pasa a otro método.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD110_Title" translate="yes" xml:space="preserve">
|
||||
<source>Observe result of async calls</source>
|
||||
<target state="new">Observe result of async calls</target>
|
||||
<target state="translated">Observar resultado de llamadas asincrónicas</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD011b_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Invoking or blocking on async code in a Lazy<it id="1" pos="open"><T></it> value factory can deadlock.
|
||||
Use AsyncLazy<it id="2" pos="open"><T></it> instead.</source>
|
||||
<target state="translated">Invocar o bloquear en código asincrónico en un generador de valores Lazy<it id="1" pos="open"><T></it> puede provocar interbloqueos.
|
||||
Use en su lugar AsyncLazy<it id="2" pos="open"><T></it>.</target>
|
||||
</trans-unit>
|
||||
</group>
|
||||
</body>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD002_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Synchronously waiting on tasks or awaiters may cause deadlocks. Use await or JoinableTaskFactory.Run instead.</source>
|
||||
<target state="translated">L’attente de manière synchrone de tâches ou d’éléments en attente peut entraîner des blocages. Utilisez await ou JoinableTaskFactory.Run à la place.</target>
|
||||
<target state="translated">L'attente de manière synchrone de tâches ou d’éléments en attente peut entraîner des blocages. Utilisez await ou JoinableTaskFactory.Run à la place.</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">"await" is a C# keyword and should not be translated.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD002_Title" translate="yes" xml:space="preserve">
|
||||
|
@ -76,8 +76,8 @@ Use AsyncLazy<T> instead.</source>
|
|||
Utilisez AsyncLazy<T> à la place</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD011_Title" translate="yes" xml:space="preserve">
|
||||
<source>Avoid using Lazy<it id="1" pos="open"><T></it> where T is a Task<it id="2" pos="open"><T2></it></source>
|
||||
<target state="translated">Éviter d’utiliser Lazy<it id="1" pos="open"><T></it> si T est une tâche<it id="2" pos="open"><T2></it></target>
|
||||
<source>Use AsyncLazy<it id="1" pos="open"><T></it></source>
|
||||
<target state="translated">Utiliser AsyncLazy<it id="1" pos="open"><T></it></target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD103_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>{0} synchronously blocks. Await {1} instead.</source>
|
||||
|
@ -93,7 +93,7 @@ Utilisez AsyncLazy<T> à la place</target>
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD102_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Limit use of synchronously blocking method calls such as JoinableTaskFactory.Run or Task.Result to public entrypoint members where you must be synchronous. Using it for internal members can needlessly add synchronous frames between asynchronous frames, leading to threadpool exhaustion.</source>
|
||||
<target state="translated">Limitez l’utilisation des appels de méthode de blocage synchrones, comme JoinableTaskFactory.Run ou Task.Result, aux membres de point d’entrée publics où il est nécessaire d’être synchrone. Son utilisation pour des membres internes peut inutilement ajouter des frames synchrones entre les frames asynchrones, provoquant l’épuisement du pool de threads.</target>
|
||||
<target state="translated">Limitez l'utilisation des appels de méthode de blocage synchrones, comme JoinableTaskFactory.Run ou Task.Result, aux membres de point d’entrée publics où il est nécessaire d’être synchrone. Son utilisation pour des membres internes peut inutilement ajouter des frames synchrones entre les frames asynchrones, provoquant l'épuisement du pool de threads.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD102_Title" translate="yes" xml:space="preserve">
|
||||
<source>Implement internal logic asynchronously</source>
|
||||
|
@ -135,7 +135,7 @@ Utilisez AsyncLazy<T> à la place</target>
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD104_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Expose an async version of this method that does not synchronously block. Then simplify this method to call that async method within a JoinableTaskFactory.Run delegate.</source>
|
||||
<target state="translated">Exposez une version async de cette méthode qui ne se bloque pas de façon synchrone. Ensuite, simplifiez cette méthode pour appeler la méthode async au sein d’un délégué JoinableTaskFactory.Run.</target>
|
||||
<target state="translated">Exposez une version asynchrone de cette méthode qui ne se bloque pas de manière synchrone. Ensuite, simplifiez cette méthode pour appeler cette méthode async dans un délégué JoinableTaskFactory.Run.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD104_Title" translate="yes" xml:space="preserve">
|
||||
<source>Offer async methods</source>
|
||||
|
@ -180,38 +180,44 @@ Utilisez AsyncLazy<T> à la place</target>
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD109_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Avoid throwing when not on the main thread while in an async or Task-returning method. Switch to the thread required instead.</source>
|
||||
<target state="new">Avoid throwing when not on the main thread while in an async or Task-returning method. Switch to the thread required instead.</target>
|
||||
<target state="translated">Évitez toute levée quand vous n'êtes pas sur the thread principal dans une méthode retournant async ou Task. Basculez plutôt sur le thread requis.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD109_Title" translate="yes" xml:space="preserve">
|
||||
<source>Switch instead of assert in async methods</source>
|
||||
<target state="new">Switch instead of assert in async methods</target>
|
||||
<target state="translated">Basculer sur des méthodes async plutôt qu'assert</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD010_MessageFormat_Sync" translate="yes" xml:space="preserve">
|
||||
<source>Accessing "{0}" should only be done on the main thread. Call {1}() first.</source>
|
||||
<target state="new">Accessing "{0}" should only be done on the main thread. Call {1}() first.</target>
|
||||
<target state="translated">L'accès à "{0}" doit être uniquement effectué sur le thread principal. Appelez d'abord {1}().</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">{0} is a type or member name and {1} is the name of a method that throws if not called from the main thread.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD010_MessageFormat_Async" translate="yes" xml:space="preserve">
|
||||
<source>Accessing "{0}" should only be done on the main thread. Await JoinableTaskFactory.SwitchToMainThreadAsync() first.</source>
|
||||
<target state="new">Accessing "{0}" should only be done on the main thread. Await JoinableTaskFactory.SwitchToMainThreadAsync() first.</target>
|
||||
<target state="translated">L'accès à "{0}" doit être uniquement effectué sur le thread principal. Attendez d'abord JoinableTaskFactory.SwitchToMainThreadAsync().</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">{0} is a type or member name.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD004_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Calls to JoinableTaskFactory.SwitchToMainThreadAsync() must be awaited.</source>
|
||||
<target state="new">Calls to JoinableTaskFactory.SwitchToMainThreadAsync() must be awaited.</target>
|
||||
<target state="translated">Vous devez attendre les appels à JoinableTaskFactory.SwitchToMainThreadAsync().</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD004_Title" translate="yes" xml:space="preserve">
|
||||
<source>Await SwitchToMainThreadAsync</source>
|
||||
<target state="new">Await SwitchToMainThreadAsync</target>
|
||||
<target state="translated">Attendre SwitchToMainThreadAsync</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">Do not translate either of these. The first is a keyword, the second is a method name.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD110_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Observe the awaitable result of this method call by awaiting it, assigning to a variable, or passing it to another method.</source>
|
||||
<target state="new">Observe the awaitable result of this method call by awaiting it, assigning to a variable, or passing it to another method.</target>
|
||||
<target state="translated">Observez le résultat pouvant être attendu de cet appel de méthode en l'attendant, en l'assignant à une variable ou en le passant à une autre méthode.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD110_Title" translate="yes" xml:space="preserve">
|
||||
<source>Observe result of async calls</source>
|
||||
<target state="new">Observe result of async calls</target>
|
||||
<target state="translated">Observer le résultat des appels async</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD011b_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Invoking or blocking on async code in a Lazy<it id="1" pos="open"><T></it> value factory can deadlock.
|
||||
Use AsyncLazy<it id="2" pos="open"><T></it> instead.</source>
|
||||
<target state="translated">Les appels ou blocages sur le code async dans une fabrique de valeurs Lazy<it id="1" pos="open"><T></it> peuvent faire l'objet d'un interblocage.
|
||||
Utilisez plutôt AsyncLazy<it id="2" pos="open"><T></it>.</target>
|
||||
</trans-unit>
|
||||
</group>
|
||||
</body>
|
||||
|
|
|
@ -76,12 +76,12 @@ Use AsyncLazy<T> instead.</source>
|
|||
In alternativa, usare AsyncLazy<T>.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD011_Title" translate="yes" xml:space="preserve">
|
||||
<source>Avoid using Lazy<it id="1" pos="open"><T></it> where T is a Task<it id="2" pos="open"><T2></it></source>
|
||||
<target state="translated">Evitare di usare Lazy<it id="1" pos="open"><T></it> in cui T è un elemento Task<it id="2" pos="open"><T2></it></target>
|
||||
<source>Use AsyncLazy<it id="1" pos="open"><T></it></source>
|
||||
<target state="translated">Usa AsyncLazy<it id="1" pos="open"><T></it></target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD103_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>{0} synchronously blocks. Await {1} instead.</source>
|
||||
<target state="translated">{0} si blocca in modalità sincrona. In alternativa, attendere {1}.</target>
|
||||
<target state="translated">{0} si blocca in modalità sincrona. In alternativa, usare await {1}.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD103_MessageFormat_UseAwaitInstead" translate="yes" xml:space="preserve">
|
||||
<source>{0} synchronously blocks. Use await instead.</source>
|
||||
|
@ -180,38 +180,44 @@ In alternativa, usare AsyncLazy<T>.</target>
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD109_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Avoid throwing when not on the main thread while in an async or Task-returning method. Switch to the thread required instead.</source>
|
||||
<target state="new">Avoid throwing when not on the main thread while in an async or Task-returning method. Switch to the thread required instead.</target>
|
||||
<target state="translated">Evitare la generazione quando non si è in un thread principale durante un metodo asincrono o che restituisce elementi Task. In alternativa, passare al thread richiesto.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD109_Title" translate="yes" xml:space="preserve">
|
||||
<source>Switch instead of assert in async methods</source>
|
||||
<target state="new">Switch instead of assert in async methods</target>
|
||||
<target state="translated">Usa switch invece di assert in metodi asincroni</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD010_MessageFormat_Sync" translate="yes" xml:space="preserve">
|
||||
<source>Accessing "{0}" should only be done on the main thread. Call {1}() first.</source>
|
||||
<target state="new">Accessing "{0}" should only be done on the main thread. Call {1}() first.</target>
|
||||
<target state="translated">L'accesso a "{0}" deve essere effettuato solo nel thread principale. Chiamare prima {1}().</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">{0} is a type or member name and {1} is the name of a method that throws if not called from the main thread.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD010_MessageFormat_Async" translate="yes" xml:space="preserve">
|
||||
<source>Accessing "{0}" should only be done on the main thread. Await JoinableTaskFactory.SwitchToMainThreadAsync() first.</source>
|
||||
<target state="new">Accessing "{0}" should only be done on the main thread. Await JoinableTaskFactory.SwitchToMainThreadAsync() first.</target>
|
||||
<target state="translated">L'accesso a "{0}" deve essere effettuato solo nel thread principale. Usare prima await JoinableTaskFactory.SwitchToMainThreadAsync().</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">{0} is a type or member name.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD004_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Calls to JoinableTaskFactory.SwitchToMainThreadAsync() must be awaited.</source>
|
||||
<target state="new">Calls to JoinableTaskFactory.SwitchToMainThreadAsync() must be awaited.</target>
|
||||
<target state="translated">Con le chiamate a JoinableTaskFactory.SwitchToMainThreadAsync() è necessario usare await.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD004_Title" translate="yes" xml:space="preserve">
|
||||
<source>Await SwitchToMainThreadAsync</source>
|
||||
<target state="new">Await SwitchToMainThreadAsync</target>
|
||||
<target state="translated">Usa await SwitchToMainThreadAsync</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">Do not translate either of these. The first is a keyword, the second is a method name.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD110_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Observe the awaitable result of this method call by awaiting it, assigning to a variable, or passing it to another method.</source>
|
||||
<target state="new">Observe the awaitable result of this method call by awaiting it, assigning to a variable, or passing it to another method.</target>
|
||||
<target state="translated">Per osservare il risultato awaitable di questa chiamata al metodo, usare await per la chiamata, assegnarla a una variabile o passarla a un altro metodo.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD110_Title" translate="yes" xml:space="preserve">
|
||||
<source>Observe result of async calls</source>
|
||||
<target state="new">Observe result of async calls</target>
|
||||
<target state="translated">Osserva il risultato di chiamate asincrone</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD011b_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Invoking or blocking on async code in a Lazy<it id="1" pos="open"><T></it> value factory can deadlock.
|
||||
Use AsyncLazy<it id="2" pos="open"><T></it> instead.</source>
|
||||
<target state="translated">La chiamata o il blocco su codice asincrono in una factory di valori Lazy<it id="1" pos="open"><T></it> può causare un deadlock.
|
||||
In alternativa, usare AsyncLazy<it id="2" pos="open"><T></it>.</target>
|
||||
</trans-unit>
|
||||
</group>
|
||||
</body>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD002_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Synchronously waiting on tasks or awaiters may cause deadlocks. Use await or JoinableTaskFactory.Run instead.</source>
|
||||
<target state="translated">同期的にタスクまたは待機側を待機すると、デッドロックが引き起こされる可能性があります。代わりに、await または JoinableTaskFactory.Run を使用します。</target>
|
||||
<target state="translated">同期的にタスクまたは awaiter を待機すると、デッドロックが引き起こされる可能性があります。代わりに await または JoinableTaskFactory.Run を使用してください。</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">"await" is a C# keyword and should not be translated.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD002_Title" translate="yes" xml:space="preserve">
|
||||
|
@ -73,19 +73,19 @@ You can avoid this problem by ensuring the task is initialized within the same m
|
|||
<source>Lazy<Task<T>>.Value can deadlock.
|
||||
Use AsyncLazy<T> instead.</source>
|
||||
<target state="translated">Lazy<Task<T>>.Value はデッドロックを引き起こす可能性があります。
|
||||
代わりに AsyncLazy<T> を使用します。</target>
|
||||
代わりに AsyncLazy<T> を使用してください。</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD011_Title" translate="yes" xml:space="preserve">
|
||||
<source>Avoid using Lazy<it id="1" pos="open"><T></it> where T is a Task<it id="2" pos="open"><T2></it></source>
|
||||
<target state="translated">T が Task<it id="2" pos="open"><T2></it> を表す Lazy<it id="1" pos="open"><T></it> を使用しない</target>
|
||||
<source>Use AsyncLazy<it id="1" pos="open"><T></it></source>
|
||||
<target state="translated">AsyncLazy<it id="1" pos="open"><T></it> を使用する</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD103_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>{0} synchronously blocks. Await {1} instead.</source>
|
||||
<target state="translated">{0} は同期的にブロックされます。代わりに {1} を待機します。</target>
|
||||
<target state="translated">{0} は同期的にブロックを実行します。代わりに {1} を待機してください。</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD103_MessageFormat_UseAwaitInstead" translate="yes" xml:space="preserve">
|
||||
<source>{0} synchronously blocks. Use await instead.</source>
|
||||
<target state="translated">{0} は同期的にブロックされます。代わりに Await を使用します。</target>
|
||||
<target state="translated">{0} は同期的にブロックを実行します。代わりに await を使用してください。</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD103_Title" translate="yes" xml:space="preserve">
|
||||
<source>Call async methods when in an async method</source>
|
||||
|
@ -93,7 +93,7 @@ Use AsyncLazy<T> instead.</source>
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD102_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Limit use of synchronously blocking method calls such as JoinableTaskFactory.Run or Task.Result to public entrypoint members where you must be synchronous. Using it for internal members can needlessly add synchronous frames between asynchronous frames, leading to threadpool exhaustion.</source>
|
||||
<target state="translated">JoinableTaskFactory.Run または Task.Result など、同期的にブロックしているメソッド呼び出しの使用を、同期している必要のある公開エントリポイント メンバーに限定します。内部メンバーに対して使用すると、非同期フレーム間に同期フレームが不必要に追加され、スレッドプールが消費されます。</target>
|
||||
<target state="translated">JoinableTaskFactory.Run または Task.Result など、同期的にブロックを行うメソッド呼び出しの使用は、同期が必要な公開エントリポイント メンバーに限定してください。内部メンバーに対して使用すると、非同期フレーム間に同期フレームが不必要に追加され、スレッドプールが消費されます。</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD102_Title" translate="yes" xml:space="preserve">
|
||||
<source>Implement internal logic asynchronously</source>
|
||||
|
@ -135,7 +135,7 @@ Use AsyncLazy<T> instead.</source>
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD104_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Expose an async version of this method that does not synchronously block. Then simplify this method to call that async method within a JoinableTaskFactory.Run delegate.</source>
|
||||
<target state="translated">同期的にブロックしないこのメソッドの非同期バージョンを公開します。その後、このメソッドを単純化して、JoinableTaskFactory.Run デリゲートでその非同期メソッドを呼び出します。</target>
|
||||
<target state="translated">このメソッドの、同期的にブロックしない非同期バージョンを公開してください。次に、このメソッドを単純化し、JoinableTaskFactory.Run デリゲート内でその非同期メソッドを呼び出すようにします。</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD104_Title" translate="yes" xml:space="preserve">
|
||||
<source>Offer async methods</source>
|
||||
|
@ -180,38 +180,44 @@ Use AsyncLazy<T> instead.</source>
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD109_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Avoid throwing when not on the main thread while in an async or Task-returning method. Switch to the thread required instead.</source>
|
||||
<target state="new">Avoid throwing when not on the main thread while in an async or Task-returning method. Switch to the thread required instead.</target>
|
||||
<target state="translated">非同期メソッドまたはタスクを返すメソッドでは、メイン スレッド上でない限り、スローしないでください。代わりに、必要なスレッドに切り替えてください。</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD109_Title" translate="yes" xml:space="preserve">
|
||||
<source>Switch instead of assert in async methods</source>
|
||||
<target state="new">Switch instead of assert in async methods</target>
|
||||
<target state="translated">非同期メソッドでアサートの代わりに切り替えを使用する</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD010_MessageFormat_Sync" translate="yes" xml:space="preserve">
|
||||
<source>Accessing "{0}" should only be done on the main thread. Call {1}() first.</source>
|
||||
<target state="new">Accessing "{0}" should only be done on the main thread. Call {1}() first.</target>
|
||||
<target state="translated">"{0}" へのアクセスはメイン スレッドでのみ行う必要があります。まず {1}() を呼び出します。</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">{0} is a type or member name and {1} is the name of a method that throws if not called from the main thread.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD010_MessageFormat_Async" translate="yes" xml:space="preserve">
|
||||
<source>Accessing "{0}" should only be done on the main thread. Await JoinableTaskFactory.SwitchToMainThreadAsync() first.</source>
|
||||
<target state="new">Accessing "{0}" should only be done on the main thread. Await JoinableTaskFactory.SwitchToMainThreadAsync() first.</target>
|
||||
<target state="translated">"{0}" へのアクセスはメイン スレッドでのみ行う必要があります。まず JoinableTaskFactory.SwitchToMainThreadAsync() を待機してください。</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">{0} is a type or member name.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD004_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Calls to JoinableTaskFactory.SwitchToMainThreadAsync() must be awaited.</source>
|
||||
<target state="new">Calls to JoinableTaskFactory.SwitchToMainThreadAsync() must be awaited.</target>
|
||||
<target state="translated">JoinableTaskFactory.SwitchToMainThreadAsync() への呼び出しを待機する必要があります。</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD004_Title" translate="yes" xml:space="preserve">
|
||||
<source>Await SwitchToMainThreadAsync</source>
|
||||
<target state="new">Await SwitchToMainThreadAsync</target>
|
||||
<target state="translated">SwitchToMainThreadAsync を待機する</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">Do not translate either of these. The first is a keyword, the second is a method name.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD110_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Observe the awaitable result of this method call by awaiting it, assigning to a variable, or passing it to another method.</source>
|
||||
<target state="new">Observe the awaitable result of this method call by awaiting it, assigning to a variable, or passing it to another method.</target>
|
||||
<target state="translated">このメソッド呼び出しの待機可能な結果を確認するには、それを待機するか、変数に割り当てるか、別のメソッドに渡します。</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD110_Title" translate="yes" xml:space="preserve">
|
||||
<source>Observe result of async calls</source>
|
||||
<target state="new">Observe result of async calls</target>
|
||||
<target state="translated">非同期呼び出しの結果を確認する</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD011b_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Invoking or blocking on async code in a Lazy<it id="1" pos="open"><T></it> value factory can deadlock.
|
||||
Use AsyncLazy<it id="2" pos="open"><T></it> instead.</source>
|
||||
<target state="translated">Lazy<it id="1" pos="open"><T></it> 値ファクトリの非同期コードで呼び出しかブロックを実行すると、デッドロックを引き起こす可能性があります。
|
||||
代わりに AsyncLazy<it id="2" pos="open"><T></it> をご使用ください。</target>
|
||||
</trans-unit>
|
||||
</group>
|
||||
</body>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD002_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Synchronously waiting on tasks or awaiters may cause deadlocks. Use await or JoinableTaskFactory.Run instead.</source>
|
||||
<target state="translated">작업을 동기적으로 대기합니다. 그러지 않으면 대기자가 교착 상태를 일으킬 수 있습니다. 대신 await 또는 JoinableTaskFactory.Run을 사용합니다.</target>
|
||||
<target state="translated">작업을 동기적으로 대기합니다. 그러지 않으면 대기자가 교착 상태를 일으킬 수 있습니다. 대신 await나 JoinableTaskFactory.Run을 사용합니다.</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">"await" is a C# keyword and should not be translated.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD002_Title" translate="yes" xml:space="preserve">
|
||||
|
@ -81,8 +81,8 @@ Use AsyncLazy<T> instead.</source>
|
|||
대신 AsyncLazy<T>를 사용하세요.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD011_Title" translate="yes" xml:space="preserve">
|
||||
<source>Avoid using Lazy<it id="1" pos="open"><T></it> where T is a Task<it id="2" pos="open"><T2></it></source>
|
||||
<target state="translated"><it id="1" pos="open"><T></it>T가 Task인 경우 Lazy를 사용하지 않습니다.<it id="2" pos="open"><T2></it></target>
|
||||
<source>Use AsyncLazy<it id="1" pos="open"><T></it></source>
|
||||
<target state="translated">AsyncLazy<it id="1" pos="open"><T></it> 사용</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD103_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>{0} synchronously blocks. Await {1} instead.</source>
|
||||
|
@ -135,7 +135,7 @@ Use AsyncLazy<T> instead.</source>
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD104_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Expose an async version of this method that does not synchronously block. Then simplify this method to call that async method within a JoinableTaskFactory.Run delegate.</source>
|
||||
<target state="translated">동기적으로 차단되지 않는 이 메서드의 비동기 버전을 노출합니다. 그런 다음, JoinableTaskFactory.Run 대리자 내의 해당 비동기 메서드를 호출하도록 이 메서드를 단순화합니다.</target>
|
||||
<target state="translated">동기적으로 차단되지 않는 이 메서드의 비동기 버전을 노출하세요. 그런 다음 JoinableTaskFactory.Run 대리자 내의 해당 비동기 메서드를 호출하도록 이 메서드를 단순화하세요.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD104_Title" translate="yes" xml:space="preserve">
|
||||
<source>Offer async methods</source>
|
||||
|
@ -180,38 +180,44 @@ Use AsyncLazy<T> instead.</source>
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD109_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Avoid throwing when not on the main thread while in an async or Task-returning method. Switch to the thread required instead.</source>
|
||||
<target state="new">Avoid throwing when not on the main thread while in an async or Task-returning method. Switch to the thread required instead.</target>
|
||||
<target state="translated">비동기 또는 태스크 반환 메서드에서 주 스레드에 있지 않은 경우 throw하지 않습니다. 대신 필수 스레드로 전환합니다.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD109_Title" translate="yes" xml:space="preserve">
|
||||
<source>Switch instead of assert in async methods</source>
|
||||
<target state="new">Switch instead of assert in async methods</target>
|
||||
<target state="translated">비동기 메서드에서 어설션 대신 전환</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD010_MessageFormat_Sync" translate="yes" xml:space="preserve">
|
||||
<source>Accessing "{0}" should only be done on the main thread. Call {1}() first.</source>
|
||||
<target state="new">Accessing "{0}" should only be done on the main thread. Call {1}() first.</target>
|
||||
<target state="translated">주 스레드에서만 "{0}"에 액세스해야 합니다. 우선 {1}()을(를) 호출합니다.</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">{0} is a type or member name and {1} is the name of a method that throws if not called from the main thread.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD010_MessageFormat_Async" translate="yes" xml:space="preserve">
|
||||
<source>Accessing "{0}" should only be done on the main thread. Await JoinableTaskFactory.SwitchToMainThreadAsync() first.</source>
|
||||
<target state="new">Accessing "{0}" should only be done on the main thread. Await JoinableTaskFactory.SwitchToMainThreadAsync() first.</target>
|
||||
<target state="translated">주 스레드에서만 "{0}"에 액세스해야 합니다. 우선 JoinableTaskFactory.SwitchToMainThreadAsync()를 대기합니다.</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">{0} is a type or member name.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD004_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Calls to JoinableTaskFactory.SwitchToMainThreadAsync() must be awaited.</source>
|
||||
<target state="new">Calls to JoinableTaskFactory.SwitchToMainThreadAsync() must be awaited.</target>
|
||||
<target state="translated">JoinableTaskFactory.SwitchToMainThreadAsync() 호출을 대기해야 합니다.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD004_Title" translate="yes" xml:space="preserve">
|
||||
<source>Await SwitchToMainThreadAsync</source>
|
||||
<target state="new">Await SwitchToMainThreadAsync</target>
|
||||
<target state="translated">Await SwitchToMainThreadAsync</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">Do not translate either of these. The first is a keyword, the second is a method name.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD110_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Observe the awaitable result of this method call by awaiting it, assigning to a variable, or passing it to another method.</source>
|
||||
<target state="new">Observe the awaitable result of this method call by awaiting it, assigning to a variable, or passing it to another method.</target>
|
||||
<target state="translated">이 메서드 호출을 대기하거나, 변수에 할당하거나, 다른 메서드에 전달함으로써 해당 호출의 대기할 수 있는 결과를 확인합니다.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD110_Title" translate="yes" xml:space="preserve">
|
||||
<source>Observe result of async calls</source>
|
||||
<target state="new">Observe result of async calls</target>
|
||||
<target state="translated">비동기 호출의 결과 확인</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD011b_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Invoking or blocking on async code in a Lazy<it id="1" pos="open"><T></it> value factory can deadlock.
|
||||
Use AsyncLazy<it id="2" pos="open"><T></it> instead.</source>
|
||||
<target state="translated">Lazy<it id="1" pos="open"><T></it> 값 팩터리의 비동기 코드를 호출하거나 차단하면 교착 상태가 될 수 있습니다.
|
||||
대신 AsyncLazy<it id="2" pos="open"><T></it>를 사용합니다.</target>
|
||||
</trans-unit>
|
||||
</group>
|
||||
</body>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD002_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Synchronously waiting on tasks or awaiters may cause deadlocks. Use await or JoinableTaskFactory.Run instead.</source>
|
||||
<target state="translated">Synchroniczne oczekiwanie na zadania lub elementy typu awaiter mogą powodować zakleszczenia. Zamiast tego użyj operatora await albo metody JoinableTaskFactory.Run.</target>
|
||||
<target state="translated">Synchroniczne oczekiwanie na zadania lub elementy typu awaiter mogą powodować zakleszczenia. Zamiast tego używaj metody await lub JoinableTaskFactory.Run.</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">"await" is a C# keyword and should not be translated.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD002_Title" translate="yes" xml:space="preserve">
|
||||
|
@ -76,8 +76,8 @@ Use AsyncLazy<T> instead.</source>
|
|||
Zamiast tego używaj klasy AsyncLazy<T>.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD011_Title" translate="yes" xml:space="preserve">
|
||||
<source>Avoid using Lazy<it id="1" pos="open"><T></it> where T is a Task<it id="2" pos="open"><T2></it></source>
|
||||
<target state="translated">Unikaj używania klasy Lazy<it id="1" pos="open"><T></it>, jeśli T jest obiektem Task<it id="2" pos="open"><T2></it></target>
|
||||
<source>Use AsyncLazy<it id="1" pos="open"><T></it></source>
|
||||
<target state="translated">Użyj metody AsyncLazy<it id="1" pos="open"><T></it></target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD103_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>{0} synchronously blocks. Await {1} instead.</source>
|
||||
|
@ -135,7 +135,7 @@ Zamiast tego używaj klasy AsyncLazy<T>.</target>
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD104_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Expose an async version of this method that does not synchronously block. Then simplify this method to call that async method within a JoinableTaskFactory.Run delegate.</source>
|
||||
<target state="translated">Uwidocznij asynchroniczną wersję tej metody, która nie powoduje blokowania synchronicznego. Następnie uprość tę metodę w celu wywoływania tej metody asynchronicznej w ramach delegata JoinableTaskFactory.Run.</target>
|
||||
<target state="translated">Uwidocznij asynchroniczną wersję tej metody, która nie powoduje synchronicznego blokowania. Następnie uprość tę metodę, aby wywołać tę metodę asynchroniczną w ramach delegata JoinableTaskFactory.Run.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD104_Title" translate="yes" xml:space="preserve">
|
||||
<source>Offer async methods</source>
|
||||
|
@ -180,38 +180,44 @@ Zamiast tego używaj klasy AsyncLazy<T>.</target>
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD109_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Avoid throwing when not on the main thread while in an async or Task-returning method. Switch to the thread required instead.</source>
|
||||
<target state="new">Avoid throwing when not on the main thread while in an async or Task-returning method. Switch to the thread required instead.</target>
|
||||
<target state="translated">Unikaj zgłaszania poza wątkiem głównym w metodzie asynchronicznej lub zwracającej element Task. Zamiast tego przełącz się na wymagany wątek.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD109_Title" translate="yes" xml:space="preserve">
|
||||
<source>Switch instead of assert in async methods</source>
|
||||
<target state="new">Switch instead of assert in async methods</target>
|
||||
<target state="translated">Przełączanie zamiast asercji w metodach asynchronicznych</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD010_MessageFormat_Sync" translate="yes" xml:space="preserve">
|
||||
<source>Accessing "{0}" should only be done on the main thread. Call {1}() first.</source>
|
||||
<target state="new">Accessing "{0}" should only be done on the main thread. Call {1}() first.</target>
|
||||
<target state="translated">Dostęp do metody „{0}” powinien być uzyskiwany tylko z wątku głównego. Najpierw wywołaj metodę {1}().</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">{0} is a type or member name and {1} is the name of a method that throws if not called from the main thread.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD010_MessageFormat_Async" translate="yes" xml:space="preserve">
|
||||
<source>Accessing "{0}" should only be done on the main thread. Await JoinableTaskFactory.SwitchToMainThreadAsync() first.</source>
|
||||
<target state="new">Accessing "{0}" should only be done on the main thread. Await JoinableTaskFactory.SwitchToMainThreadAsync() first.</target>
|
||||
<target state="translated">Dostęp do metody „{0}” powinien być uzyskiwany tylko z wątku głównego. Najpierw zaczekaj na metodę JoinableTaskFactory.SwitchToMainThreadAsync().</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">{0} is a type or member name.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD004_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Calls to JoinableTaskFactory.SwitchToMainThreadAsync() must be awaited.</source>
|
||||
<target state="new">Calls to JoinableTaskFactory.SwitchToMainThreadAsync() must be awaited.</target>
|
||||
<target state="translated">Należy zaczekać na wywołania metody JoinableTaskFactory.SwitchToMainThreadAsync().</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD004_Title" translate="yes" xml:space="preserve">
|
||||
<source>Await SwitchToMainThreadAsync</source>
|
||||
<target state="new">Await SwitchToMainThreadAsync</target>
|
||||
<target state="translated">Zaczekaj na metodę SwitchToMainThreadAsync</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">Do not translate either of these. The first is a keyword, the second is a method name.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD110_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Observe the awaitable result of this method call by awaiting it, assigning to a variable, or passing it to another method.</source>
|
||||
<target state="new">Observe the awaitable result of this method call by awaiting it, assigning to a variable, or passing it to another method.</target>
|
||||
<target state="translated">Obserwuj wynik typu awaitable wywołania tej metody, oczekując na niego, przypisując go do zmiennej lub przekazując do innej metody.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD110_Title" translate="yes" xml:space="preserve">
|
||||
<source>Observe result of async calls</source>
|
||||
<target state="new">Observe result of async calls</target>
|
||||
<target state="translated">Obserwuj wynik wywołań asynchronicznych</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD011b_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Invoking or blocking on async code in a Lazy<it id="1" pos="open"><T></it> value factory can deadlock.
|
||||
Use AsyncLazy<it id="2" pos="open"><T></it> instead.</source>
|
||||
<target state="translated">Wywołanie kodu asynchronicznego lub zablokowanie na nim w fabryce wartości Lazy<it id="1" pos="open"><T></it> może spowodować zakleszczenie.
|
||||
Zamiast tego użyj elementu AsyncLazy<it id="2" pos="open"><T></it>.</target>
|
||||
</trans-unit>
|
||||
</group>
|
||||
</body>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD002_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Synchronously waiting on tasks or awaiters may cause deadlocks. Use await or JoinableTaskFactory.Run instead.</source>
|
||||
<target state="translated">Esperar de forma síncrona por tarefas ou awaiters podem causar deadlocks. Em vez disso, use await ou JoinableTaskFactory.Run.</target>
|
||||
<target state="translated">Esperar de forma síncrona por tarefas ou awaiters pode causar deadlocks. Em vez disso, use await ou JoinableTaskFactory.Run.</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">"await" is a C# keyword and should not be translated.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD002_Title" translate="yes" xml:space="preserve">
|
||||
|
@ -76,8 +76,8 @@ Use AsyncLazy<T> instead.</source>
|
|||
Em vez disso, use AsyncLazy<T>.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD011_Title" translate="yes" xml:space="preserve">
|
||||
<source>Avoid using Lazy<it id="1" pos="open"><T></it> where T is a Task<it id="2" pos="open"><T2></it></source>
|
||||
<target state="translated">Evite usar Lazy<it id="1" pos="open"><T></it>, no qual T é uma Task<it id="2" pos="open"><T2></it></target>
|
||||
<source>Use AsyncLazy<it id="1" pos="open"><T></it></source>
|
||||
<target state="translated">Usar AsyncLazy<it id="1" pos="open"><T></it></target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD103_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>{0} synchronously blocks. Await {1} instead.</source>
|
||||
|
@ -135,7 +135,7 @@ Em vez disso, use AsyncLazy<T>.</target>
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD104_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Expose an async version of this method that does not synchronously block. Then simplify this method to call that async method within a JoinableTaskFactory.Run delegate.</source>
|
||||
<target state="translated">Exponha uma versão assíncrona deste método que não seja bloqueada de forma síncrona. Em seguida, simplifique este método para chamar o método assíncrono em um delegado JoinableTaskFactory.Run.</target>
|
||||
<target state="translated">Exporte uma versão assíncrona desse método que não bloqueia de forma síncrona. Em seguida, simplifique esse método para chamar esse método assíncrono em um delegado JoinableTaskFactory.Run.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD104_Title" translate="yes" xml:space="preserve">
|
||||
<source>Offer async methods</source>
|
||||
|
@ -180,38 +180,44 @@ Em vez disso, use AsyncLazy<T>.</target>
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD109_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Avoid throwing when not on the main thread while in an async or Task-returning method. Switch to the thread required instead.</source>
|
||||
<target state="new">Avoid throwing when not on the main thread while in an async or Task-returning method. Switch to the thread required instead.</target>
|
||||
<target state="translated">Evite lançar quando não estiver no thread principal enquanto estiver em um método assíncrono ou de Retorno de tarefa. Mude para o thread necessário em vez disso.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD109_Title" translate="yes" xml:space="preserve">
|
||||
<source>Switch instead of assert in async methods</source>
|
||||
<target state="new">Switch instead of assert in async methods</target>
|
||||
<target state="translated">Mude em vez de declarar em métodos assíncronos</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD010_MessageFormat_Sync" translate="yes" xml:space="preserve">
|
||||
<source>Accessing "{0}" should only be done on the main thread. Call {1}() first.</source>
|
||||
<target state="new">Accessing "{0}" should only be done on the main thread. Call {1}() first.</target>
|
||||
<target state="translated">O acesso a "{0}" deve ser realizado somente no thread principal. Chame {1}() primeiro.</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">{0} is a type or member name and {1} is the name of a method that throws if not called from the main thread.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD010_MessageFormat_Async" translate="yes" xml:space="preserve">
|
||||
<source>Accessing "{0}" should only be done on the main thread. Await JoinableTaskFactory.SwitchToMainThreadAsync() first.</source>
|
||||
<target state="new">Accessing "{0}" should only be done on the main thread. Await JoinableTaskFactory.SwitchToMainThreadAsync() first.</target>
|
||||
<target state="translated">O acesso a "{0}" deve ser realizado somente no thread principal. Aguarde JoinableTaskFactory.SwitchToMainThreadAsync() primeiro.</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">{0} is a type or member name.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD004_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Calls to JoinableTaskFactory.SwitchToMainThreadAsync() must be awaited.</source>
|
||||
<target state="new">Calls to JoinableTaskFactory.SwitchToMainThreadAsync() must be awaited.</target>
|
||||
<target state="translated">Chamadas a JoinableTaskFactory.SwitchToMainThreadAsync() devem ser aguardadas.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD004_Title" translate="yes" xml:space="preserve">
|
||||
<source>Await SwitchToMainThreadAsync</source>
|
||||
<target state="new">Await SwitchToMainThreadAsync</target>
|
||||
<target state="translated">Aguarde SwitchToMainThreadAsync</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">Do not translate either of these. The first is a keyword, the second is a method name.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD110_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Observe the awaitable result of this method call by awaiting it, assigning to a variable, or passing it to another method.</source>
|
||||
<target state="new">Observe the awaitable result of this method call by awaiting it, assigning to a variable, or passing it to another method.</target>
|
||||
<target state="translated">Observe o resultado esperável dessa chamada de método aguardando-o, atribuindo-o a uma variável ou passando-o a outro método.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD110_Title" translate="yes" xml:space="preserve">
|
||||
<source>Observe result of async calls</source>
|
||||
<target state="new">Observe result of async calls</target>
|
||||
<target state="translated">Observe o resultado das chamadas assíncronas</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD011b_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Invoking or blocking on async code in a Lazy<it id="1" pos="open"><T></it> value factory can deadlock.
|
||||
Use AsyncLazy<it id="2" pos="open"><T></it> instead.</source>
|
||||
<target state="translated">A invocação ou bloqueio em código assíncrono em um alocador de valor Lazy<it id="1" pos="open"><T></it> pode causar um deadlock.
|
||||
Use AsyncLazy<it id="2" pos="open"><T></it> em vez disso.</target>
|
||||
</trans-unit>
|
||||
</group>
|
||||
</body>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD002_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Synchronously waiting on tasks or awaiters may cause deadlocks. Use await or JoinableTaskFactory.Run instead.</source>
|
||||
<target state="translated">Синхронное ожидание задач или объектов awaiter может вызвать взаимоблокировки. Вместо этого используйте await или JoinableTaskFactory.Run.</target>
|
||||
<target state="translated">Синхронное ожидание задач или объектов awaiter может приводить к взаимоблокировкам. Используйте вместо этого await или JoinableTaskFactory.Run.</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">"await" is a C# keyword and should not be translated.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD002_Title" translate="yes" xml:space="preserve">
|
||||
|
@ -76,8 +76,8 @@ Use AsyncLazy<T> instead.</source>
|
|||
Вместо этого используйте AsyncLazy<T>.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD011_Title" translate="yes" xml:space="preserve">
|
||||
<source>Avoid using Lazy<it id="1" pos="open"><T></it> where T is a Task<it id="2" pos="open"><T2></it></source>
|
||||
<target state="translated">Не используйте Lazy<it id="1" pos="open"><T></it>, где T — объект Task<it id="2" pos="open"><T2></it></target>
|
||||
<source>Use AsyncLazy<it id="1" pos="open"><T></it></source>
|
||||
<target state="translated">Используйте AsyncLazy<it id="1" pos="open"><T></it></target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD103_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>{0} synchronously blocks. Await {1} instead.</source>
|
||||
|
@ -93,7 +93,7 @@ Use AsyncLazy<T> instead.</source>
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD102_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Limit use of synchronously blocking method calls such as JoinableTaskFactory.Run or Task.Result to public entrypoint members where you must be synchronous. Using it for internal members can needlessly add synchronous frames between asynchronous frames, leading to threadpool exhaustion.</source>
|
||||
<target state="translated">Разрешите использовать вызовы методов синхронной блокировки, такие как JoinableTaskFactory.Run или Task.Result, только элементам общедоступных точек входа, где требуется синхронизация. Если их будут использовать внутренние элементы, между асинхронным фреймами могут быть добавлены лишние синхронные фреймы, что приведет к нехватке ресурсов в пуле потока.</target>
|
||||
<target state="translated">Разрешите использовать вызовы методов синхронной блокировки, такие как JoinableTaskFactory.Run или Task.Result, только элементам общедоступных точек входа, где требуется синхронизация. Если их будут использовать внутренние элементы, между асинхронными фреймами могут быть добавлены лишние синхронные фреймы, что приведет к нехватке ресурсов в пуле потока.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD102_Title" translate="yes" xml:space="preserve">
|
||||
<source>Implement internal logic asynchronously</source>
|
||||
|
@ -135,7 +135,7 @@ Use AsyncLazy<T> instead.</source>
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD104_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Expose an async version of this method that does not synchronously block. Then simplify this method to call that async method within a JoinableTaskFactory.Run delegate.</source>
|
||||
<target state="translated">Предоставьте асинхронную версию этого метода, которая не выполняет блокирование синхронно. Затем упростите этот метод, чтобы вызывать этот асинхронный метод внутри делегата JoinableTaskFactory.Run.</target>
|
||||
<target state="translated">Предоставьте асинхронную версию этого метода, которая не использует синхронную блокировку. Затем упростите этот метод, вызывая асинхронную версию внутри делегата JoinableTaskFactory.Run.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD104_Title" translate="yes" xml:space="preserve">
|
||||
<source>Offer async methods</source>
|
||||
|
@ -180,38 +180,44 @@ Use AsyncLazy<T> instead.</source>
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD109_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Avoid throwing when not on the main thread while in an async or Task-returning method. Switch to the thread required instead.</source>
|
||||
<target state="new">Avoid throwing when not on the main thread while in an async or Task-returning method. Switch to the thread required instead.</target>
|
||||
<target state="translated">Избегайте возникновения исключений в потоках, кроме основного, в асинхронном методе или методе, возвращающем Task. Вместо этого переключитесь на нужный поток.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD109_Title" translate="yes" xml:space="preserve">
|
||||
<source>Switch instead of assert in async methods</source>
|
||||
<target state="new">Switch instead of assert in async methods</target>
|
||||
<target state="translated">Параметр вместо оператора assert в асинхронных методах</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD010_MessageFormat_Sync" translate="yes" xml:space="preserve">
|
||||
<source>Accessing "{0}" should only be done on the main thread. Call {1}() first.</source>
|
||||
<target state="new">Accessing "{0}" should only be done on the main thread. Call {1}() first.</target>
|
||||
<target state="translated">Доступ к "{0}" должен осуществляться только в основном потоке. Сначала вызовите {1}().</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">{0} is a type or member name and {1} is the name of a method that throws if not called from the main thread.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD010_MessageFormat_Async" translate="yes" xml:space="preserve">
|
||||
<source>Accessing "{0}" should only be done on the main thread. Await JoinableTaskFactory.SwitchToMainThreadAsync() first.</source>
|
||||
<target state="new">Accessing "{0}" should only be done on the main thread. Await JoinableTaskFactory.SwitchToMainThreadAsync() first.</target>
|
||||
<target state="translated">Доступ к "{0}" должен осуществляться только в основном потоке. Сначала примените await к JoinableTaskFactory.SwitchToMainThreadAsync().</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">{0} is a type or member name.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD004_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Calls to JoinableTaskFactory.SwitchToMainThreadAsync() must be awaited.</source>
|
||||
<target state="new">Calls to JoinableTaskFactory.SwitchToMainThreadAsync() must be awaited.</target>
|
||||
<target state="translated">К вызовам JoinableTaskFactory.SwitchToMainThreadAsync() нужно применять оператор await.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD004_Title" translate="yes" xml:space="preserve">
|
||||
<source>Await SwitchToMainThreadAsync</source>
|
||||
<target state="new">Await SwitchToMainThreadAsync</target>
|
||||
<target state="translated">Применение await к SwitchToMainThreadAsync</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">Do not translate either of these. The first is a keyword, the second is a method name.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD110_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Observe the awaitable result of this method call by awaiting it, assigning to a variable, or passing it to another method.</source>
|
||||
<target state="new">Observe the awaitable result of this method call by awaiting it, assigning to a variable, or passing it to another method.</target>
|
||||
<target state="translated">Чтобы получить результат, поддерживающий await для этого вызова метода, примените к нему оператор await, назначьте его переменной или передайте в другой метод.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD110_Title" translate="yes" xml:space="preserve">
|
||||
<source>Observe result of async calls</source>
|
||||
<target state="new">Observe result of async calls</target>
|
||||
<target state="translated">Просмотр результатов асинхронных вызовов</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD011b_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Invoking or blocking on async code in a Lazy<it id="1" pos="open"><T></it> value factory can deadlock.
|
||||
Use AsyncLazy<it id="2" pos="open"><T></it> instead.</source>
|
||||
<target state="translated">Вызов или блокировка в асинхронном коде в методе ValueFactory Lazy<it id="1" pos="open"><T></it> может вызвать взаимоблокировку.
|
||||
Вместо этого используйте AsyncLazy<it id="2" pos="open"><T></it>.</target>
|
||||
</trans-unit>
|
||||
</group>
|
||||
</body>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD002_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Synchronously waiting on tasks or awaiters may cause deadlocks. Use await or JoinableTaskFactory.Run instead.</source>
|
||||
<target state="translated">Görevlerde veya bekleyen öğelerde zaman uyumlu olarak beklemek kilitlenmelere neden olabilir. Bunun yerine await veya JoinableTaskFactory.Run kullanın.</target>
|
||||
<target state="translated">Görevlerde veya bekleyen öğelerde zaman uyumlu olarak beklemek kilitlenmelere neden olabilir. Bunun yerine bekleyen veya JoinableTaskFactory.Run kullanın.</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">"await" is a C# keyword and should not be translated.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD002_Title" translate="yes" xml:space="preserve">
|
||||
|
@ -76,8 +76,8 @@ Use AsyncLazy<T> instead.</source>
|
|||
Bunun yerine AsyncLazy<T> kullanın.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD011_Title" translate="yes" xml:space="preserve">
|
||||
<source>Avoid using Lazy<it id="1" pos="open"><T></it> where T is a Task<it id="2" pos="open"><T2></it></source>
|
||||
<target state="translated">T’nin Task<it id="1" pos="open"><T></it> olduğu durumlarda Lazy<it id="2" pos="open"><T2></it> kullanmayın.</target>
|
||||
<source>Use AsyncLazy<it id="1" pos="open"><T></it></source>
|
||||
<target state="translated">AsyncLazy<it id="1" pos="open"><T></it> kullanın</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD103_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>{0} synchronously blocks. Await {1} instead.</source>
|
||||
|
@ -114,7 +114,7 @@ Bunun yerine AsyncLazy<T> kullanın.</target>
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD105_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Avoid method overloads that assume TaskScheduler.Current. Use an overload that accepts a TaskScheduler and specify TaskScheduler.Default (or any other) explicitly.</source>
|
||||
<target state="translated">TaskScheduler.Current varsayan metot aşırı yüklemelerinden kaçının. TaskScheduler kabul eden bir aşırı yükleme kullanın ve TaskScheduler.Default (veya diğer birini) açık olarak belirtin.</target>
|
||||
<target state="translated">TaskScheduler.Current varsayan metot aşırı yüklemelerinden kaçının. TaskScheduler kabul eden bir aşırı yükleme kullanın ve TaskScheduler.Default (veya başka birini) açık olarak belirtin.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD105_Title" translate="yes" xml:space="preserve">
|
||||
<source>Avoid method overloads that assume TaskScheduler.Current</source>
|
||||
|
@ -135,7 +135,7 @@ Bunun yerine AsyncLazy<T> kullanın.</target>
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD104_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Expose an async version of this method that does not synchronously block. Then simplify this method to call that async method within a JoinableTaskFactory.Run delegate.</source>
|
||||
<target state="translated">Bu metodun, eş zamanlı olarak engellemeyen zaman uyumsuz bir sürümünü kullanıma açın. Sonra, JoinableTaskFactory.Run temsilcisi içinde bu zaman uyumsuz metodu çağırmak için bu metodu basitleştirin.</target>
|
||||
<target state="translated">Bu metodun zaman uyumlu olarak engellemeyen zaman uyumsuz bir sürümünü sunun. Sonra bir JoinableTaskFactory.Run temsilcisi içinde bu zaman uyumsuz metoda çağrı yapmak için bu metodu basitleştirin.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD104_Title" translate="yes" xml:space="preserve">
|
||||
<source>Offer async methods</source>
|
||||
|
@ -180,38 +180,44 @@ Bunun yerine AsyncLazy<T> kullanın.</target>
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD109_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Avoid throwing when not on the main thread while in an async or Task-returning method. Switch to the thread required instead.</source>
|
||||
<target state="new">Avoid throwing when not on the main thread while in an async or Task-returning method. Switch to the thread required instead.</target>
|
||||
<target state="translated">Ana iş parçacığında değilken, zaman uyumsuz veya Task döndüren metot içinden özel durum oluşturmaktan kaçının. Bunun yerine, gereken iş parçacığına geçin.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD109_Title" translate="yes" xml:space="preserve">
|
||||
<source>Switch instead of assert in async methods</source>
|
||||
<target state="new">Switch instead of assert in async methods</target>
|
||||
<target state="translated">Zaman uyumsuz metotlarda assert yerine switch</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD010_MessageFormat_Sync" translate="yes" xml:space="preserve">
|
||||
<source>Accessing "{0}" should only be done on the main thread. Call {1}() first.</source>
|
||||
<target state="new">Accessing "{0}" should only be done on the main thread. Call {1}() first.</target>
|
||||
<target state="translated">"{0}" erişimi yalnızca ana iş parçacığı üzerinde gerçekleştirilmelidir. Önce {1}() çağırın.</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">{0} is a type or member name and {1} is the name of a method that throws if not called from the main thread.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD010_MessageFormat_Async" translate="yes" xml:space="preserve">
|
||||
<source>Accessing "{0}" should only be done on the main thread. Await JoinableTaskFactory.SwitchToMainThreadAsync() first.</source>
|
||||
<target state="new">Accessing "{0}" should only be done on the main thread. Await JoinableTaskFactory.SwitchToMainThreadAsync() first.</target>
|
||||
<target state="translated">"{0}" erişimi yalnızca ana iş parçacığı üzerinde gerçekleştirilmelidir. Önce JoinableTaskFactory.SwitchToMainThreadAsync() metodunu bekleyin.</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">{0} is a type or member name.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD004_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Calls to JoinableTaskFactory.SwitchToMainThreadAsync() must be awaited.</source>
|
||||
<target state="new">Calls to JoinableTaskFactory.SwitchToMainThreadAsync() must be awaited.</target>
|
||||
<target state="translated">JoinableTaskFactory.SwitchToMainThreadAsync() çağrıları beklenmelidir.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD004_Title" translate="yes" xml:space="preserve">
|
||||
<source>Await SwitchToMainThreadAsync</source>
|
||||
<target state="new">Await SwitchToMainThreadAsync</target>
|
||||
<target state="translated">SwitchToMainThreadAsync bekleyin</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">Do not translate either of these. The first is a keyword, the second is a method name.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD110_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Observe the awaitable result of this method call by awaiting it, assigning to a variable, or passing it to another method.</source>
|
||||
<target state="new">Observe the awaitable result of this method call by awaiting it, assigning to a variable, or passing it to another method.</target>
|
||||
<target state="translated">Bu metot çağrısının beklenebilir sonucunu bekleyerek, bir değişkene atayarak veya bir başka metoda geçirerek gözlemleyin.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD110_Title" translate="yes" xml:space="preserve">
|
||||
<source>Observe result of async calls</source>
|
||||
<target state="new">Observe result of async calls</target>
|
||||
<target state="translated">Zaman uyumsuz çağrıların sonucunu gözlemleyin</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD011b_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Invoking or blocking on async code in a Lazy<it id="1" pos="open"><T></it> value factory can deadlock.
|
||||
Use AsyncLazy<it id="2" pos="open"><T></it> instead.</source>
|
||||
<target state="translated">Bir Lazy<it id="1" pos="open"><T></it> değer fabrikasında zaman uyumsuz kod çağrısı veya engellemesi çıkmaza yol açabilir.
|
||||
Bunun yerine AsyncLazy<it id="2" pos="open"><T></it> kullanın.</target>
|
||||
</trans-unit>
|
||||
</group>
|
||||
</body>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD002_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Synchronously waiting on tasks or awaiters may cause deadlocks. Use await or JoinableTaskFactory.Run instead.</source>
|
||||
<target state="translated">同步等待任务或 awaiter 可能导致死锁。改用 await 或 JoinableTaskFactory.Run。</target>
|
||||
<target state="translated">同步等待任务或 awaiter 可能导致死锁。请等待或改用 JoinableTaskFactory.Run。</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">"await" is a C# keyword and should not be translated.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD002_Title" translate="yes" xml:space="preserve">
|
||||
|
@ -76,8 +76,8 @@ Use AsyncLazy<T> instead.</source>
|
|||
改用 AsyncLazy<T>。</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD011_Title" translate="yes" xml:space="preserve">
|
||||
<source>Avoid using Lazy<it id="1" pos="open"><T></it> where T is a Task<it id="2" pos="open"><T2></it></source>
|
||||
<target state="translated">当 T 为 Task<it id="2" pos="open"><T2></it> 时,避免使用 Lazy<it id="1" pos="open"><T></it></target>
|
||||
<source>Use AsyncLazy<it id="1" pos="open"><T></it></source>
|
||||
<target state="translated">使用 AsyncLazy<it id="1" pos="open"><T></it></target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD103_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>{0} synchronously blocks. Await {1} instead.</source>
|
||||
|
@ -135,7 +135,7 @@ Use AsyncLazy<T> instead.</source>
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD104_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Expose an async version of this method that does not synchronously block. Then simplify this method to call that async method within a JoinableTaskFactory.Run delegate.</source>
|
||||
<target state="translated">公开这个未进行同步阻止的方法的异步版本。然后简化此方法,在 JoinableTaskFactory.Run 委托内调用该异步方法。</target>
|
||||
<target state="translated">公开此方法的异步版(不同步阻止)。然后简化此方法以在 JoinableTaskFactory.Run 委托内调用该异步方法。</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD104_Title" translate="yes" xml:space="preserve">
|
||||
<source>Offer async methods</source>
|
||||
|
@ -180,38 +180,44 @@ Use AsyncLazy<T> instead.</source>
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD109_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Avoid throwing when not on the main thread while in an async or Task-returning method. Switch to the thread required instead.</source>
|
||||
<target state="new">Avoid throwing when not on the main thread while in an async or Task-returning method. Switch to the thread required instead.</target>
|
||||
<target state="translated">在异步方法或返回任务的方法中,不在主线程上时,避免引发。请切换到要求的线程。</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD109_Title" translate="yes" xml:space="preserve">
|
||||
<source>Switch instead of assert in async methods</source>
|
||||
<target state="new">Switch instead of assert in async methods</target>
|
||||
<target state="translated">在异步方法中切换而不是断言</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD010_MessageFormat_Sync" translate="yes" xml:space="preserve">
|
||||
<source>Accessing "{0}" should only be done on the main thread. Call {1}() first.</source>
|
||||
<target state="new">Accessing "{0}" should only be done on the main thread. Call {1}() first.</target>
|
||||
<target state="translated">只应在主线程中访问“{0}”。请先调用 {1}()。</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">{0} is a type or member name and {1} is the name of a method that throws if not called from the main thread.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD010_MessageFormat_Async" translate="yes" xml:space="preserve">
|
||||
<source>Accessing "{0}" should only be done on the main thread. Await JoinableTaskFactory.SwitchToMainThreadAsync() first.</source>
|
||||
<target state="new">Accessing "{0}" should only be done on the main thread. Await JoinableTaskFactory.SwitchToMainThreadAsync() first.</target>
|
||||
<target state="translated">只应在主线程中访问“{0}”。请先等待 JoinableTaskFactory.SwitchToMainThreadAsync()。</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">{0} is a type or member name.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD004_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Calls to JoinableTaskFactory.SwitchToMainThreadAsync() must be awaited.</source>
|
||||
<target state="new">Calls to JoinableTaskFactory.SwitchToMainThreadAsync() must be awaited.</target>
|
||||
<target state="translated">对 JoinableTaskFactory.SwitchToMainThreadAsync() 的调用必须等待。</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD004_Title" translate="yes" xml:space="preserve">
|
||||
<source>Await SwitchToMainThreadAsync</source>
|
||||
<target state="new">Await SwitchToMainThreadAsync</target>
|
||||
<target state="translated">等待 SwitchToMainThreadAsync</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">Do not translate either of these. The first is a keyword, the second is a method name.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD110_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Observe the awaitable result of this method call by awaiting it, assigning to a variable, or passing it to another method.</source>
|
||||
<target state="new">Observe the awaitable result of this method call by awaiting it, assigning to a variable, or passing it to another method.</target>
|
||||
<target state="translated">等待以观察此方法调用的可等待结果、将其分配给变量或传递给其他方法。</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD110_Title" translate="yes" xml:space="preserve">
|
||||
<source>Observe result of async calls</source>
|
||||
<target state="new">Observe result of async calls</target>
|
||||
<target state="translated">观察异步调用的结果</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD011b_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Invoking or blocking on async code in a Lazy<it id="1" pos="open"><T></it> value factory can deadlock.
|
||||
Use AsyncLazy<it id="2" pos="open"><T></it> instead.</source>
|
||||
<target state="translated">在 Lazy<it id="1" pos="open"><T></it> 值工厂中调用或阻止异步代码可能死锁。
|
||||
请改用 AsyncLazy<it id="2" pos="open"><T></it></target>
|
||||
</trans-unit>
|
||||
</group>
|
||||
</body>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD002_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Synchronously waiting on tasks or awaiters may cause deadlocks. Use await or JoinableTaskFactory.Run instead.</source>
|
||||
<target state="translated">同步等候工作或 awaiter 可能會造成鎖死。請改用 await 或 JoinableTaskFactory.Run。</target>
|
||||
<target state="translated">同步等候 task 或 awaiter 可能會造成死結。請改用 await 或 JoinableTaskFactory.Run。</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">"await" is a C# keyword and should not be translated.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD002_Title" translate="yes" xml:space="preserve">
|
||||
|
@ -72,16 +72,16 @@ You can avoid this problem by ensuring the task is initialized within the same m
|
|||
<trans-unit id="VSTHRD011_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Lazy<Task<T>>.Value can deadlock.
|
||||
Use AsyncLazy<T> instead.</source>
|
||||
<target state="translated">Lazy<Task<T>>.Value 可能會鎖死。
|
||||
<target state="translated">Lazy<Task<T>>.Value 可能會造成死結。
|
||||
請改用 AsyncLazy<T>。</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD011_Title" translate="yes" xml:space="preserve">
|
||||
<source>Avoid using Lazy<it id="1" pos="open"><T></it> where T is a Task<it id="2" pos="open"><T2></it></source>
|
||||
<target state="translated">避免在 T 為 Task<it id="2" pos="open"><T2></it> 時使用 Lazy<it id="1" pos="open"><T></it></target>
|
||||
<source>Use AsyncLazy<it id="1" pos="open"><T></it></source>
|
||||
<target state="translated">使用 AsyncLazy<it id="1" pos="open"><T></it></target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD103_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>{0} synchronously blocks. Await {1} instead.</source>
|
||||
<target state="translated">{0} 會同步封鎖。請改為 await {1}。</target>
|
||||
<target state="translated">{0} 會同步封鎖。請改用 await {1}。</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD103_MessageFormat_UseAwaitInstead" translate="yes" xml:space="preserve">
|
||||
<source>{0} synchronously blocks. Use await instead.</source>
|
||||
|
@ -114,7 +114,7 @@ Use AsyncLazy<T> instead.</source>
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD105_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Avoid method overloads that assume TaskScheduler.Current. Use an overload that accepts a TaskScheduler and specify TaskScheduler.Default (or any other) explicitly.</source>
|
||||
<target state="translated">請避免假設 TaskScheduler.Current 的方法多載。請使用接受 TaskScheduler 的多載,並明確指定 TaskScheduler.Default (或其他任一項)。</target>
|
||||
<target state="translated">請避免會假設 TaskScheduler.Current 的方法多載。請使用接受 TaskScheduler 的多載,並明確指定 TaskScheduler.Default (或其他任一項)。</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD105_Title" translate="yes" xml:space="preserve">
|
||||
<source>Avoid method overloads that assume TaskScheduler.Current</source>
|
||||
|
@ -135,7 +135,7 @@ Use AsyncLazy<T> instead.</source>
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD104_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Expose an async version of this method that does not synchronously block. Then simplify this method to call that async method within a JoinableTaskFactory.Run delegate.</source>
|
||||
<target state="translated">公開此方法不會同步封鎖的非同步版本。接著將此方法簡化成在 JoinableTaskFactory.Run delegate 中呼叫該非同步方法。</target>
|
||||
<target state="translated">提供此方法不會同步封鎖的非同步版本,讓此方法在 JoinableTaskFactory.Run 委派中只呼叫該非同步方法。</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD104_Title" translate="yes" xml:space="preserve">
|
||||
<source>Offer async methods</source>
|
||||
|
@ -180,38 +180,44 @@ Use AsyncLazy<T> instead.</source>
|
|||
</trans-unit>
|
||||
<trans-unit id="VSTHRD109_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Avoid throwing when not on the main thread while in an async or Task-returning method. Switch to the thread required instead.</source>
|
||||
<target state="new">Avoid throwing when not on the main thread while in an async or Task-returning method. Switch to the thread required instead.</target>
|
||||
<target state="translated">使用非同步或 Task-returning 方法時,若不在主執行緒,則請避免擲回。請改為切換到需要的執行緒。</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD109_Title" translate="yes" xml:space="preserve">
|
||||
<source>Switch instead of assert in async methods</source>
|
||||
<target state="new">Switch instead of assert in async methods</target>
|
||||
<target state="translated">使用非同步方法時請切換而非判斷提示</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD010_MessageFormat_Sync" translate="yes" xml:space="preserve">
|
||||
<source>Accessing "{0}" should only be done on the main thread. Call {1}() first.</source>
|
||||
<target state="new">Accessing "{0}" should only be done on the main thread. Call {1}() first.</target>
|
||||
<target state="translated">"{0}" 的存取只應在主執行緒完成。請先呼叫 {1}()。</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">{0} is a type or member name and {1} is the name of a method that throws if not called from the main thread.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD010_MessageFormat_Async" translate="yes" xml:space="preserve">
|
||||
<source>Accessing "{0}" should only be done on the main thread. Await JoinableTaskFactory.SwitchToMainThreadAsync() first.</source>
|
||||
<target state="new">Accessing "{0}" should only be done on the main thread. Await JoinableTaskFactory.SwitchToMainThreadAsync() first.</target>
|
||||
<target state="translated">"{0}" 的存取只應在主執行緒完成。請先等候 JoinableTaskFactory.SwitchToMainThreadAsync()。</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">{0} is a type or member name.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD004_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Calls to JoinableTaskFactory.SwitchToMainThreadAsync() must be awaited.</source>
|
||||
<target state="new">Calls to JoinableTaskFactory.SwitchToMainThreadAsync() must be awaited.</target>
|
||||
<target state="translated">必須等候對 JoinableTaskFactory.SwitchToMainThreadAsync() 的呼叫。</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD004_Title" translate="yes" xml:space="preserve">
|
||||
<source>Await SwitchToMainThreadAsync</source>
|
||||
<target state="new">Await SwitchToMainThreadAsync</target>
|
||||
<target state="translated">等候 SwitchToMainThreadAsync</target>
|
||||
<note from="MultilingualBuild" annotates="source" priority="2">Do not translate either of these. The first is a keyword, the second is a method name.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD110_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Observe the awaitable result of this method call by awaiting it, assigning to a variable, or passing it to another method.</source>
|
||||
<target state="new">Observe the awaitable result of this method call by awaiting it, assigning to a variable, or passing it to another method.</target>
|
||||
<target state="translated">觀察此方法呼叫的可等候結果,方法是加以等候、指派至變數,或傳遞至另一個方法。</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD110_Title" translate="yes" xml:space="preserve">
|
||||
<source>Observe result of async calls</source>
|
||||
<target state="new">Observe result of async calls</target>
|
||||
<target state="translated">觀察非同步呼叫的結果</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="VSTHRD011b_MessageFormat" translate="yes" xml:space="preserve">
|
||||
<source>Invoking or blocking on async code in a Lazy<it id="1" pos="open"><T></it> value factory can deadlock.
|
||||
Use AsyncLazy<it id="2" pos="open"><T></it> instead.</source>
|
||||
<target state="translated">在 Lazy<it id="1" pos="open"><T></it> 值 Factory 中叫用或封鎖非同步程式碼可能會鎖死。
|
||||
請改用 AsyncLazy<it id="2" pos="open"><T></it>。</target>
|
||||
</trans-unit>
|
||||
</group>
|
||||
</body>
|
||||
|
|
|
@ -62,5 +62,13 @@
|
|||
"VisualStudio",
|
||||
"Shell",
|
||||
};
|
||||
|
||||
internal static readonly IReadOnlyList<string> MicrosoftVisualStudioShellInterop = new[]
|
||||
{
|
||||
"Microsoft",
|
||||
"VisualStudio",
|
||||
"Shell",
|
||||
"Interop",
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -199,7 +199,7 @@ namespace Microsoft.VisualStudio.Threading.Analyzers {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Avoid using Lazy<T> where T is a Task<T2>.
|
||||
/// Looks up a localized string similar to Use AsyncLazy<T>.
|
||||
/// </summary>
|
||||
internal static string VSTHRD011_Title {
|
||||
get {
|
||||
|
@ -207,6 +207,16 @@ namespace Microsoft.VisualStudio.Threading.Analyzers {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invoking or blocking on async code in a Lazy<T> value factory can deadlock.
|
||||
///Use AsyncLazy<T> instead..
|
||||
/// </summary>
|
||||
internal static string VSTHRD011b_MessageFormat {
|
||||
get {
|
||||
return ResourceManager.GetString("VSTHRD011b_MessageFormat", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Provide an instance of JoinableTaskFactory in this call (or another overload) to avoid deadlocks with the main thread..
|
||||
/// </summary>
|
||||
|
|
|
@ -64,7 +64,7 @@ Tomuto problému můžete předejít tak, že zajistíte inicializaci úlohy v r
|
|||
Použijte raději AsyncLazy<T>.</value>
|
||||
</data>
|
||||
<data name="VSTHRD011_Title" xml:space="preserve">
|
||||
<value>Vyhněte se použití Lazy<T>, kde T označuje Task<T2></value>
|
||||
<value>Použijte AsyncLazy<T></value>
|
||||
</data>
|
||||
<data name="VSTHRD103_MessageFormat" xml:space="preserve">
|
||||
<value>{0} provádí synchronní blokování. Místo toho použijte await {1}.</value>
|
||||
|
@ -108,7 +108,7 @@ Použijte raději AsyncLazy<T>.</value>
|
|||
<value>Zadejte JoinableTaskFactory, kde je to povoleno</value>
|
||||
</data>
|
||||
<data name="VSTHRD104_MessageFormat" xml:space="preserve">
|
||||
<value>Vystavte asynchronní verzi této metody, která neprovádí synchronní blokování. Potom tuto metodu zjednodušte tak, aby volala danou asynchronní metodu v rámci delegáta JoinableTaskFactory.Run.</value>
|
||||
<value>Nabízejte asynchronní verzi této metody, která se synchronně neblokuje. Pak zjednodušte tuto metodu tak, aby volala tuto asynchronní metodu v delegátovi JoinableTaskFactory.Run.</value>
|
||||
</data>
|
||||
<data name="VSTHRD104_Title" xml:space="preserve">
|
||||
<value>Nabízejte asynchronní metody</value>
|
||||
|
@ -142,4 +142,35 @@ Použijte raději AsyncLazy<T>.</value>
|
|||
<data name="VSTHRD108_Title" xml:space="preserve">
|
||||
<value>Vyhodnotit spřažení vláken bez podmínek</value>
|
||||
</data>
|
||||
<data name="VSTHRD109_MessageFormat" xml:space="preserve">
|
||||
<value>Vyhněte se tomuto volání, pokud nejste v hlavním vláknu a jste v asynchronní metodě nebo metodě, která vrací Task. Místo toho přepněte na požadované vlákno.</value>
|
||||
</data>
|
||||
<data name="VSTHRD109_Title" xml:space="preserve">
|
||||
<value>V asynchronních metodách použijte Switch místo Assert</value>
|
||||
</data>
|
||||
<data name="VSTHRD010_MessageFormat_Sync" xml:space="preserve">
|
||||
<value>Přístup k {0} by se měl provádět jenom v hlavním vláknu. Napřed volejte {1}().</value>
|
||||
<comment>{0} is a type or member name and {1} is the name of a method that throws if not called from the main thread.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD010_MessageFormat_Async" xml:space="preserve">
|
||||
<value>Přístup k {0} by se měl provádět jenom v hlavním vláknu. Napřed počkejte na dokončení volání metody JoinableTaskFactory.SwitchToMainThreadAsync().</value>
|
||||
<comment>{0} is a type or member name.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD004_MessageFormat" xml:space="preserve">
|
||||
<value>U volání JoinableTaskFactory.SwitchToMainThreadAsync() se musí čekat na dokončení.</value>
|
||||
</data>
|
||||
<data name="VSTHRD004_Title" xml:space="preserve">
|
||||
<value>Použijte Await SwitchToMainThreadAsync</value>
|
||||
<comment>Do not translate either of these. The first is a keyword, the second is a method name.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD110_MessageFormat" xml:space="preserve">
|
||||
<value>Přijměte očekávatelný výsledek volání této metody tak, že na něj počkáte, přiřadíte ho do proměnné nebo ho předáte další metodě.</value>
|
||||
</data>
|
||||
<data name="VSTHRD110_Title" xml:space="preserve">
|
||||
<value>Přijměte výsledek asynchronních volání</value>
|
||||
</data>
|
||||
<data name="VSTHRD011b_MessageFormat" xml:space="preserve">
|
||||
<value>Vyvolání nebo zablokování asynchronního kódu v objektu pro vytváření hodnot Lazy<T> může způsobit zablokování.
|
||||
Použijte raději AsyncLazy<T>.</value>
|
||||
</data>
|
||||
</root>
|
|
@ -22,7 +22,7 @@
|
|||
<comment>"await" is a C# keyword and should not be translated.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD002_MessageFormat" xml:space="preserve">
|
||||
<value>Das synchrone Warten auf Tasks oder Awaiters führt unter Umständen zu Deadlocks. Verwenden Sie stattdessen "await" oder JoinableTaskFactory.Run.</value>
|
||||
<value>Das synchrone Warten auf Aufgaben oder Awaiters führt unter Umständen zu Deadlocks. Verwenden Sie stattdessen "await" oder "JoinableTaskFactory.Run".</value>
|
||||
<comment>"await" is a C# keyword and should not be translated.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD002_Title" xml:space="preserve">
|
||||
|
@ -60,11 +60,11 @@ Sie können dies vermeiden, indem Sie sicherstellen, dass der Task innerhalb des
|
|||
<value>Warten auf Tasks, für die kein Beitritt möglich ist, in Join-Kontexten vermeiden</value>
|
||||
</data>
|
||||
<data name="VSTHRD011_MessageFormat" xml:space="preserve">
|
||||
<value>Lazy<Task<T>>.Value führt unter Umständen zu einem Deadlock.
|
||||
Verwenden Sie stattdessen AsyncLazy<T>.</value>
|
||||
<value>"Lazy<Task<T>>.Value" führt unter Umständen zu einem Deadlock.
|
||||
Verwenden Sie stattdessen "AsyncLazy<T>".</value>
|
||||
</data>
|
||||
<data name="VSTHRD011_Title" xml:space="preserve">
|
||||
<value>Die Verwendung von Lazy<T> vermeiden, wenn T ein Task<T2> ist</value>
|
||||
<value>"AsyncLazy<T>" verwenden</value>
|
||||
</data>
|
||||
<data name="VSTHRD103_MessageFormat" xml:space="preserve">
|
||||
<value>{0} synchron blockiert. Warten Sie stattdessen auf {1}.</value>
|
||||
|
@ -76,7 +76,7 @@ Verwenden Sie stattdessen AsyncLazy<T>.</value>
|
|||
<value>Asynchrone Methoden in einer asynchronen Methode aufrufen</value>
|
||||
</data>
|
||||
<data name="VSTHRD102_MessageFormat" xml:space="preserve">
|
||||
<value>Beschränken Sie die Verwendung synchron blockierender Methodenaufrufe wie JoinableTaskFactory.Run oder Task.Result auf öffentliche Einstiegspunktmitglieder, bei denen Sie synchron sein müssen. Wenn Sie sie für interne Mitglieder verwenden, werden asynchronen Frames unter Umständen unnötigerweise synchrone Frames hinzugefügt, was zu einer Auslastung des Threadpools führt.</value>
|
||||
<value>Beschränken Sie die Verwendung synchron blockierender Methodenaufrufe wie "JoinableTaskFactory.Run" oder "Task.Result" auf öffentliche Einstiegspunktmitglieder, bei denen Sie synchron sein müssen. Wenn Sie sie für interne Mitglieder verwenden, werden asynchronen Frames unter Umständen unnötigerweise synchrone Frames hinzugefügt, was zu einer Auslastung des Threadpools führt.</value>
|
||||
</data>
|
||||
<data name="VSTHRD102_Title" xml:space="preserve">
|
||||
<value>Interne Logik asynchron implementieren</value>
|
||||
|
@ -92,7 +92,7 @@ Verwenden Sie stattdessen AsyncLazy<T>.</value>
|
|||
<value>Verwenden Sie das Suffix "Async" für asynchrone Methoden</value>
|
||||
</data>
|
||||
<data name="VSTHRD105_MessageFormat" xml:space="preserve">
|
||||
<value>Vermeiden Sie Methodenüberladungen, die TaskScheduler.Current annehmen. Verwenden Sie eine Überladung, die einen TaskScheduler akzeptiert, und geben Sie explizit TaskScheduler.Default (o. a.) an.</value>
|
||||
<value>Vermeiden Sie Methodenüberladungen, die "TaskScheduler.Current" annehmen. Verwenden Sie eine Überladung, die einen TaskScheduler akzeptiert, und geben Sie explizit "TaskScheduler.Default" (o. a.) an.</value>
|
||||
</data>
|
||||
<data name="VSTHRD105_Title" xml:space="preserve">
|
||||
<value>Methodenüberladungen, die TaskScheduler.Current annehmen, vermeiden</value>
|
||||
|
@ -108,7 +108,7 @@ Verwenden Sie stattdessen AsyncLazy<T>.</value>
|
|||
<value>"JoinableTaskFactory" bereitstellen, wenn zulässig</value>
|
||||
</data>
|
||||
<data name="VSTHRD104_MessageFormat" xml:space="preserve">
|
||||
<value>Machen Sie eine async-Version dieser Methode verfügbar, die nicht synchron blockiert. Vereinfachen Sie dann diese Methode so, dass sie diese asynchrone Methode innerhalb eines JoinableTaskFactory.Run-Delegats aufruft.</value>
|
||||
<value>Machen Sie eine asynchrone Version dieser Methode verfügbar, die nicht synchron blockiert. Vereinfachen Sie diese Methode anschließend, um die asynchrone Methode innerhalb eines Delegaten vom Typ "JoinableTaskFactory.Run" aufzurufen.</value>
|
||||
</data>
|
||||
<data name="VSTHRD104_Title" xml:space="preserve">
|
||||
<value>Asynchrone Methoden bieten</value>
|
||||
|
@ -142,4 +142,35 @@ Verwenden Sie stattdessen AsyncLazy<T>.</value>
|
|||
<data name="VSTHRD108_Title" xml:space="preserve">
|
||||
<value>Threadaffinität ohne Bedingungen bestätigen</value>
|
||||
</data>
|
||||
<data name="VSTHRD109_MessageFormat" xml:space="preserve">
|
||||
<value>Vermeiden Sie eine Auslösung in einer asynchronen Methode oder einer Methode mit Aufgabenrückgabe, sofern Sie sich nicht im Hauptthread befinden. Wechseln Sie stattdessen zum benötigten Thread.</value>
|
||||
</data>
|
||||
<data name="VSTHRD109_Title" xml:space="preserve">
|
||||
<value>"switch" anstelle von "assert" in asynchronen Methoden</value>
|
||||
</data>
|
||||
<data name="VSTHRD010_MessageFormat_Sync" xml:space="preserve">
|
||||
<value>Der Zugriff auf "{0}" sollte nur im Hauptthread erfolgen. Rufen Sie zuerst "{1}()" auf.</value>
|
||||
<comment>{0} is a type or member name and {1} is the name of a method that throws if not called from the main thread.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD010_MessageFormat_Async" xml:space="preserve">
|
||||
<value>Der Zugriff auf "{0}" sollte nur im Hauptthread erfolgen.
|
||||
Warten Sie zuerst auf "JoinableTaskFactory.SwitchToMainThreadAsync()".</value>
|
||||
<comment>{0} is a type or member name.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD004_MessageFormat" xml:space="preserve">
|
||||
<value>Aufrufe an "JoinableTaskFactory.SwitchToMainThreadAsync()" müssen mit "await" abgewartet werden.</value>
|
||||
</data>
|
||||
<data name="VSTHRD004_Title" xml:space="preserve">
|
||||
<value>Await SwitchToMainThreadAsync</value>
|
||||
<comment>Do not translate either of these. The first is a keyword, the second is a method name.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD110_MessageFormat" xml:space="preserve">
|
||||
<value>Überwachen Sie das zu erwartende Ergebnis dieses Methodenaufrufs mit "await", weisen Sie es einer Variablen zu, oder übergeben Sie es an eine andere Methode.</value>
|
||||
</data>
|
||||
<data name="VSTHRD110_Title" xml:space="preserve">
|
||||
<value>Ergebnis asynchroner Aufrufe überwachen</value>
|
||||
</data>
|
||||
<data name="VSTHRD011b_MessageFormat" xml:space="preserve">
|
||||
<value>Das Aufrufen oder Blockieren von asynchronem Code in einer Lazy<T>-Wertfactory kann zu einem Deadlock führen. Verwenden Sie stattdessen "AsyncLazy<T>".</value>
|
||||
</data>
|
||||
</root>
|
|
@ -64,7 +64,7 @@ Puede evitar este problema asegurándose de que la tarea se ha iniciado dentro d
|
|||
Use AsyncLazy<T> en su lugar.</value>
|
||||
</data>
|
||||
<data name="VSTHRD011_Title" xml:space="preserve">
|
||||
<value>Evite el uso de Lazy<T> donde T es Task<T2></value>
|
||||
<value>Uso de AsyncLazy<T></value>
|
||||
</data>
|
||||
<data name="VSTHRD103_MessageFormat" xml:space="preserve">
|
||||
<value>{0} bloquea sincrónicamente. Use await {1} en su lugar.</value>
|
||||
|
@ -108,7 +108,7 @@ Use AsyncLazy<T> en su lugar.</value>
|
|||
<value>Proporcione JoinableTaskFactory donde se permita</value>
|
||||
</data>
|
||||
<data name="VSTHRD104_MessageFormat" xml:space="preserve">
|
||||
<value>Exponga una versión asincrónica de este método que no bloquee sincrónicamente. Luego simplifique este método para llamar a ese método asincrónico con un delegado JoinableTaskFactory.Run.</value>
|
||||
<value>Exponga una versión asincrónica de este método que no cause bloqueo de manera sincrónica. A continuación, simplifique este método para llamar a ese método asincrónico dentro de un delegado JoinableTaskFactory.Run.</value>
|
||||
</data>
|
||||
<data name="VSTHRD104_Title" xml:space="preserve">
|
||||
<value>Ofrezca métodos asincrónicos</value>
|
||||
|
@ -142,4 +142,35 @@ Use AsyncLazy<T> en su lugar.</value>
|
|||
<data name="VSTHRD108_Title" xml:space="preserve">
|
||||
<value>Declarar afinidad de subproceso incondicionalmente</value>
|
||||
</data>
|
||||
<data name="VSTHRD109_MessageFormat" xml:space="preserve">
|
||||
<value>Evite lanzar cuando no esté en el subproceso principal durante un método asincrónico o que devuelve tareas. Cambie en su lugar al subproceso requerido.</value>
|
||||
</data>
|
||||
<data name="VSTHRD109_Title" xml:space="preserve">
|
||||
<value>Cambiar en lugar de declarar en métodos asincrónicos</value>
|
||||
</data>
|
||||
<data name="VSTHRD010_MessageFormat_Sync" xml:space="preserve">
|
||||
<value>El acceso a "{0}" solo se debe realizar en el subproceso principal. Llame primero a {1}().</value>
|
||||
<comment>{0} is a type or member name and {1} is the name of a method that throws if not called from the main thread.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD010_MessageFormat_Async" xml:space="preserve">
|
||||
<value>El acceso a "{0}" solo se debe realizar en el subproceso principal. Espere primero a JoinableTaskFactory.SwitchToMainThreadAsync().</value>
|
||||
<comment>{0} is a type or member name.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD004_MessageFormat" xml:space="preserve">
|
||||
<value>Se deben esperar las llamadas a JoinableTaskFactory.SwitchToMainThreadAsync().</value>
|
||||
</data>
|
||||
<data name="VSTHRD004_Title" xml:space="preserve">
|
||||
<value>Esperar a SwitchToMainThreadAsync</value>
|
||||
<comment>Do not translate either of these. The first is a keyword, the second is a method name.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD110_MessageFormat" xml:space="preserve">
|
||||
<value>Observe el resultado que se puede esperar de esta llamada a método cuando se espera, se asigna a una variable o se pasa a otro método.</value>
|
||||
</data>
|
||||
<data name="VSTHRD110_Title" xml:space="preserve">
|
||||
<value>Observar resultado de llamadas asincrónicas</value>
|
||||
</data>
|
||||
<data name="VSTHRD011b_MessageFormat" xml:space="preserve">
|
||||
<value>Invocar o bloquear en código asincrónico en un generador de valores Lazy<T> puede provocar interbloqueos.
|
||||
Use en su lugar AsyncLazy<T>.</value>
|
||||
</data>
|
||||
</root>
|
|
@ -22,7 +22,7 @@
|
|||
<comment>"await" is a C# keyword and should not be translated.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD002_MessageFormat" xml:space="preserve">
|
||||
<value>L’attente de manière synchrone de tâches ou d’éléments en attente peut entraîner des blocages. Utilisez await ou JoinableTaskFactory.Run à la place.</value>
|
||||
<value>L'attente de manière synchrone de tâches ou d’éléments en attente peut entraîner des blocages. Utilisez await ou JoinableTaskFactory.Run à la place.</value>
|
||||
<comment>"await" is a C# keyword and should not be translated.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD002_Title" xml:space="preserve">
|
||||
|
@ -64,7 +64,7 @@ Vous pouvez éviter ce problème en vérifiant que la tâche est initialisée da
|
|||
Utilisez AsyncLazy<T> à la place</value>
|
||||
</data>
|
||||
<data name="VSTHRD011_Title" xml:space="preserve">
|
||||
<value>Éviter d’utiliser Lazy<T> si T est une tâche<T2></value>
|
||||
<value>Utiliser AsyncLazy<T></value>
|
||||
</data>
|
||||
<data name="VSTHRD103_MessageFormat" xml:space="preserve">
|
||||
<value>{0} bloque de façon synchrone. Attendez {1} à la place.</value>
|
||||
|
@ -76,7 +76,7 @@ Utilisez AsyncLazy<T> à la place</value>
|
|||
<value>Appeler des méthodes async dans une méthode async</value>
|
||||
</data>
|
||||
<data name="VSTHRD102_MessageFormat" xml:space="preserve">
|
||||
<value>Limitez l’utilisation des appels de méthode de blocage synchrones, comme JoinableTaskFactory.Run ou Task.Result, aux membres de point d’entrée publics où il est nécessaire d’être synchrone. Son utilisation pour des membres internes peut inutilement ajouter des frames synchrones entre les frames asynchrones, provoquant l’épuisement du pool de threads.</value>
|
||||
<value>Limitez l'utilisation des appels de méthode de blocage synchrones, comme JoinableTaskFactory.Run ou Task.Result, aux membres de point d’entrée publics où il est nécessaire d’être synchrone. Son utilisation pour des membres internes peut inutilement ajouter des frames synchrones entre les frames asynchrones, provoquant l'épuisement du pool de threads.</value>
|
||||
</data>
|
||||
<data name="VSTHRD102_Title" xml:space="preserve">
|
||||
<value>Implémenter la logique interne de façon asynchrone</value>
|
||||
|
@ -108,7 +108,7 @@ Utilisez AsyncLazy<T> à la place</value>
|
|||
<value>Fournir JoinableTaskFactory quand autorisé</value>
|
||||
</data>
|
||||
<data name="VSTHRD104_MessageFormat" xml:space="preserve">
|
||||
<value>Exposez une version async de cette méthode qui ne se bloque pas de façon synchrone. Ensuite, simplifiez cette méthode pour appeler la méthode async au sein d’un délégué JoinableTaskFactory.Run.</value>
|
||||
<value>Exposez une version asynchrone de cette méthode qui ne se bloque pas de manière synchrone. Ensuite, simplifiez cette méthode pour appeler cette méthode async dans un délégué JoinableTaskFactory.Run.</value>
|
||||
</data>
|
||||
<data name="VSTHRD104_Title" xml:space="preserve">
|
||||
<value>Offrir des méthodes async</value>
|
||||
|
@ -142,4 +142,35 @@ Utilisez AsyncLazy<T> à la place</value>
|
|||
<data name="VSTHRD108_Title" xml:space="preserve">
|
||||
<value>Effectuer l'assertion de l'affinité de thread de manière inconditionnelle</value>
|
||||
</data>
|
||||
<data name="VSTHRD109_MessageFormat" xml:space="preserve">
|
||||
<value>Évitez toute levée quand vous n'êtes pas sur the thread principal dans une méthode retournant async ou Task. Basculez plutôt sur le thread requis.</value>
|
||||
</data>
|
||||
<data name="VSTHRD109_Title" xml:space="preserve">
|
||||
<value>Basculer sur des méthodes async plutôt qu'assert</value>
|
||||
</data>
|
||||
<data name="VSTHRD010_MessageFormat_Sync" xml:space="preserve">
|
||||
<value>L'accès à "{0}" doit être uniquement effectué sur le thread principal. Appelez d'abord {1}().</value>
|
||||
<comment>{0} is a type or member name and {1} is the name of a method that throws if not called from the main thread.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD010_MessageFormat_Async" xml:space="preserve">
|
||||
<value>L'accès à "{0}" doit être uniquement effectué sur le thread principal. Attendez d'abord JoinableTaskFactory.SwitchToMainThreadAsync().</value>
|
||||
<comment>{0} is a type or member name.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD004_MessageFormat" xml:space="preserve">
|
||||
<value>Vous devez attendre les appels à JoinableTaskFactory.SwitchToMainThreadAsync().</value>
|
||||
</data>
|
||||
<data name="VSTHRD004_Title" xml:space="preserve">
|
||||
<value>Attendre SwitchToMainThreadAsync</value>
|
||||
<comment>Do not translate either of these. The first is a keyword, the second is a method name.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD110_MessageFormat" xml:space="preserve">
|
||||
<value>Observez le résultat pouvant être attendu de cet appel de méthode en l'attendant, en l'assignant à une variable ou en le passant à une autre méthode.</value>
|
||||
</data>
|
||||
<data name="VSTHRD110_Title" xml:space="preserve">
|
||||
<value>Observer le résultat des appels async</value>
|
||||
</data>
|
||||
<data name="VSTHRD011b_MessageFormat" xml:space="preserve">
|
||||
<value>Les appels ou blocages sur le code async dans une fabrique de valeurs Lazy<T> peuvent faire l'objet d'un interblocage.
|
||||
Utilisez plutôt AsyncLazy<T>.</value>
|
||||
</data>
|
||||
</root>
|
|
@ -64,10 +64,10 @@ Per evitare il problema, assicurarsi che Task venga inizializzato all'interno de
|
|||
In alternativa, usare AsyncLazy<T>.</value>
|
||||
</data>
|
||||
<data name="VSTHRD011_Title" xml:space="preserve">
|
||||
<value>Evitare di usare Lazy<T> in cui T è un elemento Task<T2></value>
|
||||
<value>Usa AsyncLazy<T></value>
|
||||
</data>
|
||||
<data name="VSTHRD103_MessageFormat" xml:space="preserve">
|
||||
<value>{0} si blocca in modalità sincrona. In alternativa, attendere {1}.</value>
|
||||
<value>{0} si blocca in modalità sincrona. In alternativa, usare await {1}.</value>
|
||||
</data>
|
||||
<data name="VSTHRD103_MessageFormat_UseAwaitInstead" xml:space="preserve">
|
||||
<value>{0} si blocca in modalità sincrona. In alternativa, usare await.</value>
|
||||
|
@ -142,4 +142,35 @@ In alternativa, usare AsyncLazy<T>.</value>
|
|||
<data name="VSTHRD108_Title" xml:space="preserve">
|
||||
<value>Asserisci l'affinità dei thread in modo non condizionale</value>
|
||||
</data>
|
||||
<data name="VSTHRD109_MessageFormat" xml:space="preserve">
|
||||
<value>Evitare la generazione quando non si è in un thread principale durante un metodo asincrono o che restituisce elementi Task. In alternativa, passare al thread richiesto.</value>
|
||||
</data>
|
||||
<data name="VSTHRD109_Title" xml:space="preserve">
|
||||
<value>Usa switch invece di assert in metodi asincroni</value>
|
||||
</data>
|
||||
<data name="VSTHRD010_MessageFormat_Sync" xml:space="preserve">
|
||||
<value>L'accesso a "{0}" deve essere effettuato solo nel thread principale. Chiamare prima {1}().</value>
|
||||
<comment>{0} is a type or member name and {1} is the name of a method that throws if not called from the main thread.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD010_MessageFormat_Async" xml:space="preserve">
|
||||
<value>L'accesso a "{0}" deve essere effettuato solo nel thread principale. Usare prima await JoinableTaskFactory.SwitchToMainThreadAsync().</value>
|
||||
<comment>{0} is a type or member name.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD004_MessageFormat" xml:space="preserve">
|
||||
<value>Con le chiamate a JoinableTaskFactory.SwitchToMainThreadAsync() è necessario usare await.</value>
|
||||
</data>
|
||||
<data name="VSTHRD004_Title" xml:space="preserve">
|
||||
<value>Usa await SwitchToMainThreadAsync</value>
|
||||
<comment>Do not translate either of these. The first is a keyword, the second is a method name.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD110_MessageFormat" xml:space="preserve">
|
||||
<value>Per osservare il risultato awaitable di questa chiamata al metodo, usare await per la chiamata, assegnarla a una variabile o passarla a un altro metodo.</value>
|
||||
</data>
|
||||
<data name="VSTHRD110_Title" xml:space="preserve">
|
||||
<value>Osserva il risultato di chiamate asincrone</value>
|
||||
</data>
|
||||
<data name="VSTHRD011b_MessageFormat" xml:space="preserve">
|
||||
<value>La chiamata o il blocco su codice asincrono in una factory di valori Lazy<T> può causare un deadlock.
|
||||
In alternativa, usare AsyncLazy<T>.</value>
|
||||
</data>
|
||||
</root>
|
|
@ -22,7 +22,7 @@
|
|||
<comment>"await" is a C# keyword and should not be translated.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD002_MessageFormat" xml:space="preserve">
|
||||
<value>同期的にタスクまたは待機側を待機すると、デッドロックが引き起こされる可能性があります。代わりに、await または JoinableTaskFactory.Run を使用します。</value>
|
||||
<value>同期的にタスクまたは awaiter を待機すると、デッドロックが引き起こされる可能性があります。代わりに await または JoinableTaskFactory.Run を使用してください。</value>
|
||||
<comment>"await" is a C# keyword and should not be translated.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD002_Title" xml:space="preserve">
|
||||
|
@ -61,22 +61,22 @@
|
|||
</data>
|
||||
<data name="VSTHRD011_MessageFormat" xml:space="preserve">
|
||||
<value>Lazy<Task<T>>.Value はデッドロックを引き起こす可能性があります。
|
||||
代わりに AsyncLazy<T> を使用します。</value>
|
||||
代わりに AsyncLazy<T> を使用してください。</value>
|
||||
</data>
|
||||
<data name="VSTHRD011_Title" xml:space="preserve">
|
||||
<value>T が Task<T2> を表す Lazy<T> を使用しない</value>
|
||||
<value>AsyncLazy<T> を使用する</value>
|
||||
</data>
|
||||
<data name="VSTHRD103_MessageFormat" xml:space="preserve">
|
||||
<value>{0} は同期的にブロックされます。代わりに {1} を待機します。</value>
|
||||
<value>{0} は同期的にブロックを実行します。代わりに {1} を待機してください。</value>
|
||||
</data>
|
||||
<data name="VSTHRD103_MessageFormat_UseAwaitInstead" xml:space="preserve">
|
||||
<value>{0} は同期的にブロックされます。代わりに Await を使用します。</value>
|
||||
<value>{0} は同期的にブロックを実行します。代わりに await を使用してください。</value>
|
||||
</data>
|
||||
<data name="VSTHRD103_Title" xml:space="preserve">
|
||||
<value>非同期メソッドの場合に非同期メソッドを呼び出す</value>
|
||||
</data>
|
||||
<data name="VSTHRD102_MessageFormat" xml:space="preserve">
|
||||
<value>JoinableTaskFactory.Run または Task.Result など、同期的にブロックしているメソッド呼び出しの使用を、同期している必要のある公開エントリポイント メンバーに限定します。内部メンバーに対して使用すると、非同期フレーム間に同期フレームが不必要に追加され、スレッドプールが消費されます。</value>
|
||||
<value>JoinableTaskFactory.Run または Task.Result など、同期的にブロックを行うメソッド呼び出しの使用は、同期が必要な公開エントリポイント メンバーに限定してください。内部メンバーに対して使用すると、非同期フレーム間に同期フレームが不必要に追加され、スレッドプールが消費されます。</value>
|
||||
</data>
|
||||
<data name="VSTHRD102_Title" xml:space="preserve">
|
||||
<value>内部論理を非同期的に実装する</value>
|
||||
|
@ -108,7 +108,7 @@
|
|||
<value>許可されている場合は JoinableTaskFactory を提供する</value>
|
||||
</data>
|
||||
<data name="VSTHRD104_MessageFormat" xml:space="preserve">
|
||||
<value>同期的にブロックしないこのメソッドの非同期バージョンを公開します。その後、このメソッドを単純化して、JoinableTaskFactory.Run デリゲートでその非同期メソッドを呼び出します。</value>
|
||||
<value>このメソッドの、同期的にブロックしない非同期バージョンを公開してください。次に、このメソッドを単純化し、JoinableTaskFactory.Run デリゲート内でその非同期メソッドを呼び出すようにします。</value>
|
||||
</data>
|
||||
<data name="VSTHRD104_Title" xml:space="preserve">
|
||||
<value>非同期メソッドを提供する</value>
|
||||
|
@ -142,4 +142,35 @@
|
|||
<data name="VSTHRD108_Title" xml:space="preserve">
|
||||
<value>スレッド アフィニティを無条件でアサートする</value>
|
||||
</data>
|
||||
<data name="VSTHRD109_MessageFormat" xml:space="preserve">
|
||||
<value>非同期メソッドまたはタスクを返すメソッドでは、メイン スレッド上でない限り、スローしないでください。代わりに、必要なスレッドに切り替えてください。</value>
|
||||
</data>
|
||||
<data name="VSTHRD109_Title" xml:space="preserve">
|
||||
<value>非同期メソッドでアサートの代わりに切り替えを使用する</value>
|
||||
</data>
|
||||
<data name="VSTHRD010_MessageFormat_Sync" xml:space="preserve">
|
||||
<value>"{0}" へのアクセスはメイン スレッドでのみ行う必要があります。まず {1}() を呼び出します。</value>
|
||||
<comment>{0} is a type or member name and {1} is the name of a method that throws if not called from the main thread.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD010_MessageFormat_Async" xml:space="preserve">
|
||||
<value>"{0}" へのアクセスはメイン スレッドでのみ行う必要があります。まず JoinableTaskFactory.SwitchToMainThreadAsync() を待機してください。</value>
|
||||
<comment>{0} is a type or member name.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD004_MessageFormat" xml:space="preserve">
|
||||
<value>JoinableTaskFactory.SwitchToMainThreadAsync() への呼び出しを待機する必要があります。</value>
|
||||
</data>
|
||||
<data name="VSTHRD004_Title" xml:space="preserve">
|
||||
<value>SwitchToMainThreadAsync を待機する</value>
|
||||
<comment>Do not translate either of these. The first is a keyword, the second is a method name.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD110_MessageFormat" xml:space="preserve">
|
||||
<value>このメソッド呼び出しの待機可能な結果を確認するには、それを待機するか、変数に割り当てるか、別のメソッドに渡します。</value>
|
||||
</data>
|
||||
<data name="VSTHRD110_Title" xml:space="preserve">
|
||||
<value>非同期呼び出しの結果を確認する</value>
|
||||
</data>
|
||||
<data name="VSTHRD011b_MessageFormat" xml:space="preserve">
|
||||
<value>Lazy<T> 値ファクトリの非同期コードで呼び出しかブロックを実行すると、デッドロックを引き起こす可能性があります。
|
||||
代わりに AsyncLazy<T> をご使用ください。</value>
|
||||
</data>
|
||||
</root>
|
|
@ -22,7 +22,7 @@
|
|||
<comment>"await" is a C# keyword and should not be translated.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD002_MessageFormat" xml:space="preserve">
|
||||
<value>작업을 동기적으로 대기합니다. 그러지 않으면 대기자가 교착 상태를 일으킬 수 있습니다. 대신 await 또는 JoinableTaskFactory.Run을 사용합니다.</value>
|
||||
<value>작업을 동기적으로 대기합니다. 그러지 않으면 대기자가 교착 상태를 일으킬 수 있습니다. 대신 await나 JoinableTaskFactory.Run을 사용합니다.</value>
|
||||
<comment>"await" is a C# keyword and should not be translated.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD002_Title" xml:space="preserve">
|
||||
|
@ -68,7 +68,7 @@
|
|||
대신 AsyncLazy<T>를 사용하세요.</value>
|
||||
</data>
|
||||
<data name="VSTHRD011_Title" xml:space="preserve">
|
||||
<value><T>T가 Task인 경우 Lazy를 사용하지 않습니다.<T2></value>
|
||||
<value>AsyncLazy<T> 사용</value>
|
||||
</data>
|
||||
<data name="VSTHRD103_MessageFormat" xml:space="preserve">
|
||||
<value>{0}이(가) 동기적으로 차단합니다. 대신 {1}을(를) 기다립니다.</value>
|
||||
|
@ -108,7 +108,7 @@
|
|||
<value>허용되는 경우 JoinableTaskFactory 제공</value>
|
||||
</data>
|
||||
<data name="VSTHRD104_MessageFormat" xml:space="preserve">
|
||||
<value>동기적으로 차단되지 않는 이 메서드의 비동기 버전을 노출합니다. 그런 다음, JoinableTaskFactory.Run 대리자 내의 해당 비동기 메서드를 호출하도록 이 메서드를 단순화합니다.</value>
|
||||
<value>동기적으로 차단되지 않는 이 메서드의 비동기 버전을 노출하세요. 그런 다음 JoinableTaskFactory.Run 대리자 내의 해당 비동기 메서드를 호출하도록 이 메서드를 단순화하세요.</value>
|
||||
</data>
|
||||
<data name="VSTHRD104_Title" xml:space="preserve">
|
||||
<value>비동기 메서드 제공</value>
|
||||
|
@ -142,4 +142,35 @@
|
|||
<data name="VSTHRD108_Title" xml:space="preserve">
|
||||
<value>무조건 스레드 선호도 어설션</value>
|
||||
</data>
|
||||
<data name="VSTHRD109_MessageFormat" xml:space="preserve">
|
||||
<value>비동기 또는 태스크 반환 메서드에서 주 스레드에 있지 않은 경우 throw하지 않습니다. 대신 필수 스레드로 전환합니다.</value>
|
||||
</data>
|
||||
<data name="VSTHRD109_Title" xml:space="preserve">
|
||||
<value>비동기 메서드에서 어설션 대신 전환</value>
|
||||
</data>
|
||||
<data name="VSTHRD010_MessageFormat_Sync" xml:space="preserve">
|
||||
<value>주 스레드에서만 "{0}"에 액세스해야 합니다. 우선 {1}()을(를) 호출합니다.</value>
|
||||
<comment>{0} is a type or member name and {1} is the name of a method that throws if not called from the main thread.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD010_MessageFormat_Async" xml:space="preserve">
|
||||
<value>주 스레드에서만 "{0}"에 액세스해야 합니다. 우선 JoinableTaskFactory.SwitchToMainThreadAsync()를 대기합니다.</value>
|
||||
<comment>{0} is a type or member name.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD004_MessageFormat" xml:space="preserve">
|
||||
<value>JoinableTaskFactory.SwitchToMainThreadAsync() 호출을 대기해야 합니다.</value>
|
||||
</data>
|
||||
<data name="VSTHRD004_Title" xml:space="preserve">
|
||||
<value>Await SwitchToMainThreadAsync</value>
|
||||
<comment>Do not translate either of these. The first is a keyword, the second is a method name.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD110_MessageFormat" xml:space="preserve">
|
||||
<value>이 메서드 호출을 대기하거나, 변수에 할당하거나, 다른 메서드에 전달함으로써 해당 호출의 대기할 수 있는 결과를 확인합니다.</value>
|
||||
</data>
|
||||
<data name="VSTHRD110_Title" xml:space="preserve">
|
||||
<value>비동기 호출의 결과 확인</value>
|
||||
</data>
|
||||
<data name="VSTHRD011b_MessageFormat" xml:space="preserve">
|
||||
<value>Lazy<T> 값 팩터리의 비동기 코드를 호출하거나 차단하면 교착 상태가 될 수 있습니다.
|
||||
대신 AsyncLazy<T>를 사용합니다.</value>
|
||||
</data>
|
||||
</root>
|
|
@ -22,7 +22,7 @@
|
|||
<comment>"await" is a C# keyword and should not be translated.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD002_MessageFormat" xml:space="preserve">
|
||||
<value>Synchroniczne oczekiwanie na zadania lub elementy typu awaiter mogą powodować zakleszczenia. Zamiast tego użyj operatora await albo metody JoinableTaskFactory.Run.</value>
|
||||
<value>Synchroniczne oczekiwanie na zadania lub elementy typu awaiter mogą powodować zakleszczenia. Zamiast tego używaj metody await lub JoinableTaskFactory.Run.</value>
|
||||
<comment>"await" is a C# keyword and should not be translated.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD002_Title" xml:space="preserve">
|
||||
|
@ -64,7 +64,7 @@ Tego problemu można uniknąć, zapewniając, że zadanie zostanie zainicjowane
|
|||
Zamiast tego używaj klasy AsyncLazy<T>.</value>
|
||||
</data>
|
||||
<data name="VSTHRD011_Title" xml:space="preserve">
|
||||
<value>Unikaj używania klasy Lazy<T>, jeśli T jest obiektem Task<T2></value>
|
||||
<value>Użyj metody AsyncLazy<T></value>
|
||||
</data>
|
||||
<data name="VSTHRD103_MessageFormat" xml:space="preserve">
|
||||
<value>Metoda {0} powoduje blokowanie synchroniczne. Zamiast tego oczekuj na {1}.</value>
|
||||
|
@ -108,7 +108,7 @@ Zamiast tego używaj klasy AsyncLazy<T>.</value>
|
|||
<value>Podaj element JoinableTaskFactory w miejscach, gdzie jest to dopuszczalne</value>
|
||||
</data>
|
||||
<data name="VSTHRD104_MessageFormat" xml:space="preserve">
|
||||
<value>Uwidocznij asynchroniczną wersję tej metody, która nie powoduje blokowania synchronicznego. Następnie uprość tę metodę w celu wywoływania tej metody asynchronicznej w ramach delegata JoinableTaskFactory.Run.</value>
|
||||
<value>Uwidocznij asynchroniczną wersję tej metody, która nie powoduje synchronicznego blokowania. Następnie uprość tę metodę, aby wywołać tę metodę asynchroniczną w ramach delegata JoinableTaskFactory.Run.</value>
|
||||
</data>
|
||||
<data name="VSTHRD104_Title" xml:space="preserve">
|
||||
<value>Oferuj metody asynchroniczne</value>
|
||||
|
@ -142,4 +142,35 @@ Zamiast tego używaj klasy AsyncLazy<T>.</value>
|
|||
<data name="VSTHRD108_Title" xml:space="preserve">
|
||||
<value>Bezwarunkowo potwierdź koligację wątku</value>
|
||||
</data>
|
||||
<data name="VSTHRD109_MessageFormat" xml:space="preserve">
|
||||
<value>Unikaj zgłaszania poza wątkiem głównym w metodzie asynchronicznej lub zwracającej element Task. Zamiast tego przełącz się na wymagany wątek.</value>
|
||||
</data>
|
||||
<data name="VSTHRD109_Title" xml:space="preserve">
|
||||
<value>Przełączanie zamiast asercji w metodach asynchronicznych</value>
|
||||
</data>
|
||||
<data name="VSTHRD010_MessageFormat_Sync" xml:space="preserve">
|
||||
<value>Dostęp do metody „{0}” powinien być uzyskiwany tylko z wątku głównego. Najpierw wywołaj metodę {1}().</value>
|
||||
<comment>{0} is a type or member name and {1} is the name of a method that throws if not called from the main thread.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD010_MessageFormat_Async" xml:space="preserve">
|
||||
<value>Dostęp do metody „{0}” powinien być uzyskiwany tylko z wątku głównego. Najpierw zaczekaj na metodę JoinableTaskFactory.SwitchToMainThreadAsync().</value>
|
||||
<comment>{0} is a type or member name.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD004_MessageFormat" xml:space="preserve">
|
||||
<value>Należy zaczekać na wywołania metody JoinableTaskFactory.SwitchToMainThreadAsync().</value>
|
||||
</data>
|
||||
<data name="VSTHRD004_Title" xml:space="preserve">
|
||||
<value>Zaczekaj na metodę SwitchToMainThreadAsync</value>
|
||||
<comment>Do not translate either of these. The first is a keyword, the second is a method name.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD110_MessageFormat" xml:space="preserve">
|
||||
<value>Obserwuj wynik typu awaitable wywołania tej metody, oczekując na niego, przypisując go do zmiennej lub przekazując do innej metody.</value>
|
||||
</data>
|
||||
<data name="VSTHRD110_Title" xml:space="preserve">
|
||||
<value>Obserwuj wynik wywołań asynchronicznych</value>
|
||||
</data>
|
||||
<data name="VSTHRD011b_MessageFormat" xml:space="preserve">
|
||||
<value>Wywołanie kodu asynchronicznego lub zablokowanie na nim w fabryce wartości Lazy<T> może spowodować zakleszczenie.
|
||||
Zamiast tego użyj elementu AsyncLazy<T>.</value>
|
||||
</data>
|
||||
</root>
|
|
@ -22,7 +22,7 @@
|
|||
<comment>"await" is a C# keyword and should not be translated.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD002_MessageFormat" xml:space="preserve">
|
||||
<value>Esperar de forma síncrona por tarefas ou awaiters podem causar deadlocks. Em vez disso, use await ou JoinableTaskFactory.Run.</value>
|
||||
<value>Esperar de forma síncrona por tarefas ou awaiters pode causar deadlocks. Em vez disso, use await ou JoinableTaskFactory.Run.</value>
|
||||
<comment>"await" is a C# keyword and should not be translated.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD002_Title" xml:space="preserve">
|
||||
|
@ -64,7 +64,7 @@ Você pode evitar esse problema assegurando que a tarefa seja inicializada no de
|
|||
Em vez disso, use AsyncLazy<T>.</value>
|
||||
</data>
|
||||
<data name="VSTHRD011_Title" xml:space="preserve">
|
||||
<value>Evite usar Lazy<T>, no qual T é uma Task<T2></value>
|
||||
<value>Usar AsyncLazy<T></value>
|
||||
</data>
|
||||
<data name="VSTHRD103_MessageFormat" xml:space="preserve">
|
||||
<value>O {0} é bloqueado de forma síncrona. Em vez disso, espere o {1}.</value>
|
||||
|
@ -108,7 +108,7 @@ Em vez disso, use AsyncLazy<T>.</value>
|
|||
<value>Fornecer o JoinableTaskFactory quando permitido</value>
|
||||
</data>
|
||||
<data name="VSTHRD104_MessageFormat" xml:space="preserve">
|
||||
<value>Exponha uma versão assíncrona deste método que não seja bloqueada de forma síncrona. Em seguida, simplifique este método para chamar o método assíncrono em um delegado JoinableTaskFactory.Run.</value>
|
||||
<value>Exporte uma versão assíncrona desse método que não bloqueia de forma síncrona. Em seguida, simplifique esse método para chamar esse método assíncrono em um delegado JoinableTaskFactory.Run.</value>
|
||||
</data>
|
||||
<data name="VSTHRD104_Title" xml:space="preserve">
|
||||
<value>Oferecer métodos assíncronos</value>
|
||||
|
@ -142,4 +142,35 @@ Em vez disso, use AsyncLazy<T>.</value>
|
|||
<data name="VSTHRD108_Title" xml:space="preserve">
|
||||
<value>Declarar a afinidade de thread de forma incondicional</value>
|
||||
</data>
|
||||
<data name="VSTHRD109_MessageFormat" xml:space="preserve">
|
||||
<value>Evite lançar quando não estiver no thread principal enquanto estiver em um método assíncrono ou de Retorno de tarefa. Mude para o thread necessário em vez disso.</value>
|
||||
</data>
|
||||
<data name="VSTHRD109_Title" xml:space="preserve">
|
||||
<value>Mude em vez de declarar em métodos assíncronos</value>
|
||||
</data>
|
||||
<data name="VSTHRD010_MessageFormat_Sync" xml:space="preserve">
|
||||
<value>O acesso a "{0}" deve ser realizado somente no thread principal. Chame {1}() primeiro.</value>
|
||||
<comment>{0} is a type or member name and {1} is the name of a method that throws if not called from the main thread.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD010_MessageFormat_Async" xml:space="preserve">
|
||||
<value>O acesso a "{0}" deve ser realizado somente no thread principal. Aguarde JoinableTaskFactory.SwitchToMainThreadAsync() primeiro.</value>
|
||||
<comment>{0} is a type or member name.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD004_MessageFormat" xml:space="preserve">
|
||||
<value>Chamadas a JoinableTaskFactory.SwitchToMainThreadAsync() devem ser aguardadas.</value>
|
||||
</data>
|
||||
<data name="VSTHRD004_Title" xml:space="preserve">
|
||||
<value>Aguarde SwitchToMainThreadAsync</value>
|
||||
<comment>Do not translate either of these. The first is a keyword, the second is a method name.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD110_MessageFormat" xml:space="preserve">
|
||||
<value>Observe o resultado esperável dessa chamada de método aguardando-o, atribuindo-o a uma variável ou passando-o a outro método.</value>
|
||||
</data>
|
||||
<data name="VSTHRD110_Title" xml:space="preserve">
|
||||
<value>Observe o resultado das chamadas assíncronas</value>
|
||||
</data>
|
||||
<data name="VSTHRD011b_MessageFormat" xml:space="preserve">
|
||||
<value>A invocação ou bloqueio em código assíncrono em um alocador de valor Lazy<T> pode causar um deadlock.
|
||||
Use AsyncLazy<T> em vez disso.</value>
|
||||
</data>
|
||||
</root>
|
|
@ -172,12 +172,16 @@ You can avoid this problem by ensuring the task is initialized within the same m
|
|||
<data name="VSTHRD003_Title" xml:space="preserve">
|
||||
<value>Avoid awaiting foreign Tasks</value>
|
||||
</data>
|
||||
<data name="VSTHRD011b_MessageFormat" xml:space="preserve">
|
||||
<value>Invoking or blocking on async code in a Lazy<T> value factory can deadlock.
|
||||
Use AsyncLazy<T> instead.</value>
|
||||
</data>
|
||||
<data name="VSTHRD011_MessageFormat" xml:space="preserve">
|
||||
<value>Lazy<Task<T>>.Value can deadlock.
|
||||
Use AsyncLazy<T> instead.</value>
|
||||
</data>
|
||||
<data name="VSTHRD011_Title" xml:space="preserve">
|
||||
<value>Avoid using Lazy<T> where T is a Task<T2></value>
|
||||
<value>Use AsyncLazy<T></value>
|
||||
</data>
|
||||
<data name="VSTHRD103_MessageFormat" xml:space="preserve">
|
||||
<value>{0} synchronously blocks. Await {1} instead.</value>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<comment>"await" is a C# keyword and should not be translated.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD002_MessageFormat" xml:space="preserve">
|
||||
<value>Синхронное ожидание задач или объектов awaiter может вызвать взаимоблокировки. Вместо этого используйте await или JoinableTaskFactory.Run.</value>
|
||||
<value>Синхронное ожидание задач или объектов awaiter может приводить к взаимоблокировкам. Используйте вместо этого await или JoinableTaskFactory.Run.</value>
|
||||
<comment>"await" is a C# keyword and should not be translated.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD002_Title" xml:space="preserve">
|
||||
|
@ -64,7 +64,7 @@
|
|||
Вместо этого используйте AsyncLazy<T>.</value>
|
||||
</data>
|
||||
<data name="VSTHRD011_Title" xml:space="preserve">
|
||||
<value>Не используйте Lazy<T>, где T — объект Task<T2></value>
|
||||
<value>Используйте AsyncLazy<T></value>
|
||||
</data>
|
||||
<data name="VSTHRD103_MessageFormat" xml:space="preserve">
|
||||
<value>{0} синхронно блокирует. Вместо этого используйте Await {1}.</value>
|
||||
|
@ -76,7 +76,7 @@
|
|||
<value>Вызов асинхронных методов в методе async</value>
|
||||
</data>
|
||||
<data name="VSTHRD102_MessageFormat" xml:space="preserve">
|
||||
<value>Разрешите использовать вызовы методов синхронной блокировки, такие как JoinableTaskFactory.Run или Task.Result, только элементам общедоступных точек входа, где требуется синхронизация. Если их будут использовать внутренние элементы, между асинхронным фреймами могут быть добавлены лишние синхронные фреймы, что приведет к нехватке ресурсов в пуле потока.</value>
|
||||
<value>Разрешите использовать вызовы методов синхронной блокировки, такие как JoinableTaskFactory.Run или Task.Result, только элементам общедоступных точек входа, где требуется синхронизация. Если их будут использовать внутренние элементы, между асинхронными фреймами могут быть добавлены лишние синхронные фреймы, что приведет к нехватке ресурсов в пуле потока.</value>
|
||||
</data>
|
||||
<data name="VSTHRD102_Title" xml:space="preserve">
|
||||
<value>Реализация внутренней логики асинхронно</value>
|
||||
|
@ -108,7 +108,7 @@
|
|||
<value>Указывайте JoinableTaskFactory, где это возможно</value>
|
||||
</data>
|
||||
<data name="VSTHRD104_MessageFormat" xml:space="preserve">
|
||||
<value>Предоставьте асинхронную версию этого метода, которая не выполняет блокирование синхронно. Затем упростите этот метод, чтобы вызывать этот асинхронный метод внутри делегата JoinableTaskFactory.Run.</value>
|
||||
<value>Предоставьте асинхронную версию этого метода, которая не использует синхронную блокировку. Затем упростите этот метод, вызывая асинхронную версию внутри делегата JoinableTaskFactory.Run.</value>
|
||||
</data>
|
||||
<data name="VSTHRD104_Title" xml:space="preserve">
|
||||
<value>Предоставляйте асинхронные методы</value>
|
||||
|
@ -142,4 +142,35 @@
|
|||
<data name="VSTHRD108_Title" xml:space="preserve">
|
||||
<value>Утверждайте сходства потоков безусловно</value>
|
||||
</data>
|
||||
<data name="VSTHRD109_MessageFormat" xml:space="preserve">
|
||||
<value>Избегайте возникновения исключений в потоках, кроме основного, в асинхронном методе или методе, возвращающем Task. Вместо этого переключитесь на нужный поток.</value>
|
||||
</data>
|
||||
<data name="VSTHRD109_Title" xml:space="preserve">
|
||||
<value>Параметр вместо оператора assert в асинхронных методах</value>
|
||||
</data>
|
||||
<data name="VSTHRD010_MessageFormat_Sync" xml:space="preserve">
|
||||
<value>Доступ к "{0}" должен осуществляться только в основном потоке. Сначала вызовите {1}().</value>
|
||||
<comment>{0} is a type or member name and {1} is the name of a method that throws if not called from the main thread.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD010_MessageFormat_Async" xml:space="preserve">
|
||||
<value>Доступ к "{0}" должен осуществляться только в основном потоке. Сначала примените await к JoinableTaskFactory.SwitchToMainThreadAsync().</value>
|
||||
<comment>{0} is a type or member name.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD004_MessageFormat" xml:space="preserve">
|
||||
<value>К вызовам JoinableTaskFactory.SwitchToMainThreadAsync() нужно применять оператор await.</value>
|
||||
</data>
|
||||
<data name="VSTHRD004_Title" xml:space="preserve">
|
||||
<value>Применение await к SwitchToMainThreadAsync</value>
|
||||
<comment>Do not translate either of these. The first is a keyword, the second is a method name.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD110_MessageFormat" xml:space="preserve">
|
||||
<value>Чтобы получить результат, поддерживающий await для этого вызова метода, примените к нему оператор await, назначьте его переменной или передайте в другой метод.</value>
|
||||
</data>
|
||||
<data name="VSTHRD110_Title" xml:space="preserve">
|
||||
<value>Просмотр результатов асинхронных вызовов</value>
|
||||
</data>
|
||||
<data name="VSTHRD011b_MessageFormat" xml:space="preserve">
|
||||
<value>Вызов или блокировка в асинхронном коде в методе ValueFactory Lazy<T> может вызвать взаимоблокировку.
|
||||
Вместо этого используйте AsyncLazy<T>.</value>
|
||||
</data>
|
||||
</root>
|
|
@ -22,7 +22,7 @@
|
|||
<comment>"await" is a C# keyword and should not be translated.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD002_MessageFormat" xml:space="preserve">
|
||||
<value>Görevlerde veya bekleyen öğelerde zaman uyumlu olarak beklemek kilitlenmelere neden olabilir. Bunun yerine await veya JoinableTaskFactory.Run kullanın.</value>
|
||||
<value>Görevlerde veya bekleyen öğelerde zaman uyumlu olarak beklemek kilitlenmelere neden olabilir. Bunun yerine bekleyen veya JoinableTaskFactory.Run kullanın.</value>
|
||||
<comment>"await" is a C# keyword and should not be translated.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD002_Title" xml:space="preserve">
|
||||
|
@ -64,7 +64,7 @@ Görevin temsilcinin içinde başlatılmasını sağlayarak veya Task yerine Joi
|
|||
Bunun yerine AsyncLazy<T> kullanın.</value>
|
||||
</data>
|
||||
<data name="VSTHRD011_Title" xml:space="preserve">
|
||||
<value>T’nin Task<T> olduğu durumlarda Lazy<T2> kullanmayın.</value>
|
||||
<value>AsyncLazy<T> kullanın</value>
|
||||
</data>
|
||||
<data name="VSTHRD103_MessageFormat" xml:space="preserve">
|
||||
<value>{0} zaman uyumlu olarak engeller. Bunun yerine {1} bekleyin.</value>
|
||||
|
@ -92,7 +92,7 @@ Bunun yerine AsyncLazy<T> kullanın.</value>
|
|||
<value>Async metotları için "Async" sonekini kullanın</value>
|
||||
</data>
|
||||
<data name="VSTHRD105_MessageFormat" xml:space="preserve">
|
||||
<value>TaskScheduler.Current varsayan metot aşırı yüklemelerinden kaçının. TaskScheduler kabul eden bir aşırı yükleme kullanın ve TaskScheduler.Default (veya diğer birini) açık olarak belirtin.</value>
|
||||
<value>TaskScheduler.Current varsayan metot aşırı yüklemelerinden kaçının. TaskScheduler kabul eden bir aşırı yükleme kullanın ve TaskScheduler.Default (veya başka birini) açık olarak belirtin.</value>
|
||||
</data>
|
||||
<data name="VSTHRD105_Title" xml:space="preserve">
|
||||
<value>TaskScheduler.Current varsayan metot aşırı yüklemelerinden kaçının</value>
|
||||
|
@ -108,7 +108,7 @@ Bunun yerine AsyncLazy<T> kullanın.</value>
|
|||
<value>İzin veriliyorsa JoinableTaskFactory sağlayın</value>
|
||||
</data>
|
||||
<data name="VSTHRD104_MessageFormat" xml:space="preserve">
|
||||
<value>Bu metodun, eş zamanlı olarak engellemeyen zaman uyumsuz bir sürümünü kullanıma açın. Sonra, JoinableTaskFactory.Run temsilcisi içinde bu zaman uyumsuz metodu çağırmak için bu metodu basitleştirin.</value>
|
||||
<value>Bu metodun zaman uyumlu olarak engellemeyen zaman uyumsuz bir sürümünü sunun. Sonra bir JoinableTaskFactory.Run temsilcisi içinde bu zaman uyumsuz metoda çağrı yapmak için bu metodu basitleştirin.</value>
|
||||
</data>
|
||||
<data name="VSTHRD104_Title" xml:space="preserve">
|
||||
<value>Zaman uyumsuz metotlar sunun</value>
|
||||
|
@ -142,4 +142,35 @@ Bunun yerine AsyncLazy<T> kullanın.</value>
|
|||
<data name="VSTHRD108_Title" xml:space="preserve">
|
||||
<value>İş parçacığı benzeşimini koşulsuz olarak onayla</value>
|
||||
</data>
|
||||
<data name="VSTHRD109_MessageFormat" xml:space="preserve">
|
||||
<value>Ana iş parçacığında değilken, zaman uyumsuz veya Task döndüren metot içinden özel durum oluşturmaktan kaçının. Bunun yerine, gereken iş parçacığına geçin.</value>
|
||||
</data>
|
||||
<data name="VSTHRD109_Title" xml:space="preserve">
|
||||
<value>Zaman uyumsuz metotlarda assert yerine switch</value>
|
||||
</data>
|
||||
<data name="VSTHRD010_MessageFormat_Sync" xml:space="preserve">
|
||||
<value>"{0}" erişimi yalnızca ana iş parçacığı üzerinde gerçekleştirilmelidir. Önce {1}() çağırın.</value>
|
||||
<comment>{0} is a type or member name and {1} is the name of a method that throws if not called from the main thread.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD010_MessageFormat_Async" xml:space="preserve">
|
||||
<value>"{0}" erişimi yalnızca ana iş parçacığı üzerinde gerçekleştirilmelidir. Önce JoinableTaskFactory.SwitchToMainThreadAsync() metodunu bekleyin.</value>
|
||||
<comment>{0} is a type or member name.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD004_MessageFormat" xml:space="preserve">
|
||||
<value>JoinableTaskFactory.SwitchToMainThreadAsync() çağrıları beklenmelidir.</value>
|
||||
</data>
|
||||
<data name="VSTHRD004_Title" xml:space="preserve">
|
||||
<value>SwitchToMainThreadAsync bekleyin</value>
|
||||
<comment>Do not translate either of these. The first is a keyword, the second is a method name.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD110_MessageFormat" xml:space="preserve">
|
||||
<value>Bu metot çağrısının beklenebilir sonucunu bekleyerek, bir değişkene atayarak veya bir başka metoda geçirerek gözlemleyin.</value>
|
||||
</data>
|
||||
<data name="VSTHRD110_Title" xml:space="preserve">
|
||||
<value>Zaman uyumsuz çağrıların sonucunu gözlemleyin</value>
|
||||
</data>
|
||||
<data name="VSTHRD011b_MessageFormat" xml:space="preserve">
|
||||
<value>Bir Lazy<T> değer fabrikasında zaman uyumsuz kod çağrısı veya engellemesi çıkmaza yol açabilir.
|
||||
Bunun yerine AsyncLazy<T> kullanın.</value>
|
||||
</data>
|
||||
</root>
|
|
@ -22,7 +22,7 @@
|
|||
<comment>"await" is a C# keyword and should not be translated.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD002_MessageFormat" xml:space="preserve">
|
||||
<value>同步等待任务或 awaiter 可能导致死锁。改用 await 或 JoinableTaskFactory.Run。</value>
|
||||
<value>同步等待任务或 awaiter 可能导致死锁。请等待或改用 JoinableTaskFactory.Run。</value>
|
||||
<comment>"await" is a C# keyword and should not be translated.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD002_Title" xml:space="preserve">
|
||||
|
@ -64,7 +64,7 @@
|
|||
改用 AsyncLazy<T>。</value>
|
||||
</data>
|
||||
<data name="VSTHRD011_Title" xml:space="preserve">
|
||||
<value>当 T 为 Task<T2> 时,避免使用 Lazy<T></value>
|
||||
<value>使用 AsyncLazy<T></value>
|
||||
</data>
|
||||
<data name="VSTHRD103_MessageFormat" xml:space="preserve">
|
||||
<value>{0} 同步阻止。改为 await {1}。</value>
|
||||
|
@ -108,7 +108,7 @@
|
|||
<value>在允许的地方提供 JoinableTaskFactory</value>
|
||||
</data>
|
||||
<data name="VSTHRD104_MessageFormat" xml:space="preserve">
|
||||
<value>公开这个未进行同步阻止的方法的异步版本。然后简化此方法,在 JoinableTaskFactory.Run 委托内调用该异步方法。</value>
|
||||
<value>公开此方法的异步版(不同步阻止)。然后简化此方法以在 JoinableTaskFactory.Run 委托内调用该异步方法。</value>
|
||||
</data>
|
||||
<data name="VSTHRD104_Title" xml:space="preserve">
|
||||
<value>提供异步方法</value>
|
||||
|
@ -142,4 +142,35 @@
|
|||
<data name="VSTHRD108_Title" xml:space="preserve">
|
||||
<value>无条件断言线程关联</value>
|
||||
</data>
|
||||
<data name="VSTHRD109_MessageFormat" xml:space="preserve">
|
||||
<value>在异步方法或返回任务的方法中,不在主线程上时,避免引发。请切换到要求的线程。</value>
|
||||
</data>
|
||||
<data name="VSTHRD109_Title" xml:space="preserve">
|
||||
<value>在异步方法中切换而不是断言</value>
|
||||
</data>
|
||||
<data name="VSTHRD010_MessageFormat_Sync" xml:space="preserve">
|
||||
<value>只应在主线程中访问“{0}”。请先调用 {1}()。</value>
|
||||
<comment>{0} is a type or member name and {1} is the name of a method that throws if not called from the main thread.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD010_MessageFormat_Async" xml:space="preserve">
|
||||
<value>只应在主线程中访问“{0}”。请先等待 JoinableTaskFactory.SwitchToMainThreadAsync()。</value>
|
||||
<comment>{0} is a type or member name.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD004_MessageFormat" xml:space="preserve">
|
||||
<value>对 JoinableTaskFactory.SwitchToMainThreadAsync() 的调用必须等待。</value>
|
||||
</data>
|
||||
<data name="VSTHRD004_Title" xml:space="preserve">
|
||||
<value>等待 SwitchToMainThreadAsync</value>
|
||||
<comment>Do not translate either of these. The first is a keyword, the second is a method name.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD110_MessageFormat" xml:space="preserve">
|
||||
<value>等待以观察此方法调用的可等待结果、将其分配给变量或传递给其他方法。</value>
|
||||
</data>
|
||||
<data name="VSTHRD110_Title" xml:space="preserve">
|
||||
<value>观察异步调用的结果</value>
|
||||
</data>
|
||||
<data name="VSTHRD011b_MessageFormat" xml:space="preserve">
|
||||
<value>在 Lazy<T> 值工厂中调用或阻止异步代码可能死锁。
|
||||
请改用 AsyncLazy<T></value>
|
||||
</data>
|
||||
</root>
|
|
@ -22,7 +22,7 @@
|
|||
<comment>"await" is a C# keyword and should not be translated.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD002_MessageFormat" xml:space="preserve">
|
||||
<value>同步等候工作或 awaiter 可能會造成鎖死。請改用 await 或 JoinableTaskFactory.Run。</value>
|
||||
<value>同步等候 task 或 awaiter 可能會造成死結。請改用 await 或 JoinableTaskFactory.Run。</value>
|
||||
<comment>"await" is a C# keyword and should not be translated.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD002_Title" xml:space="preserve">
|
||||
|
@ -60,14 +60,14 @@
|
|||
<value>避免在加入內容中等候不可加入的工作</value>
|
||||
</data>
|
||||
<data name="VSTHRD011_MessageFormat" xml:space="preserve">
|
||||
<value>Lazy<Task<T>>.Value 可能會鎖死。
|
||||
<value>Lazy<Task<T>>.Value 可能會造成死結。
|
||||
請改用 AsyncLazy<T>。</value>
|
||||
</data>
|
||||
<data name="VSTHRD011_Title" xml:space="preserve">
|
||||
<value>避免在 T 為 Task<T2> 時使用 Lazy<T></value>
|
||||
<value>使用 AsyncLazy<T></value>
|
||||
</data>
|
||||
<data name="VSTHRD103_MessageFormat" xml:space="preserve">
|
||||
<value>{0} 會同步封鎖。請改為 await {1}。</value>
|
||||
<value>{0} 會同步封鎖。請改用 await {1}。</value>
|
||||
</data>
|
||||
<data name="VSTHRD103_MessageFormat_UseAwaitInstead" xml:space="preserve">
|
||||
<value>{0} 會同步封鎖。請改用 await。</value>
|
||||
|
@ -92,7 +92,7 @@
|
|||
<value>對非同步方法使用 "Async" 尾碼</value>
|
||||
</data>
|
||||
<data name="VSTHRD105_MessageFormat" xml:space="preserve">
|
||||
<value>請避免假設 TaskScheduler.Current 的方法多載。請使用接受 TaskScheduler 的多載,並明確指定 TaskScheduler.Default (或其他任一項)。</value>
|
||||
<value>請避免會假設 TaskScheduler.Current 的方法多載。請使用接受 TaskScheduler 的多載,並明確指定 TaskScheduler.Default (或其他任一項)。</value>
|
||||
</data>
|
||||
<data name="VSTHRD105_Title" xml:space="preserve">
|
||||
<value>避免假設 TaskScheduler.Current 的方法多載</value>
|
||||
|
@ -108,7 +108,7 @@
|
|||
<value>在允許的情況下提供 JoinableTaskFactory</value>
|
||||
</data>
|
||||
<data name="VSTHRD104_MessageFormat" xml:space="preserve">
|
||||
<value>公開此方法不會同步封鎖的非同步版本。接著將此方法簡化成在 JoinableTaskFactory.Run delegate 中呼叫該非同步方法。</value>
|
||||
<value>提供此方法不會同步封鎖的非同步版本,讓此方法在 JoinableTaskFactory.Run 委派中只呼叫該非同步方法。</value>
|
||||
</data>
|
||||
<data name="VSTHRD104_Title" xml:space="preserve">
|
||||
<value>提供非同步方法</value>
|
||||
|
@ -142,4 +142,35 @@
|
|||
<data name="VSTHRD108_Title" xml:space="preserve">
|
||||
<value>無條件判斷提示執行緒親和性</value>
|
||||
</data>
|
||||
<data name="VSTHRD109_MessageFormat" xml:space="preserve">
|
||||
<value>使用非同步或 Task-returning 方法時,若不在主執行緒,則請避免擲回。請改為切換到需要的執行緒。</value>
|
||||
</data>
|
||||
<data name="VSTHRD109_Title" xml:space="preserve">
|
||||
<value>使用非同步方法時請切換而非判斷提示</value>
|
||||
</data>
|
||||
<data name="VSTHRD010_MessageFormat_Sync" xml:space="preserve">
|
||||
<value>"{0}" 的存取只應在主執行緒完成。請先呼叫 {1}()。</value>
|
||||
<comment>{0} is a type or member name and {1} is the name of a method that throws if not called from the main thread.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD010_MessageFormat_Async" xml:space="preserve">
|
||||
<value>"{0}" 的存取只應在主執行緒完成。請先等候 JoinableTaskFactory.SwitchToMainThreadAsync()。</value>
|
||||
<comment>{0} is a type or member name.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD004_MessageFormat" xml:space="preserve">
|
||||
<value>必須等候對 JoinableTaskFactory.SwitchToMainThreadAsync() 的呼叫。</value>
|
||||
</data>
|
||||
<data name="VSTHRD004_Title" xml:space="preserve">
|
||||
<value>等候 SwitchToMainThreadAsync</value>
|
||||
<comment>Do not translate either of these. The first is a keyword, the second is a method name.</comment>
|
||||
</data>
|
||||
<data name="VSTHRD110_MessageFormat" xml:space="preserve">
|
||||
<value>觀察此方法呼叫的可等候結果,方法是加以等候、指派至變數,或傳遞至另一個方法。</value>
|
||||
</data>
|
||||
<data name="VSTHRD110_Title" xml:space="preserve">
|
||||
<value>觀察非同步呼叫的結果</value>
|
||||
</data>
|
||||
<data name="VSTHRD011b_MessageFormat" xml:space="preserve">
|
||||
<value>在 Lazy<T> 值 Factory 中叫用或封鎖非同步程式碼可能會鎖死。
|
||||
請改用 AsyncLazy<T>。</value>
|
||||
</data>
|
||||
</root>
|
|
@ -131,6 +131,13 @@ namespace Microsoft.VisualStudio.Threading.Analyzers
|
|||
internal static readonly IReadOnlyList<string> Namespace = Namespaces.SystemThreadingTasks;
|
||||
}
|
||||
|
||||
internal static class CoClassAttribute
|
||||
{
|
||||
internal const string TypeName = nameof(System.Runtime.InteropServices.CoClassAttribute);
|
||||
|
||||
internal static readonly IReadOnlyList<string> Namespace = Namespaces.SystemRuntimeInteropServices;
|
||||
}
|
||||
|
||||
internal static class ComImportAttribute
|
||||
{
|
||||
internal const string TypeName = nameof(System.Runtime.InteropServices.ComImportAttribute);
|
||||
|
|
|
@ -438,7 +438,7 @@ namespace Microsoft.VisualStudio.Threading.Analyzers
|
|||
{
|
||||
updated = simpleLambda
|
||||
.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword))
|
||||
.WithBody(UpdateStatementsForAsyncMethod(simpleLambda.Body, semanticModel, hasReturnValue));
|
||||
.WithBody(UpdateStatementsForAsyncMethod(simpleLambda.Body, semanticModel, hasReturnValue, cancellationToken));
|
||||
}
|
||||
|
||||
var parentheticalLambda = method as ParenthesizedLambdaExpressionSyntax;
|
||||
|
@ -446,7 +446,7 @@ namespace Microsoft.VisualStudio.Threading.Analyzers
|
|||
{
|
||||
updated = parentheticalLambda
|
||||
.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword))
|
||||
.WithBody(UpdateStatementsForAsyncMethod(parentheticalLambda.Body, semanticModel, hasReturnValue));
|
||||
.WithBody(UpdateStatementsForAsyncMethod(parentheticalLambda.Body, semanticModel, hasReturnValue, cancellationToken));
|
||||
}
|
||||
|
||||
var anonymousMethod = method as AnonymousMethodExpressionSyntax;
|
||||
|
@ -454,7 +454,7 @@ namespace Microsoft.VisualStudio.Threading.Analyzers
|
|||
{
|
||||
updated = anonymousMethod
|
||||
.WithAsyncKeyword(SyntaxFactory.Token(SyntaxKind.AsyncKeyword))
|
||||
.WithBody(UpdateStatementsForAsyncMethod(anonymousMethod.Body, semanticModel, hasReturnValue));
|
||||
.WithBody(UpdateStatementsForAsyncMethod(anonymousMethod.Body, semanticModel, hasReturnValue, cancellationToken));
|
||||
}
|
||||
|
||||
if (updated == null)
|
||||
|
@ -537,7 +537,8 @@ namespace Microsoft.VisualStudio.Threading.Analyzers
|
|||
method.Body,
|
||||
semanticModel,
|
||||
hasReturnValue,
|
||||
returnTypeChanged);
|
||||
returnTypeChanged,
|
||||
cancellationToken);
|
||||
|
||||
// Apply the changes to the document, and null out stale data.
|
||||
SyntaxAnnotation methodBookmark;
|
||||
|
@ -822,24 +823,25 @@ namespace Microsoft.VisualStudio.Threading.Analyzers
|
|||
return default(T);
|
||||
}
|
||||
|
||||
private static CSharpSyntaxNode UpdateStatementsForAsyncMethod(CSharpSyntaxNode body, SemanticModel semanticModel, bool hasResultValue)
|
||||
private static CSharpSyntaxNode UpdateStatementsForAsyncMethod(CSharpSyntaxNode body, SemanticModel semanticModel, bool hasResultValue, CancellationToken cancellationToken)
|
||||
{
|
||||
var blockBody = body as BlockSyntax;
|
||||
if (blockBody != null)
|
||||
{
|
||||
return UpdateStatementsForAsyncMethod(blockBody, semanticModel, hasResultValue, returnTypeChanged: false/*probably not right, but we don't have a failing test yet.*/);
|
||||
bool returnTypeChanged = false; // probably not right, but we don't have a failing test yet.
|
||||
return UpdateStatementsForAsyncMethod(blockBody, semanticModel, hasResultValue, returnTypeChanged, cancellationToken);
|
||||
}
|
||||
|
||||
var expressionBody = body as ExpressionSyntax;
|
||||
if (expressionBody != null)
|
||||
{
|
||||
return SyntaxFactory.AwaitExpression(expressionBody).TrySimplify(expressionBody, semanticModel);
|
||||
return SyntaxFactory.AwaitExpression(expressionBody).TrySimplify(expressionBody, semanticModel, cancellationToken);
|
||||
}
|
||||
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
private static BlockSyntax UpdateStatementsForAsyncMethod(BlockSyntax body, SemanticModel semanticModel, bool hasResultValue, bool returnTypeChanged)
|
||||
private static BlockSyntax UpdateStatementsForAsyncMethod(BlockSyntax body, SemanticModel semanticModel, bool hasResultValue, bool returnTypeChanged, CancellationToken cancellationToken)
|
||||
{
|
||||
var fixedUpBlock = body.ReplaceNodes(
|
||||
body.DescendantNodes().OfType<ReturnStatementSyntax>(),
|
||||
|
@ -849,7 +851,7 @@ namespace Microsoft.VisualStudio.Threading.Analyzers
|
|||
{
|
||||
return returnTypeChanged
|
||||
? n
|
||||
: n.WithExpression(SyntaxFactory.AwaitExpression(n.Expression).TrySimplify(f.Expression, semanticModel));
|
||||
: n.WithExpression(SyntaxFactory.AwaitExpression(n.Expression).TrySimplify(f.Expression, semanticModel, cancellationToken));
|
||||
}
|
||||
|
||||
if (body.Statements.Last() == f)
|
||||
|
@ -866,7 +868,7 @@ namespace Microsoft.VisualStudio.Threading.Analyzers
|
|||
return fixedUpBlock;
|
||||
}
|
||||
|
||||
private static ExpressionSyntax TrySimplify(this AwaitExpressionSyntax awaitExpression, ExpressionSyntax originalSyntax, SemanticModel semanticModel)
|
||||
private static ExpressionSyntax TrySimplify(this AwaitExpressionSyntax awaitExpression, ExpressionSyntax originalSyntax, SemanticModel semanticModel, CancellationToken cancellationToken)
|
||||
{
|
||||
if (awaitExpression == null)
|
||||
{
|
||||
|
@ -881,7 +883,7 @@ namespace Microsoft.VisualStudio.Threading.Analyzers
|
|||
if (awaitedInvocationMemberAccess?.Name.Identifier.Text == nameof(Task.FromResult))
|
||||
{
|
||||
// Is the FromResult method on the Task or Task<T> class?
|
||||
var memberOwnerSymbol = semanticModel.GetSymbolInfo(originalSyntax).Symbol;
|
||||
var memberOwnerSymbol = semanticModel.GetSymbolInfo(originalSyntax, cancellationToken).Symbol;
|
||||
if (IsTask(memberOwnerSymbol?.ContainingType))
|
||||
{
|
||||
var simplified = awaitedInvocation.ArgumentList.Arguments.Single().Expression;
|
||||
|
|
|
@ -133,7 +133,7 @@ namespace Microsoft.VisualStudio.Threading.Analyzers
|
|||
if (invokedMemberAccess?.Name != null)
|
||||
{
|
||||
// Does the anonymous function appear as the first argument to Task.ContinueWith?
|
||||
var invokedMemberSymbol = context.SemanticModel.GetSymbolInfo(invokedMemberAccess.Name).Symbol as IMethodSymbol;
|
||||
var invokedMemberSymbol = context.SemanticModel.GetSymbolInfo(invokedMemberAccess.Name, context.CancellationToken).Symbol as IMethodSymbol;
|
||||
if (invokedMemberSymbol?.Name == nameof(Task.ContinueWith) &&
|
||||
Utils.IsEqualToOrDerivedFrom(invokedMemberSymbol?.ContainingType, taskSymbol) &&
|
||||
invocationPassingExpression?.ArgumentList?.Arguments.FirstOrDefault() == anonFuncAsArgument)
|
||||
|
@ -143,7 +143,7 @@ namespace Microsoft.VisualStudio.Threading.Analyzers
|
|||
if (firstParameter != null)
|
||||
{
|
||||
// Are we accessing a member of the completed task?
|
||||
ISymbol invokedObjectSymbol = context.SemanticModel.GetSymbolInfo(memberAccessSyntax.Expression).Symbol;
|
||||
ISymbol invokedObjectSymbol = context.SemanticModel.GetSymbolInfo(memberAccessSyntax.Expression, context.CancellationToken).Symbol;
|
||||
IParameterSymbol completedTask = context.SemanticModel.GetDeclaredSymbol(firstParameter);
|
||||
if (EqualityComparer<ISymbol>.Default.Equals(invokedObjectSymbol, completedTask))
|
||||
{
|
||||
|
|
|
@ -59,7 +59,7 @@ namespace Microsoft.VisualStudio.Threading.Analyzers
|
|||
|
||||
return document.Project.Solution;
|
||||
},
|
||||
VSTHRD002UseJtfRunAnalyzer.Id),
|
||||
"only action"),
|
||||
diagnostic);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -218,14 +218,14 @@
|
|||
switch (context.Node)
|
||||
{
|
||||
case InvocationExpressionSyntax invocationExpressionSyntax:
|
||||
targetMethod = context.SemanticModel.GetSymbolInfo(invocationExpressionSyntax.Expression).Symbol;
|
||||
targetMethod = context.SemanticModel.GetSymbolInfo(invocationExpressionSyntax.Expression, context.CancellationToken).Symbol;
|
||||
locationToBlame = invocationExpressionSyntax.Expression;
|
||||
break;
|
||||
case MemberAccessExpressionSyntax memberAccessExpressionSyntax:
|
||||
targetMethod = GetPropertyAccessor(context.SemanticModel.GetSymbolInfo(memberAccessExpressionSyntax.Name).Symbol as IPropertySymbol);
|
||||
targetMethod = GetPropertyAccessor(context.SemanticModel.GetSymbolInfo(memberAccessExpressionSyntax.Name, context.CancellationToken).Symbol as IPropertySymbol);
|
||||
break;
|
||||
case IdentifierNameSyntax identifierNameSyntax:
|
||||
targetMethod = GetPropertyAccessor(context.SemanticModel.GetSymbolInfo(identifierNameSyntax).Symbol as IPropertySymbol);
|
||||
targetMethod = GetPropertyAccessor(context.SemanticModel.GetSymbolInfo(identifierNameSyntax, context.CancellationToken).Symbol as IPropertySymbol);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -351,7 +351,7 @@
|
|||
internal void AnalyzeCast(SyntaxNodeAnalysisContext context)
|
||||
{
|
||||
var castSyntax = (CastExpressionSyntax)context.Node;
|
||||
var type = context.SemanticModel.GetSymbolInfo(castSyntax.Type).Symbol as ITypeSymbol;
|
||||
var type = context.SemanticModel.GetSymbolInfo(castSyntax.Type, context.CancellationToken).Symbol as ITypeSymbol;
|
||||
if (type != null && IsObjectLikelyToBeCOMObject(type))
|
||||
{
|
||||
this.AnalyzeMemberWithinContext(type, null, context);
|
||||
|
@ -361,7 +361,7 @@
|
|||
internal void AnalyzeAs(SyntaxNodeAnalysisContext context)
|
||||
{
|
||||
var asSyntax = (BinaryExpressionSyntax)context.Node;
|
||||
var type = context.SemanticModel.GetSymbolInfo(asSyntax.Right).Symbol as ITypeSymbol;
|
||||
var type = context.SemanticModel.GetSymbolInfo(asSyntax.Right, context.CancellationToken).Symbol as ITypeSymbol;
|
||||
if (type != null && IsObjectLikelyToBeCOMObject(type))
|
||||
{
|
||||
Location asAndRightSide = Location.Create(context.Node.SyntaxTree, TextSpan.FromBounds(asSyntax.OperatorToken.Span.Start, asSyntax.Right.Span.End));
|
||||
|
@ -384,6 +384,7 @@
|
|||
}
|
||||
|
||||
return typeSymbol.GetAttributes().Any(ad =>
|
||||
(ad.AttributeClass.Name == Types.CoClassAttribute.TypeName && ad.AttributeClass.BelongsToNamespace(Types.CoClassAttribute.Namespace)) ||
|
||||
(ad.AttributeClass.Name == Types.ComImportAttribute.TypeName && ad.AttributeClass.BelongsToNamespace(Types.ComImportAttribute.Namespace)) ||
|
||||
(ad.AttributeClass.Name == Types.InterfaceTypeAttribute.TypeName && ad.AttributeClass.BelongsToNamespace(Types.InterfaceTypeAttribute.Namespace)) ||
|
||||
(ad.AttributeClass.Name == Types.TypeLibTypeAttribute.TypeName && ad.AttributeClass.BelongsToNamespace(Types.TypeLibTypeAttribute.Namespace)));
|
||||
|
|
|
@ -127,7 +127,7 @@
|
|||
|
||||
void OfferFix(string fullyQualifiedMethod)
|
||||
{
|
||||
context.RegisterCodeFix(CodeAction.Create($"Add call to {fullyQualifiedMethod}", ct => Fix(fullyQualifiedMethod, proposedMethod, cancellationTokenSymbol, ct), $"{container.BlockOrExpression.GetLocation()}-{fullyQualifiedMethod}"), context.Diagnostics);
|
||||
context.RegisterCodeFix(CodeAction.Create($"Add call to {fullyQualifiedMethod}", ct => Fix(fullyQualifiedMethod, proposedMethod, cancellationTokenSymbol, ct), fullyQualifiedMethod), context.Diagnostics);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
using Microsoft.CodeAnalysis.Diagnostics;
|
||||
|
||||
[DiagnosticAnalyzer(LanguageNames.CSharp)]
|
||||
public class VSTHRD011LazyOfTaskAnalyzer : DiagnosticAnalyzer
|
||||
public class VSTHRD011UseAsyncLazyAnalyzer : DiagnosticAnalyzer
|
||||
{
|
||||
public const string Id = "VSTHRD011";
|
||||
|
||||
internal static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor(
|
||||
internal static readonly DiagnosticDescriptor LazyOfTaskDescriptor = new DiagnosticDescriptor(
|
||||
id: Id,
|
||||
title: Strings.VSTHRD011_Title,
|
||||
messageFormat: Strings.VSTHRD011_MessageFormat,
|
||||
|
@ -25,10 +25,19 @@
|
|||
defaultSeverity: DiagnosticSeverity.Error,
|
||||
isEnabledByDefault: true);
|
||||
|
||||
internal static readonly DiagnosticDescriptor SyncBlockInValueFactoryDescriptor = new DiagnosticDescriptor(
|
||||
id: Id,
|
||||
title: Strings.VSTHRD011_Title,
|
||||
messageFormat: Strings.VSTHRD011b_MessageFormat,
|
||||
helpLinkUri: Utils.GetHelpLink(Id),
|
||||
category: "Usage",
|
||||
defaultSeverity: DiagnosticSeverity.Error,
|
||||
isEnabledByDefault: true);
|
||||
|
||||
/// <inheritdoc />
|
||||
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
|
||||
{
|
||||
get { return ImmutableArray.Create(Descriptor); }
|
||||
get { return ImmutableArray.Create(LazyOfTaskDescriptor, SyncBlockInValueFactoryDescriptor); }
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
@ -44,7 +53,8 @@
|
|||
|
||||
private void AnalyzeNode(SyntaxNodeAnalysisContext context)
|
||||
{
|
||||
var methodSymbol = context.SemanticModel.GetSymbolInfo(context.Node).Symbol as IMethodSymbol;
|
||||
var objectCreationSyntax = (ObjectCreationExpressionSyntax)context.Node;
|
||||
var methodSymbol = context.SemanticModel.GetSymbolInfo(objectCreationSyntax, context.CancellationToken).Symbol as IMethodSymbol;
|
||||
var constructedType = methodSymbol?.ReceiverType as INamedTypeSymbol;
|
||||
var isLazyOfT = constructedType?.ContainingNamespace?.Name == nameof(System)
|
||||
&& (constructedType?.ContainingNamespace?.ContainingNamespace?.IsGlobalNamespace ?? false)
|
||||
|
@ -57,7 +67,23 @@
|
|||
&& typeArg.BelongsToNamespace(Namespaces.SystemThreadingTasks);
|
||||
if (typeArgIsTask)
|
||||
{
|
||||
context.ReportDiagnostic(Diagnostic.Create(Descriptor, context.Node.GetLocation()));
|
||||
context.ReportDiagnostic(Diagnostic.Create(LazyOfTaskDescriptor, objectCreationSyntax.Type.GetLocation()));
|
||||
}
|
||||
else
|
||||
{
|
||||
var firstArgExpression = objectCreationSyntax.ArgumentList.Arguments.FirstOrDefault()?.Expression;
|
||||
if (firstArgExpression is AnonymousFunctionExpressionSyntax anonFunc)
|
||||
{
|
||||
var problems = from invocation in anonFunc.DescendantNodes().OfType<InvocationExpressionSyntax>()
|
||||
let invokedSymbol = context.SemanticModel.GetSymbolInfo(invocation.Expression, context.CancellationToken).Symbol
|
||||
where invokedSymbol != null && CommonInterest.SyncBlockingMethods.Any(m => m.Method.IsMatch(invokedSymbol))
|
||||
select invocation.Expression;
|
||||
var firstProblem = problems.FirstOrDefault();
|
||||
if (firstProblem != null)
|
||||
{
|
||||
context.ReportDiagnostic(Diagnostic.Create(SyncBlockInValueFactoryDescriptor, firstProblem.GetLocation()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -75,7 +75,7 @@ namespace Microsoft.VisualStudio.Threading.Analyzers
|
|||
public override string Title => Strings.VSTHRD100_CodeFix_Title;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string EquivalenceKey => VSTHRD100AsyncVoidMethodAnalyzer.Descriptor.Id;
|
||||
public override string EquivalenceKey => null;
|
||||
|
||||
protected override async Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
|
|
|
@ -174,7 +174,7 @@
|
|||
return false;
|
||||
}
|
||||
|
||||
var memberSymbol = context.SemanticModel.GetSymbolInfo(memberAccessSyntax).Symbol;
|
||||
var memberSymbol = context.SemanticModel.GetSymbolInfo(memberAccessSyntax, context.CancellationToken).Symbol;
|
||||
if (memberSymbol != null)
|
||||
{
|
||||
foreach (var item in problematicMethods)
|
||||
|
@ -182,7 +182,8 @@
|
|||
if (item.Method.IsMatch(memberSymbol))
|
||||
{
|
||||
var location = memberAccessSyntax.Name.GetLocation();
|
||||
var properties = ImmutableDictionary<string, string>.Empty;
|
||||
var properties = ImmutableDictionary<string, string>.Empty
|
||||
.Add(VSTHRD103UseAsyncOptionCodeFix.ExtensionMethodNamespaceKeyName, item.ExtensionMethodNamespace != null ? string.Join(".", item.ExtensionMethodNamespace) : string.Empty);
|
||||
DiagnosticDescriptor descriptor;
|
||||
var messageArgs = new List<object>(2);
|
||||
messageArgs.Add(item.Method.Name);
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
{
|
||||
internal const string AsyncMethodKeyName = "AsyncMethodName";
|
||||
|
||||
internal const string ExtensionMethodNamespaceKeyName = "ExtensionMethodNamespace";
|
||||
|
||||
private static readonly ImmutableArray<string> ReusableFixableDiagnosticIds = ImmutableArray.Create(
|
||||
VSTHRD103UseAsyncOptionAnalyzer.Id);
|
||||
|
||||
|
@ -40,15 +42,41 @@
|
|||
public override ImmutableArray<string> FixableDiagnosticIds => ReusableFixableDiagnosticIds;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override Task RegisterCodeFixesAsync(CodeFixContext context)
|
||||
public override async Task RegisterCodeFixesAsync(CodeFixContext context)
|
||||
{
|
||||
var diagnostic = context.Diagnostics.FirstOrDefault(d => d.Properties.ContainsKey(AsyncMethodKeyName));
|
||||
if (diagnostic != null)
|
||||
{
|
||||
context.RegisterCodeFix(new ReplaceSyncMethodCallWithAwaitAsync(context.Document, diagnostic), diagnostic);
|
||||
}
|
||||
// Check that the method we're replacing the sync blocking call with actually exists.
|
||||
// This is particularly useful when the method is an extension method, since the using directive
|
||||
// would need to be present (or the namespace imply it) and we don't yet add missing using directives.
|
||||
bool asyncAlternativeExists = false;
|
||||
string asyncMethodName = diagnostic.Properties[AsyncMethodKeyName];
|
||||
if (string.IsNullOrEmpty(asyncMethodName))
|
||||
{
|
||||
asyncMethodName = "GetAwaiter";
|
||||
}
|
||||
|
||||
return Task.FromResult<object>(null);
|
||||
var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false);
|
||||
var syntaxRoot = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
|
||||
var blockingIdentifier = syntaxRoot.FindNode(diagnostic.Location.SourceSpan) as IdentifierNameSyntax;
|
||||
var memberAccessExpression = blockingIdentifier?.Parent as MemberAccessExpressionSyntax;
|
||||
|
||||
// Check whether this code was already calling the awaiter (in a synchronous fashion).
|
||||
asyncAlternativeExists |= memberAccessExpression?.Expression is InvocationExpressionSyntax invoke && invoke.Expression is MemberAccessExpressionSyntax parentMemberAccess && parentMemberAccess.Name.Identifier.Text == nameof(Task.GetAwaiter);
|
||||
|
||||
if (!asyncAlternativeExists)
|
||||
{
|
||||
// If we fail to recognize the container, assume it exists since the analyzer thought it would.
|
||||
var container = memberAccessExpression != null ? semanticModel.GetTypeInfo(memberAccessExpression.Expression, context.CancellationToken).ConvertedType : null;
|
||||
asyncAlternativeExists = container == null || semanticModel.LookupSymbols(diagnostic.Location.SourceSpan.Start, name: asyncMethodName, container: container, includeReducedExtensionMethods: true).Any();
|
||||
}
|
||||
|
||||
if (asyncAlternativeExists)
|
||||
{
|
||||
context.RegisterCodeFix(new ReplaceSyncMethodCallWithAwaitAsync(context.Document, diagnostic), diagnostic);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
@ -76,10 +104,12 @@
|
|||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string EquivalenceKey => VSTHRD103UseAsyncOptionAnalyzer.Id;
|
||||
public override string EquivalenceKey => null;
|
||||
|
||||
private string AlternativeAsyncMethod => this.diagnostic.Properties[AsyncMethodKeyName];
|
||||
|
||||
private string ExtensionMethodNamespace => this.diagnostic.Properties[ExtensionMethodNamespaceKeyName];
|
||||
|
||||
protected override async Task<Solution> GetChangedSolutionAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
var document = this.document;
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
return;
|
||||
}
|
||||
|
||||
var invokedMember = context.SemanticModel.GetSymbolInfo(memberAccessSyntax).Symbol;
|
||||
var invokedMember = context.SemanticModel.GetSymbolInfo(memberAccessSyntax, context.CancellationToken).Symbol;
|
||||
if (invokedMember != null)
|
||||
{
|
||||
foreach (var item in problematicMethods)
|
||||
|
|
|
@ -84,7 +84,7 @@ namespace Microsoft.VisualStudio.Threading.Analyzers
|
|||
private void AnalyzeInvocation(SyntaxNodeAnalysisContext context)
|
||||
{
|
||||
var invocation = (InvocationExpressionSyntax)context.Node;
|
||||
var symbol = context.SemanticModel.GetSymbolInfo(invocation.Expression).Symbol;
|
||||
var symbol = context.SemanticModel.GetSymbolInfo(invocation.Expression, context.CancellationToken).Symbol;
|
||||
if (symbol != null)
|
||||
{
|
||||
ISymbol type = null;
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
|
||||
return document.Project.Solution;
|
||||
},
|
||||
VSTHRD107AwaitTaskWithinUsingExpressionAnalyzer.Id),
|
||||
"only action"),
|
||||
diagnostic);
|
||||
|
||||
return Task.FromResult<object>(null);
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
var containingInvocationSyntax = argument?.FirstAncestorOrSelf<InvocationExpressionSyntax>();
|
||||
if (containingInvocationSyntax != null)
|
||||
{
|
||||
var symbolOfContainingMethodInvocation = context.SemanticModel.GetSymbolInfo(containingInvocationSyntax.Expression).Symbol;
|
||||
var symbolOfContainingMethodInvocation = context.SemanticModel.GetSymbolInfo(containingInvocationSyntax.Expression, context.CancellationToken).Symbol;
|
||||
return symbolOfContainingMethodInvocation?.GetAttributes().Any(a =>
|
||||
a.AttributeClass.BelongsToNamespace(Namespaces.SystemDiagnostics) &&
|
||||
a.AttributeClass.Name == nameof(System.Diagnostics.ConditionalAttribute)) ?? false;
|
||||
|
|
|
@ -45,11 +45,11 @@
|
|||
|
||||
// Only consider invocations that are direct statements. Otherwise, we assume their
|
||||
// result is awaited, assigned, or otherwise consumed.
|
||||
if (invocation.Parent is StatementSyntax)
|
||||
if (invocation.Parent?.GetType().Equals(typeof(ExpressionStatementSyntax)) ?? false)
|
||||
{
|
||||
var methodSymbol = context.SemanticModel.GetSymbolInfo(context.Node).Symbol as IMethodSymbol;
|
||||
var returnedSymbol = methodSymbol?.ReturnType;
|
||||
if (returnedSymbol.Name == Types.Task.TypeName && returnedSymbol.BelongsToNamespace(Types.Task.Namespace))
|
||||
if (returnedSymbol?.Name == Types.Task.TypeName && returnedSymbol.BelongsToNamespace(Types.Task.Namespace))
|
||||
{
|
||||
if (!Utils.GetContainingFunction(invocation).IsAsync)
|
||||
{
|
||||
|
|
|
@ -60,7 +60,7 @@ namespace Microsoft.VisualStudio.Threading.Analyzers
|
|||
this.NewName);
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string EquivalenceKey => VSTHRD200UseAsyncNamingConventionAnalyzer.Id;
|
||||
public override string EquivalenceKey => null;
|
||||
|
||||
private string NewName => this.diagnostic.Properties[NewNameKey];
|
||||
|
||||
|
|
|
@ -468,5 +468,51 @@
|
|||
IDisposable disposable = this.lck;
|
||||
disposable.Dispose();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies that the semaphore is entered in the order the requests are made.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task SemaphoreAwaitersAreQueued()
|
||||
{
|
||||
var holder = await this.lck.EnterAsync();
|
||||
|
||||
const int waiterCount = 5;
|
||||
var cts = new CancellationTokenSource[waiterCount];
|
||||
var waiters = new Task<AsyncSemaphore.Releaser>[waiterCount];
|
||||
for (int i = 0; i < waiterCount; i++)
|
||||
{
|
||||
cts[i] = new CancellationTokenSource();
|
||||
waiters[i] = this.lck.EnterAsync(cts[i].Token);
|
||||
}
|
||||
|
||||
Assert.All(waiters, waiter => Assert.False(waiter.IsCompleted));
|
||||
const int canceledWaiterIndex = 2;
|
||||
cts[canceledWaiterIndex].Cancel();
|
||||
await Assert.ThrowsAnyAsync<OperationCanceledException>(() => waiters[canceledWaiterIndex]).WithCancellation(this.TimeoutToken);
|
||||
|
||||
for (int i = 0; i < waiterCount; i++)
|
||||
{
|
||||
Assert.Equal(i == canceledWaiterIndex, waiters[i].IsCompleted);
|
||||
}
|
||||
|
||||
holder.Dispose();
|
||||
for (int i = 0; i < waiterCount; i++)
|
||||
{
|
||||
if (i == canceledWaiterIndex)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Assert that all subsequent waiters have not yet entered the semaphore.
|
||||
Assert.All(waiters.Skip(i + 1), w => Assert.True(w == waiters[canceledWaiterIndex] || !w.IsCompleted));
|
||||
|
||||
// Now accept and exit the semaphore.
|
||||
using (await waiters[i].WithCancellation(this.TimeoutToken))
|
||||
{
|
||||
// We got the semaphore and will release it.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
@ -524,6 +525,56 @@ public abstract class ReentrantSemaphoreTestBase : TestBase, IDisposable
|
|||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies that the semaphore is entered in the order the requests are made.
|
||||
/// </summary>
|
||||
[Theory]
|
||||
[MemberData(nameof(AllModes))]
|
||||
public void SemaphoreAwaitersAreQueued(ReentrantSemaphore.ReentrancyMode mode)
|
||||
{
|
||||
this.ExecuteOnDispatcher(async delegate
|
||||
{
|
||||
this.semaphore = this.CreateSemaphore(mode);
|
||||
var releaseFirstHolder = new AsyncManualResetEvent();
|
||||
var holder = this.semaphore.ExecuteAsync(() => releaseFirstHolder.WaitAsync());
|
||||
|
||||
const int waiterCount = 5;
|
||||
var cts = new CancellationTokenSource[waiterCount];
|
||||
var waiters = new Task[waiterCount];
|
||||
var enteredLog = new List<int>();
|
||||
for (int i = 0; i < waiterCount; i++)
|
||||
{
|
||||
cts[i] = new CancellationTokenSource();
|
||||
int j = i;
|
||||
waiters[i] = this.semaphore.ExecuteAsync(
|
||||
() =>
|
||||
{
|
||||
enteredLog.Add(j);
|
||||
return TplExtensions.CompletedTask;
|
||||
},
|
||||
cts[i].Token);
|
||||
}
|
||||
|
||||
Assert.All(waiters, waiter => Assert.False(waiter.IsCompleted));
|
||||
const int canceledWaiterIndex = 2;
|
||||
cts[canceledWaiterIndex].Cancel();
|
||||
await Assert.ThrowsAnyAsync<OperationCanceledException>(() => waiters[canceledWaiterIndex]).WithCancellation(this.TimeoutToken);
|
||||
|
||||
Assert.Empty(enteredLog);
|
||||
for (int i = 0; i < waiterCount; i++)
|
||||
{
|
||||
Assert.Equal(i == canceledWaiterIndex, waiters[i].IsCompleted);
|
||||
}
|
||||
|
||||
// Release the first semaphore.
|
||||
releaseFirstHolder.Set();
|
||||
|
||||
// Confirm that the rest streamed through, in the right order.
|
||||
await Assert.ThrowsAnyAsync<OperationCanceledException>(() => Task.WhenAll(waiters)).WithCancellation(this.TimeoutToken);
|
||||
Assert.Equal(Enumerable.Range(0, waiterCount).Except(new[] { canceledWaiterIndex }), enteredLog);
|
||||
});
|
||||
}
|
||||
|
||||
#pragma warning disable VSTHRD012 // Provide JoinableTaskFactory where allowed (we do this in the JTF-aware variant of these tests in a derived class.)
|
||||
protected virtual ReentrantSemaphore CreateSemaphore(ReentrantSemaphore.ReentrancyMode mode = ReentrantSemaphore.ReentrancyMode.NotAllowed, int initialCount = 1) => ReentrantSemaphore.Create(initialCount, mode: mode);
|
||||
#pragma warning restore VSTHRD012 // Provide JoinableTaskFactory where allowed
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
<DebugType>full</DebugType>
|
||||
<RunCodeAnalysis Condition=" '$(TargetFramework)' != 'portable-net45+win8+wpa81' and '$(TargetFramework)' != 'netstandard2.0' and '$(Configuration)' != 'Debug' ">true</RunCodeAnalysis>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
|
||||
<!-- Reference directly to use 4.3.1 and suppress package restore warnings. See https://github.com/dotnet/corefx/issues/29907 and https://github.com/AArnott/vs-threading/commit/357f279e44d150d2dbc305cf81fd549f2cbaed2d -->
|
||||
<RuntimeIdentifiers Condition="'$(TargetFramework)' == 'portable-net45+win8+wpa81'">;</RuntimeIdentifiers>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="MultilingualAppToolkit">
|
||||
<MultilingualAppToolkitVersion>4.0</MultilingualAppToolkitVersion>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"$schema": "https://raw.githubusercontent.com/AArnott/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
|
||||
"version": "15.8-rc",
|
||||
"version": "15.8",
|
||||
"publicReleaseRefSpec": [
|
||||
"^refs/heads/master$", // we release out of master
|
||||
"^refs/heads/v\\d+(?:\\.\\d+)?$" // we also release out of vNN branches
|
||||
|
|
Загрузка…
Ссылка в новой задаче