Skip to content
This repository was archived by the owner on Jan 13, 2024. It is now read-only.

Commit 5c1e16b

Browse files
committed
code cleanup
1 parent 78712f5 commit 5c1e16b

File tree

2 files changed

+6
-17
lines changed

2 files changed

+6
-17
lines changed
Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using System;
22
using System.Runtime.InteropServices;
3-
using Kbg.NppPluginNET;
43

54
namespace NppPlugin.DllExport
65
{
@@ -10,26 +9,20 @@ partial class DllExportAttribute : Attribute
109
public DllExportAttribute()
1110
{
1211
}
12+
1313
public DllExportAttribute(string exportName)
1414
: this(exportName, CallingConvention.StdCall)
1515
{
1616
}
17+
1718
public DllExportAttribute(string exportName, CallingConvention callingConvention)
1819
{
1920
ExportName = exportName;
2021
CallingConvention = callingConvention;
2122
}
22-
CallingConvention _callingConvention;
23-
public CallingConvention CallingConvention
24-
{
25-
get { return _callingConvention; }
26-
set { _callingConvention = value; }
27-
}
28-
string _exportName;
29-
public string ExportName
30-
{
31-
get { return _exportName; }
32-
set { _exportName = value; }
33-
}
23+
24+
public CallingConvention CallingConvention { get; set; }
25+
26+
public string ExportName { get; set; }
3427
}
3528
}

Visual Studio Project Template C#/NppPluginNETBase.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,9 @@ namespace Kbg.NppPluginNET
66
{
77
class PluginBase
88
{
9-
#region " Fields "
109
internal static NppData nppData;
1110
internal static FuncItems _funcItems = new FuncItems();
12-
#endregion
1311

14-
#region " Helper "
1512
internal static void SetCommand(int index, string commandName, NppFuncItemDelegate functionPointer)
1613
{
1714
SetCommand(index, commandName, functionPointer, new ShortcutKey(), false);
@@ -43,6 +40,5 @@ internal static IntPtr GetCurrentScintilla()
4340
Win32.SendMessage(nppData._nppHandle, NppMsg.NPPM_GETCURRENTSCINTILLA, 0, out curScintilla);
4441
return (curScintilla == 0) ? nppData._scintillaMainHandle : nppData._scintillaSecondHandle;
4542
}
46-
#endregion
4743
}
4844
}

0 commit comments

Comments
 (0)