Tildom.Services
8.1.1
Prefix Reserved
dotnet add package Tildom.Services --version 8.1.1
NuGet\Install-Package Tildom.Services -Version 8.1.1
<PackageReference Include="Tildom.Services" Version="8.1.1" />
<PackageVersion Include="Tildom.Services" Version="8.1.1" />
<PackageReference Include="Tildom.Services" />
paket add Tildom.Services --version 8.1.1
#r "nuget: Tildom.Services, 8.1.1"
#:package Tildom.Services@8.1.1
#addin nuget:?package=Tildom.Services&version=8.1.1
#tool nuget:?package=Tildom.Services&version=8.1.1
Tildom.Services
Tildom.Services is a .NET package that provides services and wrappers for working with application state and Azure services, specifically Blob Storage and Azure Form Recognizer. The package includes utility classes to manage state in Blazor applications and interact with Azure Blob Storage and Azure Form Recognizer.
Installation
To install Tildom.Services, run the following command in the NuGet Package Manager Console:
Install-Package Tildom.Services
Features
- AppState: A class to manage and notify changes in application state, especially useful in Blazor applications.
- AzureBlobStorageWrapper: A class to simplify interaction with Azure Blob Storage.
- AzureFormRecognizerWrapper: A class to simplify interaction with Azure Form Recognizer services.
Usage
1. AppState
The AppState class implements INotifyPropertyChanged and is designed to manage global state in Blazor applications. It can be consumed using the CascadingValue component.
Example in Blazor:
@page "/"
@using Tildom.Services
@inject AppState AppState
<CascadingValue Value="AppState" IsFixed="true">
<StatusBar />
</CascadingValue>
@code {
protected override void OnInitialized() {
AppState.Message = "Hello from the AppState!";
}
}
In the StatusBar component:
@code {
[CascadingParameter] public AppState? AppState { get; set; }
protected override void OnInitialized() {
if (AppState != null) {
AppState.PropertyChanged += OnAppStateChanged;
}
}
private void OnAppStateChanged(object? sender, PropertyChangedEventArgs e) {
if (e.PropertyName == nameof(AppState.Message)) {
StateHasChanged();
}
}
}
2. AzureBlobStorageWrapper
The AzureBlobStorageWrapper class wraps around the BlobServiceClient provided by the Azure SDK, making it easier to initialize and use Blob Storage in your application.
Example usage:
using Tildom.Services;
using Azure.Storage.Blobs;
var blobStorageWrapper = new AzureBlobStorageWrapper("<your_connection_string>");
BlobContainerClient containerClient = blobStorageWrapper.ServiceClient.GetBlobContainerClient("<container_name>");
3. AzureFormRecognizerWrapper
The AzureFormRecognizerWrapper class simplifies interaction with the Azure Form Recognizer API. It wraps the DocumentAnalysisClient provided by the Azure SDK and manages settings like the API key, endpoint, and model ID.
Example usage:
using Tildom.Services;
using Azure.AI.FormRecognizer.DocumentAnalysis;
var settings = new AzureFormRecognizerSettings {
Endpoint = "<your_endpoint>",
ApiKey = "<your_api_key>",
ModelId = "<your_model_id>"
};
var formRecognizerWrapper = new AzureFormRecognizerWrapper(settings);
var client = formRecognizerWrapper.Client;
Settings for AzureFormRecognizerWrapper
public class AzureFormRecognizerSettings {
public string Endpoint { get; init; } = string.Empty;
public string ApiKey { get; init; } = string.Empty;
public string ModelId { get; init; } = string.Empty;
}
Contributing
Feel free to open issues or submit pull requests for improvements and features.
License
This project is licensed under the MIT License - see the LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Azure.AI.FormRecognizer (>= 4.1.0)
- Azure.Storage.Blobs (>= 12.23.0)
- Microsoft.AspNetCore.DataProtection (>= 9.0.1)
- Microsoft.Extensions.Caching.Memory (>= 9.0.1)
- Microsoft.Extensions.Configuration (>= 9.0.1)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.1)
- System.Text.Json (>= 9.0.1)
- Tildom.Core (>= 8.1.0)
-
net9.0
- Azure.AI.FormRecognizer (>= 4.1.0)
- Azure.Storage.Blobs (>= 12.23.0)
- Microsoft.AspNetCore.DataProtection (>= 9.0.1)
- Microsoft.Extensions.Caching.Memory (>= 9.0.1)
- Microsoft.Extensions.Configuration (>= 9.0.1)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.1)
- System.Text.Json (>= 9.0.1)
- Tildom.Core (>= 8.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 8.1.1 | 200 | 1/16/2025 |