mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-08-19 10:23:25 +08:00
feat.RSS阅读器
This commit is contained in:
@@ -10,6 +10,11 @@ internal static class AirAppInstanceKey
|
||||
return $"{normalizedAppId}:clock-suite:global";
|
||||
}
|
||||
|
||||
if (string.Equals(normalizedAppId, "rss-reader", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return $"{normalizedAppId}:global";
|
||||
}
|
||||
|
||||
var normalizedComponentId = Normalize(sourceComponentId, "none");
|
||||
var normalizedPlacementId = Normalize(sourcePlacementId, "none");
|
||||
return $"{normalizedAppId}:{normalizedComponentId}:{normalizedPlacementId}";
|
||||
|
||||
@@ -42,7 +42,8 @@ internal sealed class AirAppLifecycleService : IAirAppLifecycleService
|
||||
sessionId,
|
||||
instanceKey,
|
||||
request.SourceComponentId,
|
||||
request.SourcePlacementId);
|
||||
request.SourcePlacementId,
|
||||
request.TargetEntryId);
|
||||
if (process is null)
|
||||
{
|
||||
return Task.FromResult(BuildResult(false, "start_failed", "AirAppHost process was not created.", null));
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace LanMountainDesktop.AirAppRuntime;
|
||||
|
||||
internal interface IAirAppProcessStarter
|
||||
{
|
||||
Process? Start(string appId, string sessionId, string instanceKey, string? sourceComponentId, string? sourcePlacementId);
|
||||
Process? Start(string appId, string sessionId, string instanceKey, string? sourceComponentId, string? sourcePlacementId, string? targetEntryId = null);
|
||||
}
|
||||
|
||||
internal sealed class AirAppProcessStarter : IAirAppProcessStarter
|
||||
@@ -32,7 +32,8 @@ internal sealed class AirAppProcessStarter : IAirAppProcessStarter
|
||||
string sessionId,
|
||||
string instanceKey,
|
||||
string? sourceComponentId,
|
||||
string? sourcePlacementId)
|
||||
string? sourcePlacementId,
|
||||
string? targetEntryId = null)
|
||||
{
|
||||
var hostPath = _locator.Resolve(_packageRootProvider(), _hostPathProvider());
|
||||
var startInfo = CreateStartInfo(hostPath);
|
||||
@@ -57,6 +58,11 @@ internal sealed class AirAppProcessStarter : IAirAppProcessStarter
|
||||
AddArgument(startInfo, "--source-placement-id", sourcePlacementId.Trim());
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(targetEntryId))
|
||||
{
|
||||
AddArgument(startInfo, "--target-entry-id", targetEntryId.Trim());
|
||||
}
|
||||
|
||||
AirAppRuntimeLogger.Info(
|
||||
$"Starting AirAppHost. AppId='{appId}'; InstanceKey='{instanceKey}'; HostPath='{hostPath}'; DataRoot='{dataRoot ?? string.Empty}'.");
|
||||
var process = Process.Start(startInfo);
|
||||
|
||||
Reference in New Issue
Block a user