提交 001468fb 编写于 作者: J Jonathon Marolf

Adding comments and removing optional parameter

上级 e6c8b5e2
......@@ -29,6 +29,7 @@ protected AbstractPackage()
protected override void Initialize()
{
base.Initialize();
// Assume that we are being initialized on the UI thread at this point.
var defaultForegroundThreadData = ForegroundThreadData.CreateDefault(defaultKind: ForcedByPackageInitialize);
ForegroundThreadAffinitizedObject.CurrentForegroundThreadData = defaultForegroundThreadData;
_foregroundObject = new ForegroundThreadAffinitizedObject(defaultForegroundThreadData);
......
......@@ -44,6 +44,7 @@ protected override void Initialize()
{
base.Initialize();
// Assume that we are being initialized on the UI thread at this point.
ForegroundThreadAffinitizedObject.CurrentForegroundThreadData = ForegroundThreadData.CreateDefault(defaultKind: ForcedByPackageInitialize);
Debug.Assert(ForegroundThreadAffinitizedObject.CurrentForegroundThreadData.Kind != Unknown);
......
......@@ -26,10 +26,10 @@ internal static class ForegroundThreadDataInfo
static ForegroundThreadDataInfo()
{
s_fallbackForegroundThreadDataKind = CreateDefault();
s_fallbackForegroundThreadDataKind = CreateDefault(Unknown);
}
internal static ForegroundThreadDataKind CreateDefault(ForegroundThreadDataKind defaultKind = Unknown)
internal static ForegroundThreadDataKind CreateDefault(ForegroundThreadDataKind defaultKind)
{
var syncConextTypeName = SynchronizationContext.Current?.GetType().FullName;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册