mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-10 09:19:06 +00:00
remove all destructors
This commit is contained in:
@@ -37,11 +37,6 @@ namespace QuickLook.Plugin.ArchiveViewer
|
||||
IconManager.ClearCache();
|
||||
}
|
||||
|
||||
~ArchiveFileListView()
|
||||
{
|
||||
Dispose();
|
||||
}
|
||||
|
||||
public void SetDataContext(object context)
|
||||
{
|
||||
treeGrid.DataContext = context;
|
||||
|
@@ -74,11 +74,6 @@ namespace QuickLook.Plugin.ArchiveViewer
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
~ArchiveInfoPanel()
|
||||
{
|
||||
Dispose();
|
||||
}
|
||||
|
||||
private void BeginLoadArchive(string path)
|
||||
{
|
||||
new Task(() =>
|
||||
|
@@ -62,10 +62,5 @@ namespace QuickLook.Plugin.ArchiveViewer
|
||||
_panel?.Dispose();
|
||||
_panel = null;
|
||||
}
|
||||
|
||||
~Plugin()
|
||||
{
|
||||
Cleanup();
|
||||
}
|
||||
}
|
||||
}
|
@@ -58,10 +58,5 @@ namespace QuickLook.Plugin.CsvViewer
|
||||
|
||||
_panel = null;
|
||||
}
|
||||
|
||||
~Plugin()
|
||||
{
|
||||
Cleanup();
|
||||
}
|
||||
}
|
||||
}
|
@@ -63,10 +63,5 @@ namespace QuickLook.Plugin.HtmlViewer
|
||||
_panel?.Dispose();
|
||||
_panel = null;
|
||||
}
|
||||
|
||||
~Plugin()
|
||||
{
|
||||
Cleanup();
|
||||
}
|
||||
}
|
||||
}
|
@@ -75,10 +75,5 @@ namespace QuickLook.Plugin.IPreviewHandlers
|
||||
_panel?.Dispose();
|
||||
_panel = null;
|
||||
}
|
||||
|
||||
~Plugin()
|
||||
{
|
||||
Cleanup();
|
||||
}
|
||||
}
|
||||
}
|
@@ -81,10 +81,5 @@ namespace QuickLook.Plugin.MailViewer
|
||||
|
||||
throw new Exception($"{path} is not a valid msg file.");
|
||||
}
|
||||
|
||||
~Plugin()
|
||||
{
|
||||
Cleanup();
|
||||
}
|
||||
}
|
||||
}
|
@@ -63,11 +63,6 @@ namespace QuickLook.Plugin.MarkdownViewer
|
||||
_panel = null;
|
||||
}
|
||||
|
||||
~Plugin()
|
||||
{
|
||||
Cleanup();
|
||||
}
|
||||
|
||||
private string GenerateMarkdownHtml(string path)
|
||||
{
|
||||
var md = File.ReadAllText(path);
|
||||
|
@@ -94,11 +94,6 @@ namespace QuickLook.Plugin.PDFViewer
|
||||
ReRenderCurrentPage();
|
||||
}
|
||||
|
||||
~PdfViewerControl()
|
||||
{
|
||||
Dispose();
|
||||
}
|
||||
|
||||
public event EventHandler CurrentPageChanged;
|
||||
|
||||
private void NavigatePage(object sender, int delta)
|
||||
|
@@ -103,10 +103,5 @@ namespace QuickLook.Plugin.PDFViewer
|
||||
{
|
||||
_context.Title = $"{Path.GetFileName(_path)} ({_pdfControl.CurrentPage + 1} / {_pdfControl.TotalPages})";
|
||||
}
|
||||
|
||||
~Plugin()
|
||||
{
|
||||
Cleanup();
|
||||
}
|
||||
}
|
||||
}
|
@@ -238,11 +238,6 @@ namespace QuickLook.Plugin.VideoViewer
|
||||
mediaElement.Play();
|
||||
}
|
||||
|
||||
~ViewerPanel()
|
||||
{
|
||||
Dispose();
|
||||
}
|
||||
|
||||
[NotifyPropertyChangedInvocator]
|
||||
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
||||
{
|
||||
|
@@ -130,11 +130,6 @@ namespace QuickLook.Controls.BusyDecorator
|
||||
Math.Max(ret.Height, _busyHost.RenderSize.Height));
|
||||
}
|
||||
|
||||
~BusyDecorator()
|
||||
{
|
||||
Dispose();
|
||||
}
|
||||
|
||||
#region IsBusyIndicatorShowing Property
|
||||
|
||||
/// <summary>
|
||||
|
@@ -48,11 +48,6 @@ namespace QuickLook
|
||||
internal event KeyEventHandler KeyDown;
|
||||
internal event KeyEventHandler KeyUp;
|
||||
|
||||
~GlobalKeyboardHook()
|
||||
{
|
||||
Dispose();
|
||||
}
|
||||
|
||||
internal static GlobalKeyboardHook GetInstance()
|
||||
{
|
||||
return _instance ?? (_instance = new GlobalKeyboardHook());
|
||||
|
@@ -85,10 +85,14 @@ namespace QuickLook.Helpers
|
||||
|
||||
var notes = string.Empty;
|
||||
|
||||
var count = 0;
|
||||
foreach (var item in json)
|
||||
{
|
||||
notes += $"# {item["name"]}\r\n\r\n";
|
||||
notes += item["body"] + "\r\n\r\n";
|
||||
|
||||
if (count++ > 10)
|
||||
break;
|
||||
}
|
||||
|
||||
var changeLogPath = Path.GetTempFileName() + ".md";
|
||||
|
@@ -152,11 +152,6 @@ namespace QuickLook
|
||||
}
|
||||
}
|
||||
|
||||
~PipeServerManager()
|
||||
{
|
||||
Dispose();
|
||||
}
|
||||
|
||||
public static PipeServerManager GetInstance()
|
||||
{
|
||||
return _instance ?? (_instance = new PipeServerManager());
|
||||
|
Reference in New Issue
Block a user