Skip to content

Commit d680a2d

Browse files
committed
优化代码
1 parent f032bca commit d680a2d

3 files changed

Lines changed: 4 additions & 10 deletions

File tree

CoreAppUAP/App.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ protected override void OnShareTargetActivated(ShareTargetActivatedEventArgs e)
9696

9797
#endregion
9898

99-
private void EnsureWindow(IActivatedEventArgs e)
99+
private static void EnsureWindow(IActivatedEventArgs e)
100100
{
101101
if (Window.Current is not Window window) { return; }
102102

CoreAppUAP/Common/ExceptionHandling.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -205,15 +205,9 @@ public override void Post(SendOrPostCallback d, object state)
205205
}
206206

207207
/// <inheritdoc />
208-
public override SynchronizationContext CreateCopy()
209-
{
210-
return new CoreDispatcherSynchronizationContext(dispatcher);
211-
}
208+
public override SynchronizationContext CreateCopy() => new CoreDispatcherSynchronizationContext(dispatcher);
212209

213210
/// <inheritdoc />
214-
public override void Send(SendOrPostCallback d, object state)
215-
{
216-
throw new NotSupportedException("'SynchronizationContext.Send' is not supported.");
217-
}
211+
public override void Send(SendOrPostCallback d, object state) => throw new NotSupportedException("'SynchronizationContext.Send' is not supported.");
218212
}
219213
}

CoreAppUAP/Package.appxmanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<Properties>
1111
<DisplayName>CoreAppUAP</DisplayName>
12-
<PublisherDisplayName>qq251</PublisherDisplayName>
12+
<PublisherDisplayName>wherewhere</PublisherDisplayName>
1313
<Logo>Assets\StoreLogo.png</Logo>
1414
</Properties>
1515

0 commit comments

Comments
 (0)