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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="benxu.AppPlatform.Core" Version="3.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="benxu.AppPlatform.Core" Version="3.0.2" />
                    
Directory.Packages.props
<PackageReference Include="benxu.AppPlatform.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add benxu.AppPlatform.Core --version 3.0.2
                    
#r "nuget: benxu.AppPlatform.Core, 3.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package benxu.AppPlatform.Core@3.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=benxu.AppPlatform.Core&version=3.0.2
                    
Install as a Cake Addin
#tool nuget:?package=benxu.AppPlatform.Core&version=3.0.2
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.

Version Downloads Last Updated
3.0.2 105 1/17/2026
3.0.0 96 1/13/2026
2.0.0 112 1/11/2026
1.0.0 129 12/28/2025