Push
This commit is contained in:
parent
24df19e44b
commit
b462a510b3
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using Common;
|
||||
using PreviewHandlerCommon;
|
||||
|
||||
|
@ -24,7 +25,7 @@ namespace MonacoPreviewHandler
|
|||
[STAThread]
|
||||
public override void DoPreview()
|
||||
{
|
||||
|
||||
Thread.CurrentThread.SetApartmentState(ApartmentState.STA);
|
||||
_monacoPreviewHandlerControl.DoPreview(FilePath);
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace MonacoPreviewHandler
|
|||
public override void DoPreview<T>(T dataSource)
|
||||
{
|
||||
|
||||
Thread.CurrentThread.SetApartmentState(ApartmentState.STA);
|
||||
|
||||
if (!(dataSource is string filePath))
|
||||
{
|
||||
throw new ArgumentException($"{nameof(dataSource)} for {nameof(MonacoPreviewHandler)} must be a string but was a '{typeof(T)}'");
|
||||
|
|
Loading…
Reference in a new issue