response-result

Community

Clear success/failure UI handling

AuthorFaysilAlshareef
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Many UI components must handle nullable responses, exceptions, and inconsistent gateway errors which leads to scattered null checks and try/catch blocks in the UI. ResponseResult<T> centralizes success and failure outcomes so components can handle results deterministically and present consistent user feedback.

Core Features & Use Cases

  • Encapsulates gateway success or failure using SuccessResult and FailedResult typed outcomes.
  • Provides Switch and SwitchAsync handlers to route to success actions or failure actions and to avoid null checks and UI exceptions.
  • Uses ProblemDetails for structured error information and integrates snackbar notifications and navigation on success or failure.
  • Common uses include create and load operations in Blazor components, server-side data grid pagination, and consistent error reporting for gateway calls.

Quick Start

Use the response-result guidance to handle gateway responses in your Blazor component by calling Switch or SwitchAsync to show snackbars and navigate on success or failure.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: response-result
Download link: https://github.com/FaysilAlshareef/dotnet-ai-kit/archive/main.zip#response-result

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.