Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit13ce6b9

Browse files
authored
feat: adds mutagen daemon controller (#58)
fixescoder/internal#380Adds MutagenController service, which manages the lifecycle of the `mutagen` daemon and exposes methods to query and modify sync sessions.Sync sessions themselves are a placeholder which will need to be filled out and plumbed thru to the actual API. This just handles daemon lifecycle for now.
1 parent368f068 commit13ce6b9

File tree

17 files changed

+1082
-56
lines changed

17 files changed

+1082
-56
lines changed

‎App/App.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,14 @@
6262
</PackageReference>
6363
<PackageReferenceInclude="H.NotifyIcon.WinUI"Version="2.2.0" />
6464
<PackageReferenceInclude="Microsoft.Extensions.DependencyInjection"Version="9.0.1" />
65+
<PackageReferenceInclude="Microsoft.Extensions.Hosting"Version="9.0.1" />
66+
<PackageReferenceInclude="Microsoft.Extensions.Options"Version="9.0.1" />
6567
<PackageReferenceInclude="Microsoft.WindowsAppSDK"Version="1.6.250108002" />
6668
</ItemGroup>
6769

6870
<ItemGroup>
6971
<ProjectReferenceInclude="..\CoderSdk\CoderSdk.csproj" />
72+
<ProjectReferenceInclude="..\MutagenSdk\MutagenSdk.csproj" />
7073
<ProjectReferenceInclude="..\Vpn.Proto\Vpn.Proto.csproj" />
7174
<ProjectReferenceInclude="..\Vpn\Vpn.csproj" />
7275
</ItemGroup>

‎App/App.xaml.cs

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@
66
usingCoder.Desktop.App.ViewModels;
77
usingCoder.Desktop.App.Views;
88
usingCoder.Desktop.App.Views.Pages;
9+
usingCoder.Desktop.Vpn;
10+
usingMicrosoft.Extensions.Configuration;
911
usingMicrosoft.Extensions.DependencyInjection;
12+
usingMicrosoft.Extensions.Hosting;
1013
usingMicrosoft.UI.Xaml;
14+
usingMicrosoft.Win32;
1115

1216
namespaceCoder.Desktop.App;
1317

@@ -17,12 +21,28 @@ public partial class App : Application
1721

1822
privatebool_handleWindowClosed=true;
1923

24+
#if!DEBUG
25+
privateconststringMutagenControllerConfigSection="AppMutagenController";
26+
#else
27+
privateconststringMutagenControllerConfigSection="DebugAppMutagenController";
28+
#endif
29+
2030
publicApp()
2131
{
22-
varservices=newServiceCollection();
32+
varbuilder=Host.CreateApplicationBuilder();
33+
34+
(builder.ConfigurationasIConfigurationBuilder).Add(
35+
newRegistryConfigurationSource(Registry.LocalMachine,@"SOFTWARE\Coder Desktop"));
36+
37+
varservices=builder.Services;
38+
2339
services.AddSingleton<ICredentialManager,CredentialManager>();
2440
services.AddSingleton<IRpcController,RpcController>();
2541

42+
services.AddOptions<MutagenControllerConfig>()
43+
.Bind(builder.Configuration.GetSection(MutagenControllerConfigSection));
44+
services.AddSingleton<ISyncSessionController,MutagenController>();
45+
2646
// SignInWindow views and view models
2747
services.AddTransient<SignInViewModel>();
2848
services.AddTransient<SignInWindow>();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp