DispatcherCore 1.1.0

dotnet add package DispatcherCore --version 1.1.0                
NuGet\Install-Package DispatcherCore -Version 1.1.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DispatcherCore" Version="1.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DispatcherCore --version 1.1.0                
#r "nuget: DispatcherCore, 1.1.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install DispatcherCore as a Cake Addin
#addin nuget:?package=DispatcherCore&version=1.1.0

// Install DispatcherCore as a Cake Tool
#tool nuget:?package=DispatcherCore&version=1.1.0                

DispatcherCore

介绍

一个WPF异步操作常用功能库.

使用介绍

首先在程序入口处增加初始化代码


///目的是为了初始化UI主线程
DispatcherCore.DispatcherCore.Initialize();

初始化完了以后,无论在什么线程中使用都可以直接调用:

//该方法为同步方法,即会等待完成才会继续执行后面代码
DispatcherCore.DispatcherCore.RunInUI(()=>
{ 
DoSomething(); //这里就可以写入需要在UI 线程运行的逻辑代码

 });

//该方法为异步方法
DispatcherCore.DispatcherCore.AsyncRunInUI(()=>
{
   AsyncDoSomething(); //这里就可以写入需要在UI 线程异步运行的逻辑代码 
});

喜欢就给颗星
QQ群:318860399
微信公众号:明月心技术学堂
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net5.0-windows7.0 is compatible.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net6.0-windows7.0 is compatible.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net7.0-windows7.0 is compatible.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
.NET Framework net40 is compatible.  net403 was computed.  net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 is compatible.  net481 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 3.1

    • No dependencies.
  • .NETFramework 4.0

    • No dependencies.
  • .NETFramework 4.5

    • No dependencies.
  • .NETFramework 4.6.1

    • No dependencies.
  • .NETFramework 4.8

    • No dependencies.
  • .NETFramework 4.8.1

    • No dependencies.
  • net5.0-windows7.0

    • No dependencies.
  • net6.0-windows7.0

    • No dependencies.
  • net7.0-windows7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.0 329 12/16/2022
1.0.0 407 12/19/2021