Skip to content

Commit

Permalink
Automated dotnet-format update
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Mar 17, 2022
1 parent 7c020cd commit 2c9af20
Show file tree
Hide file tree
Showing 20 changed files with 26 additions and 25 deletions.
2 changes: 1 addition & 1 deletion demo/WPFDemo/WPFDemo.App/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Windows;
using System.Windows;

[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ public interface IMainThreadDispatcher
/// <returns></returns>
Task InvokeAsync(Action action);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ public interface IStartupContext
//Task<string> ReadCacheAsync(string key, string @default = "");
Task WaitStartupTaskAsync(string startupKey);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ public interface IStartupLogger
Task RecordDuration(string taskName, Func<Task<string>> task);
void ReportResult(IReadOnlyList<IStartupTaskWrapper> wrappers);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ public interface IStartupManager

StartupTaskBase GetStartupTask<T>() where T : StartupTaskBase;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ public interface IStartupTaskWrapper
string StartupTaskKey { get; }
bool UIOnly { get; }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ public interface IStartupValueProvider<out T>
{
T ProvideValue();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ internal sealed class NullObjectStartup : StartupTaskBase
{

}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ public enum StartupCategory
/// </summary>
All = 1,
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ public StartupContext(IStartupLogger logger, /*FileConfigurationRepo configurati
FastFail = fastFailAction ?? (exception => StartupTaskBase.CompletedTask);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ public enum StartupCriticalLevel
/// </summary>
Critical,
}
}
}
5 changes: 3 additions & 2 deletions src/dotnetCampus.ApplicationStartupManager/StartupLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ public class StartupLoggerBase : IStartupLogger
private readonly Stopwatch _mainWatch;

protected ConcurrentDictionary<string, (string threadName, long start, long elapsed)>
MilestoneDictionary { get; } = new ConcurrentDictionary<string, (string, long, long)>();
MilestoneDictionary
{ get; } = new ConcurrentDictionary<string, (string, long, long)>();

public StartupLoggerBase()
{
Expand Down Expand Up @@ -54,4 +55,4 @@ public virtual void ReportResult(IReadOnlyList<IStartupTaskWrapper> wrappers)
{
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ public enum StartupScheduler
/// </summary>
UIOnly,
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ public string[]? AfterTaskList
/// </summary>
public StartupCriticalLevel CriticalLevel { get; set; }
}
}
}
4 changes: 2 additions & 2 deletions src/dotnetCampus.ApplicationStartupManager/StartupTaskBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ protected virtual Task RunAsync(IStartupContext context)
protected TValue FetchValue<TStartup, TValue>() where TStartup : StartupTaskBase, IStartupValueProvider<TValue>
{
var task = Manager.GetStartupTask<TStartup>();
var v = (IStartupValueProvider<TValue>)task;
var v = (IStartupValueProvider<TValue>) task;
return v.ProvideValue();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ public StartupTaskBuilder AddFollowTasks(string beforeTasks)
return this;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ static class StartupTaskHelper
return string.Empty;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class StartupTaskMetadata
/// </summary>
/// <param name="key">表示此 <see cref="StartupTaskBase"/> 的唯一标识符。</param>
/// <param name="creator">此 <see cref="StartupTaskBase"/> 实例的创建方法。</param>
public StartupTaskMetadata( string key, Func<StartupTaskBase> creator)
public StartupTaskMetadata(string key, Func<StartupTaskBase> creator)
{
Key = key ?? throw new ArgumentNullException(nameof(key));
_taskLazy = new Lazy<StartupTaskBase>(
Expand Down Expand Up @@ -58,4 +58,4 @@ public StartupTaskMetadata( string key, Func<StartupTaskBase> creator)
/// </summary>
public StartupCriticalLevel CriticalLevel { get; set; }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ internal class StartupTaskWrapper : IStartupTaskWrapper

public StartupCategory Categories { get; internal set; } = StartupCategory.All;

public StartupTaskBase TaskBase { get; internal set; }
// 框架注入,一定不为空
public StartupTaskBase TaskBase { get; internal set; }
// 框架注入,一定不为空
= null!;
public bool UIOnly { get; internal set; }
public StartupCriticalLevel CriticalLevel { get; set; }
Expand Down Expand Up @@ -88,4 +88,4 @@ public async void ExecuteTask(IEnumerable<StartupTaskBase> dependencies, Startup
#pragma warning restore CS4014 // 由于此调用不会等待,因此在调用完成前将继续执行当前方法
}
}
}
}
2 changes: 1 addition & 1 deletion src/dotnetCampus.ApplicationStartupManager/VisitState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ internal enum VisitState
Visiting,
Visited,
}
}
}

0 comments on commit 2c9af20

Please sign in to comment.