Skip to content

Commit

Permalink
支持执行启动项修改参数
Browse files Browse the repository at this point in the history
  • Loading branch information
lindexi committed Mar 2, 2022
1 parent 8951f2f commit 7b69f52
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/dotnetCampus.ApplicationStartupManager/StartupManagerBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@ public class StartupManagerBase : IStartupManager
internal ConcurrentDictionary<string, StartupTaskWrapper> StartupTaskWrappers { get; } =
new ConcurrentDictionary<string, StartupTaskWrapper>();

private List<StartupTaskWrapper> Graph { get; set; }
private List<StartupTaskWrapper>? Graph { get; set; }

private StartupContext Context { get; }
protected IStartupContext StartupContext => Context;

private IStartupLogger Logger => Context.Logger;
protected IStartupLogger Logger => Context.Logger;

public StartupManagerBase(IStartupLogger logger, /*FileConfigurationRepo configurationRepo,*/
Func<Exception, Task> fastFailAction, IMainThreadDispatcher dispatcher, bool shouldSetThreadPool = true)
Expand All @@ -73,7 +74,6 @@ public StartupManagerBase(IStartupLogger logger, /*FileConfigurationRepo configu

Context = new StartupContext(logger, /*configurationRepo,*/
fastFailAction, WaitStartupTaskAsync);

Logger.RecordTime("ManagerInitialized");
}

Expand Down Expand Up @@ -454,10 +454,9 @@ StartupTaskBase IStartupManager.GetStartupTask<T>()
private static string StartupTypeToKey(Type type)
=> type.Name.Remove(type.Name.Length - "startup".Length);

internal virtual Task<string> ExecuteStartupTaskAsync(StartupTaskBase startupTask, IStartupContext context,
bool uiOnly)
internal virtual Task<string> ExecuteStartupTaskAsync(StartupTaskBase startupTask,IStartupContext context, bool uiOnly)
{
return startupTask.JoinAsync(context, uiOnly);
return startupTask.JoinAsync(Context, uiOnly);
}
}
}

0 comments on commit 7b69f52

Please sign in to comment.