benxu.AppPlatform.Core
3.0.2
dotnet add package benxu.AppPlatform.Core --version 3.0.2
NuGet\Install-Package benxu.AppPlatform.Core -Version 3.0.2
<PackageReference Include="benxu.AppPlatform.Core" Version="3.0.2" />
<PackageVersion Include="benxu.AppPlatform.Core" Version="3.0.2" />
<PackageReference Include="benxu.AppPlatform.Core" />
paket add benxu.AppPlatform.Core --version 3.0.2
#r "nuget: benxu.AppPlatform.Core, 3.0.2"
#:package benxu.AppPlatform.Core@3.0.2
#addin nuget:?package=benxu.AppPlatform.Core&version=3.0.2
#tool nuget:?package=benxu.AppPlatform.Core&version=3.0.2
benxu.AppPlatform.Core
核心抽象層 - 定義所有介面、模型、DTOs 和 Result Pattern。
特色
- 無依賴:此套件不依賴任何第三方套件
- 抽象優先:所有服務都定義為介面
- Result Pattern:提供完整的錯誤處理模式
- 事件驅動:支援狀態變更事件通知
核心介面
IAuthService- 身份驗證服務 (包含 Google 登入、Email 註冊/登入等)IPushNotificationService- 推播通知服務ILocalStorage- 本地儲存服務IAppStateManager- 應用程式狀態管理IFirestoreService- Firestore 資料庫服務 (CRUD、查詢)IFirestoreQuery- Firestore 查詢介面IFirestoreBatch- Firestore 批次操作介面
安裝
dotnet add package benxu.AppPlatform.Core
使用範例
using benxu.AppPlatform.Core.Abstractions;
public class MyService
{
private readonly IAuthService _authService;
public MyService(IAuthService authService)
{
_authService = authService;
}
public async Task LoginAsync()
{
var result = await _authService.SignInWithGoogleAsync();
if (result.IsSuccess)
{
Console.WriteLine($"登入成功: {result.Data.User.Email}");
}
else
{
Console.WriteLine($"登入失敗: {result.ErrorMessage}");
}
}
}
授權
MIT License - Copyright (c) 2025 benxu
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Xamarin.Build.Download (>= 0.11.4)
NuGet packages (9)
Showing the top 5 NuGet packages that depend on benxu.AppPlatform.Core:
| Package | Downloads |
|---|---|
|
benxu.AppPlatform.MAUI.Bootstrap
Bootstrap package for benxu App Platform. Provides fluent API for one-line service registration and lifecycle management. |
|
|
benxu.AppPlatform.Firebase.Auth
Firebase Authentication implementation for benxu App Platform. Provides Google Sign-In, Email/Password authentication with automatic token refresh. |
|
|
benxu.AppPlatform.Firebase.Fcm
Firebase Cloud Messaging (FCM) implementation for benxu App Platform - Provides push notification services with deep link routing. |
|
|
benxu.AppPlatform.Storage.LiteDB
LiteDB storage implementation for benxu App Platform. Provides offline-first local database with key-value and collection storage capabilities. |
|
|
benxu.AppPlatform.BlazorUI
Blazor UI component library for benxu App Platform - Provides reusable UI components. |
GitHub repositories
This package is not used by any popular GitHub repositories.