Skip to content

Commit 62fc912

Browse files
committed
Replaced Doxygen with DocFX
1 parent c2dd5d8 commit 62fc912

File tree

11 files changed

+95
-57
lines changed

11 files changed

+95
-57
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
/src/_ReSharper.*/
88
/src/*/obj/
99
/src/*/bin/
10-
/doc/*.tag
10+
/doc/obj/
11+
/doc/api/
1112

1213
# Output
1314
/artifacts/

build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ pushd $PSScriptRoot
44

55
src\build.ps1 $Version
66
src\test.ps1
7-
doc\build.ps1 $Version
7+
doc\build.ps1
88

99
popd

doc/Doxyfile

Lines changed: 0 additions & 25 deletions
This file was deleted.

doc/build.ps1

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
1-
Param ($Version = "1.0-dev")
2-
$ErrorActionPreference = "Stop"
1+
$ErrorActionPreference = "Stop"
32
pushd $PSScriptRoot
43

5-
echo "Downloading references to other documentation..."
6-
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls11,Tls12'
7-
Invoke-WebRequest https://common.nano-byte.net/nanobyte-common.tag -OutFile nanobyte-common.tag
8-
9-
if (Test-Path ..\artifacts\Documentation) {rm -Recurse -Force ..\artifacts\Documentation}
10-
mkdir ..\artifacts\Documentation | Out-Null
11-
12-
$env:VERSION = $Version
13-
..\0install.ps1 run --batch https://apps.0install.net/devel/doxygen.xml
4+
..\0install.ps1 run --batch https://apps.0install.net/dotnet/docfx.xml --loglevel=warning --warningsAsErrors docfx.json
145
if ($LASTEXITCODE -ne 0) {throw "Exit Code: $LASTEXITCODE"}
156

167
popd

doc/docfx.json

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"metadata": [
3+
{
4+
"src": [
5+
{
6+
"src": "../artifacts/Release/net6.0-windows",
7+
"files": [
8+
"NanoByte.StructureEditor*.dll"
9+
]
10+
}
11+
],
12+
"dest": "api"
13+
}
14+
],
15+
"build": {
16+
"globalMetadata": {
17+
"_baseUrl": "https://structure-editor.nano-byte.net/",
18+
"_appTitle": "NanoByte Structure Editor",
19+
"_appFooter": "Copyright Bastian Eicher",
20+
"_disableBreadcrumb": true,
21+
"_enableNewTab": true
22+
},
23+
"content": [
24+
{
25+
"files": [
26+
"*.md",
27+
"toc.yml",
28+
"api/*.yml"
29+
]
30+
}
31+
],
32+
"resource": [
33+
{
34+
"files": [
35+
"*.png"
36+
]
37+
}
38+
],
39+
"overwrite": [
40+
{
41+
"src": "../src/",
42+
"files": [
43+
"**/*.md"
44+
]
45+
}
46+
],
47+
"xref": [
48+
"https://common.nano-byte.net/xrefmap.yml"
49+
],
50+
"xrefService": [
51+
"https://xref.docs.microsoft.com/query?uid={uid}"
52+
],
53+
"dest": "../artifacts/Documentation"
54+
}
55+
}

doc/main.md renamed to doc/index.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,40 @@
1+
---
2+
title: Home
3+
---
4+
5+
# NanoByte Structure Editor
6+
17
NanoByte Structure Editor is a WinForms library that helps you build split-screen editors for your data structures, consisting of:
28

39
1. a collapsible tree-view of the data structure,
4-
2. a graphical editor for the currently selected node in the tree (`PropertyGrid` or custom) and
10+
2. a graphical editor for the currently selected node in the tree (<xref:System.Windows.Forms.PropertyGrid> or custom) and
511
3. a text editor (based on [ICSharpCode.TextEditor](https://github.com/nano-byte/ICSharpCode.TextEditor)) with a serialized (XML) representation of the currently selected node.
612

713
This allows you to create an IDE-like experience for your users when editing complex domain specific languages, configuration files, etc..
814

9-
\image html screenshot.png
10-
11-
[**GitHub repository**](https://github.com/nano-byte/structure-editor)
15+
![](screenshot.png)
1216

1317
## Usage
1418

1519
Add a reference to the [NanoByte.StructureEditor.WinForms](https://www.nuget.org/packages/NanoByte.StructureEditor.WinForms/) NuGet package to your project. It is available for .NET Framework 2.0+.
1620

1721
### Initialization
1822

19-
Create an instance of \ref NanoByte.StructureEditor.WinForms.StructureEditor "StructureEditor<T>" and add it to your Form:
20-
```{.cs}
23+
Create an instance of <xref:NanoByte.StructureEditor.WinForms.StructureEditor`1> and add it to your Form:
24+
```csharp
2125
var editor = new StructureEditor<MyData>();
2226
Controls.Add(editor);
2327
```
2428

25-
Alternatively, you may want to derive your own class from \ref NanoByte.StructureEditor.WinForms.StructureEditor "StructureEditor<T>". This will allow you to use the graphical WinForms designer in Visual Studio (which does not support generic types) to place the Editor on your Form.
26-
```{.cs}
29+
Alternatively, you may want to derive your own class from <xref:NanoByte.StructureEditor.WinForms.StructureEditor`1>. This will allow you to use the graphical WinForms designer in Visual Studio (which does not support generic types) to place the Editor on your Form.
30+
```csharp
2731
public class MyDataEditor : StructureEditor<MyData>
2832
{}
2933
```
3034

3135
You need to "describe" your data structure to the Editor. You can do this directly after instantiating the editor or in the constructor of your derived class.
32-
- Call \ref NanoByte.StructureEditor.IStructureEditor.DescribeRoot "DescribeRoot()" and then use the fluent API provided as a return value to describe the properties on your main data type.
33-
- Call \ref NanoByte.StructureEditor.IStructureEditor.Describe<TContainer> "Describe<TContainer>()" to describe the properties on a data type `TContainer` exposed by another property. You can use multiple calls with different type parameters to describe arbitrarily deep hierarchies.
36+
- Call [DescribeRoot()](xref:NanoByte.StructureEditor.IStructureEditor`1#NanoByte_StructureEditor_IStructureEditor_1_DescribeRoot_System_String_) and then use the fluent API provided as a return value to describe the properties on your main data type.
37+
- Call [Describe<TContainer>()](xref:NanoByte.StructureEditor.IStructureEditor`1#NanoByte_StructureEditor_IStructureEditor_1_Describe__1) to describe the properties on a data type `TContainer` exposed by another property. You can use multiple calls with different type parameters to describe arbitrarily deep hierarchies.
3438

3539
The fluent API provides the following methods:
3640
- `.AddProperty()` describes a simple value property.
@@ -39,7 +43,7 @@ The fluent API provides the following methods:
3943

4044
There are numerous overloads for each of these methods, e.g., allowing you to specify a custom editor control for a data type or to keep the auto-generated one.
4145

42-
```{.cs}
46+
```csharp
4347
editor.DescribeRoot("Address Book")
4448
.AddPlainList("Group", x => x.Groups);
4549
editor.Describe<IContactContainer>()
@@ -54,13 +58,13 @@ editor.Describe<Contact>()
5458

5559
### Storage
5660

57-
Use the \ref NanoByte.StructureEditor.WinForms.StructureEditor.Open "Open()" method to load an XML file into the editor:
58-
```{.cs}
61+
Use the [Open()](xref:NanoByte.StructureEditor.WinForms.StructureEditor`1#NanoByte_StructureEditor_WinForms_StructureEditor_1_Open_NanoByte_Common_Undo_ICommandManager__0__) method to load an XML file into the editor:
62+
```csharp
5963
editor.Open(CommandManager<AddressBook>.Load(path));
6064
```
6165

62-
Use the \ref NanoByte.Common.Undo.ICommandManager.Save "Save()" method on the \ref NanoByte.StructureEditor.WinForms.StructureEditor.CommandManager "CommandManager" property to save the editor's content as an XML file:
63-
```{.cs}
66+
Use the [Save()](xref:NanoByte.Common.Undo.ICommandManager`1#NanoByte_Common_Undo_ICommandManager_1_Save_System_String_) method on the [CommandManager](xref:NanoByte.StructureEditor.WinForms.StructureEditor`1#NanoByte_StructureEditor_WinForms_StructureEditor_1_CommandManager) property to save the editor's content as an XML file:
67+
```csharp
6468
editor.CommandManager.Save(path);
6569
```
6670

doc/toc.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
- name: Home
2+
href: index.md
3+
- name: API
4+
href: api/
5+
- name: GitHub
6+
href: https://github.com/nano-byte/structure-editor

src/StructureEditor.WinForms/_Namespace.cs

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
uid: NanoByte.StructureEditor.WinForms
3+
summary: *content
4+
---
5+
WinForms controls for building split-screen editors for data structures.

src/StructureEditor/_Namespace.cs

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)