Skip to content

Commit e9e2761

Browse files
committed
update
1 parent 2f68bf0 commit e9e2761

3 files changed

Lines changed: 59 additions & 1 deletion

File tree

AGENT.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# DiffPlex Development Guide
2+
3+
## Build/Test Commands
4+
- Build: `dotnet build`
5+
- Test all: `dotnet test`
6+
- Test single project: `dotnet test Facts.DiffPlex`
7+
- Test specific class: `dotnet test Facts.DiffPlex --filter "FullyQualifiedName~InlineDiffBuilderFacts"`
8+
- Test specific method: `dotnet test --filter "FullyQualifiedName~ClassName.MethodName"`
9+
- Restore packages: `dotnet restore`
10+
11+
## Code Style Guidelines
12+
- **Classes/Interfaces**: PascalCase (interfaces with "I" prefix)
13+
- **Methods/Properties**: PascalCase
14+
- **Fields/Parameters/Variables**: camelCase
15+
- **Constants**: PascalCase
16+
- Use expression-bodied members for simple getters
17+
- Modern C# collection initialization: `data.Pieces = [];`
18+
- Null checks with `ArgumentNullException` for public APIs
19+
- Singleton pattern with static `Instance` properties
20+
21+
## Test Conventions
22+
- Test classes: `*Facts` suffix (e.g., `DifferFacts`)
23+
- Use xUnit with `[Fact]` attributes
24+
- Nested classes to organize related tests
25+
- Descriptive test names: `Will_throw_if_parameter_is_null`
26+
- Use Moq for mocking dependencies
27+
28+
## Error Handling
29+
- Throw `ArgumentNullException` for null parameters in public APIs
30+
- Use descriptive parameter names in exceptions

DiffPlex.Blazor/Components/Pages/Home.razor

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,13 @@ This is a sample text
7676
for demonstrating diff functionality.
7777
Line 5
7878
Line 6
79-
Line 7";
79+
Line 7
80+
Line 9
81+
Deleted Line";
8082

8183
private string newText = @"The quick red fox
8284
jumps over the lazy cat.
85+
New Line
8386
This is a sample text
8487
for demonstrating diff functionality.
8588
Line 5 modified

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,31 @@ DiffPlex also contains a sample website that shows how to create a basic side by
198198

199199
![Web page sample](./images/website.png)
200200

201+
## Sample Blazor App
202+
203+
DiffPlex includes a Blazor component library and sample application demonstrating how to render textual diffs in modern Blazor applications. The sample showcases both server-side and client-side rendering capabilities with interactive diff visualization.
204+
205+
[Screenshot placeholder - Blazor app overview]
206+
207+
The Blazor components provide:
208+
- Interactive side-by-side diff rendering
209+
- Inline diff view mode
210+
- Responsive design for various screen sizes
211+
- Customizable styling and themes
212+
- Real-time diff updates
213+
214+
[Screenshot placeholder - Side-by-side diff view]
215+
216+
[Screenshot placeholder - Inline diff view]
217+
218+
To run the sample Blazor application:
219+
```bash
220+
cd DiffPlex.Blazor
221+
dotnet run
222+
```
223+
224+
The Blazor library is available as a NuGet package for integration into your own Blazor applications.
225+
201226
# Windows app
202227

203228
There are 2 libraries for Windows app development.

0 commit comments

Comments
 (0)