Skip to content

Commit d6ea433

Browse files
authored
docs: Updated Extensibility README (#33)
1 parent 2795969 commit d6ea433

File tree

2 files changed

+3
-75
lines changed

2 files changed

+3
-75
lines changed

src/NetEvolve.ForgingBlazor.Extensibility/NetEvolve.ForgingBlazor.Extensibility.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<PropertyGroup>
33
<TargetFrameworks>$(_ProjectTargetFrameworks)</TargetFrameworks>
44
<PackageTags>$(PackageTags);extensibility</PackageTags>
5+
<Description>`NetEvolve.ForgingBlazor.Extensibility` is the core extensibility package for the ForgingBlazor framework, providing the fundamental abstractions, interfaces, and base models required to build custom content processors and extend the framework's functionality. This package serves as the foundation for creating plugins, content handlers, and custom page types within the ForgingBlazor ecosystem.</Description>
56
</PropertyGroup>
67
<ItemGroup>
78
<FrameworkReference Include="Microsoft.AspNetCore.App" />

src/NetEvolve.ForgingBlazor.Extensibility/README.md

Lines changed: 2 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -98,73 +98,6 @@ public record TutorialPost : BlogPostBase, IPropertySeries, IPropertyCategories
9898
}
9999
```
100100

101-
### Building a Content Validator
102-
103-
```csharp
104-
using NetEvolve.ForgingBlazor.Extensibility.Abstractions;
105-
106-
public sealed class CustomPageValidator : IValidation
107-
{
108-
public ValueTask<bool> ValidateAsync(
109-
IValidationContext context,
110-
CancellationToken cancellationToken = default)
111-
{
112-
// Implement validation logic
113-
if (string.IsNullOrWhiteSpace(context.Content))
114-
{
115-
context.AddError("Content cannot be empty");
116-
return ValueTask.FromResult(false);
117-
}
118-
119-
return ValueTask.FromResult(true);
120-
}
121-
}
122-
```
123-
124-
### Implementing a Content Registrar
125-
126-
```csharp
127-
using NetEvolve.ForgingBlazor.Extensibility.Abstractions;
128-
129-
public sealed class CustomContentRegister : IContentRegister
130-
{
131-
public async ValueTask RegisterAsync(
132-
IContentRegistration registration,
133-
CancellationToken cancellationToken = default)
134-
{
135-
// Discover and register custom content
136-
var pages = await DiscoverPagesAsync(cancellationToken);
137-
138-
foreach (var page in pages)
139-
{
140-
registration.RegisterPage(page);
141-
}
142-
}
143-
144-
private async ValueTask<IEnumerable<CustomPage>> DiscoverPagesAsync(
145-
CancellationToken cancellationToken)
146-
{
147-
// Implementation for content discovery
148-
await Task.CompletedTask;
149-
return Enumerable.Empty<CustomPage>();
150-
}
151-
}
152-
```
153-
154-
### Transferring Services Between Providers
155-
156-
```csharp
157-
using Microsoft.Extensions.DependencyInjection;
158-
using NetEvolve.ForgingBlazor.Extensibility;
159-
160-
// Create a child service collection with inherited services
161-
var childServices = new ServiceCollection();
162-
childServices.TransferAllServices(parentServiceProvider);
163-
164-
// Build the child service provider
165-
var childProvider = childServices.BuildServiceProvider();
166-
```
167-
168101
## Architecture Considerations
169102

170103
### Extensibility Points
@@ -194,10 +127,6 @@ The package provides multiple extension points:
194127
5. **Respect Cancellation**: Always honor `CancellationToken` parameters in async methods
195128
6. **Keep Models Simple**: Avoid business logic in model classes; delegate to services or handlers
196129

197-
## Internal Access
198-
199-
The package declares internal visibility to the main `NetEvolve.ForgingBlazor` assembly, enabling tight integration while maintaining encapsulation for external consumers.
200-
201130
## Contributing
202131

203132
Contributions are welcome! Please ensure that:
@@ -213,11 +142,9 @@ This project is licensed under the MIT License. See the [LICENSE](https://github
213142

214143
## Related Packages
215144

216-
* **NetEvolve.ForgingBlazor**: Main framework implementation consuming this extensibility package
217-
* **NetEvolve.ForgingBlazor.Logging**: Logging extensions for the ForgingBlazor framework
145+
* [**NetEvolve.ForgingBlazor**](https://www.nuget.org/packages/NetEvolve.ForgingBlazor): Main framework implementation consuming this extensibility package
146+
* [**NetEvolve.ForgingBlazor.Logging**](https://www.nuget.org/packages/NetEvolve.ForgingBlazor.Logging): Logging extensions for the ForgingBlazor framework
218147

219148
---
220149

221-
For questions, issues, or contributions, please visit the project repository.
222-
223150
**Made with ❤️ by the NetEvolve Team**

0 commit comments

Comments
 (0)