Skip to content

Commit f45124b

Browse files
committed
Update to version 3.0 and clean up project structure
Bumped the plugin version from 2.0 to 3.0. Removed unused `AssemblyInfo.cs` and adjusted `ExportAllFormats.csproj` to improve formatting and include stricter package references. Simplified code styling for `AssemblyUtils` to match modern conventions.
1 parent 4d13eaa commit f45124b

File tree

4 files changed

+32
-68
lines changed

4 files changed

+32
-68
lines changed

source/SaveAllFormat/EntryPoint.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class ExportAllFormats : IPlugin
99
{
1010
public string Name { get; } = "Export all formats";
1111
public string Text { get; } = "Export all formats";
12-
public decimal Version { get; } = 2.0m;
12+
public decimal Version { get; } = 3.0m;
1313
public string Description { get; } = "Export current subtitle to all available text format.";
1414
public string ActionType { get; } = "file";
1515
public string Shortcut { get; } = string.Empty;
Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<PropertyGroup>
3-
<OutputType>Library</OutputType>
4-
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
5-
<UseWindowsForms>true</UseWindowsForms>
6-
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
7-
<AssemblyVersion>2.0.0</AssemblyVersion>
8-
<FileVersion>2.0.0</FileVersion>
9-
</PropertyGroup>
10-
<PropertyGroup />
11-
<PropertyGroup>
12-
<!-- <PostBuildEvent>copy $(TargetDir)\exportallformats.dll "%25appdata%25\Subtitle Edit\Plugins\"-->
13-
<!--copy $(TargetDir)\exportallformats.pdb "%25appdata%25\Subtitle Edit\Plugins\"</PostBuildEvent>-->
14-
</PropertyGroup>
15-
<ItemGroup>
16-
<PackageReference Include="libse" />
17-
</ItemGroup>
18-
<!-- <Import Project="..\Plugin-Shared\Plugin-Shared.projitems" Label="Shared" />-->
2+
<PropertyGroup>
3+
<OutputType>Library</OutputType>
4+
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
5+
<UseWindowsForms>true</UseWindowsForms>
6+
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
7+
<AssemblyVersion>3.0.0</AssemblyVersion>
8+
<FileVersion>3.0.0</FileVersion>
9+
</PropertyGroup>
10+
<PropertyGroup/>
11+
<PropertyGroup>
12+
<!-- <PostBuildEvent>copy $(TargetDir)\exportallformats.dll "%25appdata%25\Subtitle Edit\Plugins\"-->
13+
<!--copy $(TargetDir)\exportallformats.pdb "%25appdata%25\Subtitle Edit\Plugins\"</PostBuildEvent>-->
14+
</PropertyGroup>
15+
<ItemGroup>
16+
<PackageReference Include="libse" IncludeAssets="compile"/>
17+
</ItemGroup>
18+
<!-- <Import Project="..\Plugin-Shared\Plugin-Shared.projitems" Label="Shared" />-->
1919
</Project>

source/SaveAllFormat/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
namespace Nikse.SubtitleEdit.PluginLogic.Utils
1+
namespace Nikse.SubtitleEdit.PluginLogic.Utils;
2+
3+
using System;
4+
using System.Linq;
5+
using System.Reflection;
6+
7+
public static class AssemblyUtils
28
{
3-
using System;
4-
using System.Linq;
5-
using System.Reflection;
9+
private static Assembly _libseCached;
610

7-
public static class AssemblyUtils
11+
public static Assembly GetLibse()
812
{
9-
private static Assembly _libseCached;
10-
11-
public static Assembly GetLibse()
13+
if (_libseCached == null)
1214
{
13-
if (_libseCached == null)
14-
{
15-
_libseCached = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault(asm => asm.GetName().Name.Equals("libse"));
16-
}
17-
return _libseCached;
15+
_libseCached = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault(asm => asm.GetName().Name.Equals("libse"));
1816
}
17+
18+
return _libseCached;
1919
}
20-
}
20+
}

0 commit comments

Comments
 (0)