This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private IHost host = null!; | |
public static IServiceProvider ServiceProvider { get; private set; } = null!; | |
protected override async void OnStartup(StartupEventArgs e) | |
{ | |
host = CreateHostBuilder(e.Args).Build(); | |
ServiceProvider = host.Services; | |
await host.StartAsync(); | |
MainWindow = host.Services.GetRequiredService<MainWindow>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[GenerateDependencyProperty("Processing", typeof(bool))] | |
[GenerateDependencyProperty("PageSizeSelection", typeof(int[]))] | |
public partial class FormulaView : UserControl | |
{ | |
private readonly IMessenger messenger; | |
public FormulaView() | |
{ | |
InitializeComponent(); | |
var scope = App.ServiceProvider.CreateScope(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Security.Cryptography; | |
using System.Text; | |
namespace Demo | |
{ | |
/// <summary> | |
/// 密码加密帮助类 | |
/// 使用特定算法(SHA256或SHA512和盐值对密码进行加密) | |
/// 将密码以{hash,salt,algorithm}的形式储存以避免明文储存机密带来的安全风险 |