Use SharpConsoleUI to build full terminal (TUI) applications in .NET — equally suited to full-screen single-window apps and multi-window desktops with overlapping draggable…
ManagedCode.Communication
Use ManagedCode.Communication when a .NET application needs explicit result objects, structured errors, and predictable service or API boundaries instead of exception-driven control flow. USE FOR: integrating ManagedCode.Communication into services or APIs; replacing exception-driven result handling with explicit results; reviewing service boundaries that return. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.
Trigger On
- integrating
ManagedCode.Communicationinto services or APIs - replacing exception-driven result handling with explicit results
- reviewing service boundaries that return success or failure payloads
- documenting result-pattern usage across ASP.NET Core or application services
- mapping application errors to RFC 7807 problem details, Minimal API results, SignalR filters, or Orleans call filters
Workflow
- Confirm the boundary where the library belongs:
- service result contracts - application manager boundaries - API endpoints that translate results into HTTP responses
- Keep result creation and error mapping explicit instead of mixing exceptions, nulls, and ad-hoc tuples.
- Pattern-match result objects at the boundary that converts them into user-facing responses.
- Do not hide domain failures behind generic success wrappers.
- Configure framework integration only where it removes manual translation:
- ConfigureCommunication() for ASP.NET Core logging and converters - WithCommunicationResults() for Minimal API endpoint or group conversion - Orleans or SignalR packages only when those runtime filters are actually in use
- Validate positive, negative, and error-path handling after integration.
flowchart LR
A["Domain or service operation"] --> B["ManagedCode.Communication result"]
B --> C["Application or API boundary"]
C --> D["HTTP response or caller-visible contract"]Deliver
- guidance on where explicit result objects improve clarity
- usage boundaries for translating results into API or caller responses
- validation expectations for success and failure flows
- package and integration choices for the actual runtime boundary
Validate
- result handling is consistent across the boundary that uses the library
- callers do not fall back to exception-only logic for normal failure cases
- negative and error scenarios are documented and tested
- Minimal API endpoints return expected success and RFC 7807 failure shapes
- pagination metadata is stable when
CollectionResult<T>is used - Orleans or SignalR integration is covered by runtime-level tests when those packages are installed
Related skills
Use ManagedCode.MimeTypes when a .NET application needs consistent MIME type detection, extension mapping, and content-type decisions for uploads, downloads, or HTTP responses.
Use the Microsoft.Extensions stack correctly across Generic Host, dependency injection, configuration, logging, options, HttpClientFactory, and other shared infrastructure…
These are the skills our senior team ships with. Want us to build your system? Book a 15-min call.