Skip to content

Commit b55f32c

Browse files
committed
Add readme to nuget package
1 parent fbae314 commit b55f32c

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

ModuleBase/ModuleBase.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@
1111
<PackageIcon>Icon512.png</PackageIcon>
1212
<IncludeSymbols>true</IncludeSymbols>
1313
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
14+
<Description>OpenShock Desktop Module Framework Base. Install to make a module for OpenShock Desktop</Description>
1415
</PropertyGroup>
1516

1617
<ItemGroup>
17-
<None Include="..\README.md" Pack="true" PackagePath="\"/>
18+
<None Include=".\README.md" Pack="true" PackagePath="\"/>
1819
<None Include="..\Desktop\wwwroot\images\Icon512.png" Pack="true" PackagePath="$(PackageIcon)" />
1920
</ItemGroup>
2021

ModuleBase/README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# OpenShock Desktop Module Base
2+
3+
This module is the base for all OpenShock Desktop modules. It provides the basic structure and interfaces that all modules should implement.
4+
5+
## Installation
6+
7+
```bash
8+
dotnet add package OpenShock.Desktop.ModuleBase
9+
```
10+
11+
## Usage
12+
13+
You need to inherit the `DesktopModuleBase` class and add the `DesktopModuleAttribute` to your assembly.
14+
15+
A minimal module would look like this:
16+
17+
Note that the assembly attribute is needs to be outside a namespace to work.
18+
```csharp
19+
using OpenShock.Desktop.ModuleBase;
20+
using OpenShock.Desktop.ModuleBase.Navigation;
21+
22+
[assembly:DesktopModule(typeof(ExampleDesktopModule), "openshock.desktop.modules.examplemodule", "Example Module")]
23+
namespace OpenShock.Desktop.Modules.ExampleModule;
24+
25+
public class ExampleDesktopModule : DesktopModuleBase
26+
{
27+
public override IReadOnlyCollection<NavigationItem> NavigationComponents { get; } = [];
28+
}
29+
```
30+
31+
32+
33+
Or see the example module on how to use it.

0 commit comments

Comments
 (0)