Add ZibStack.NET.Result package with Map/Bind/Match monad#2
Merged
Conversation
Functional Result<T> type for eliminating manual error propagation. Includes Error types, sync/async extensions, Combine, Ensure, Tap, implicit conversions, and comprehensive test suite.
- PaginatedResponse<T>: generic wrapper with Items, TotalCount, Page, PageSize, TotalPages, HasNextPage, HasPreviousPage, Map(), CreateAsync() - QueryDto(Sortable = true): adds SortBy/SortDirection properties, ApplySort() with case-insensitive switch, Apply() convenience method - DefaultSort and DefaultSortDirection configuration - SortDirection enum (Asc/Desc) - Tests for both features - Updated README with docs and examples
…trings Roslyn analyzer + code fix that detects logger.LogInformation($"...") calls and suggests using LogInformationEx() instead for structured logging. Includes analyzer unit tests and CI integration.
Compile-time validation with zero reflection. Supports attributes: [Required], [MinLength], [MaxLength], [Range], [Email], [Url], [Match], [NotEmpty]. Generates Validate() returning ValidationResult. Types implement IValidatable interface. Works with classes and records.
…rloads
- ZibException captures template + properties from interpolated strings
for structured logging: throw new ZibException($"Order {id} not found")
- ZibException<TCode> for typed error codes
- LogTo(logger) method for structured exception logging
- LogException() extension: structured logging for ZibException, fallback for others
- Add missing Exception overloads to LogTraceEx, LogDebugEx, LogInformationEx, LogWarningEx
- Dto generator now propagates ZibStack.NET.Validation attributes alongside DataAnnotations
MistyKuu
added a commit
that referenced
this pull request
Apr 16, 2026
…refs in CodeMap, doc cleanup
TypeGen — generator-side direct file writes (option B):
- TryWriteFilesDirectly runs from inside the source generator's
RegisterSourceOutput callback, alongside the manifest .g.cs emission.
Same content-equality skip + banner-based stale sweep as the MSBuild
task in build/.targets — both paths converge on the same on-disk state.
- Wrapped in try/catch and pragma'd around RS1035 (analyzer file-IO ban).
Sandboxed analyzer hosts (some Rider configs, restricted CI containers)
silently fall back to the MSBuild path at build time.
- ProjectDir threaded in via AnalyzerConfigOptionsProvider
(build_property.MSBuildProjectDirectory) so relative OutputDir paths
resolve identically to the MSBuild task.
- Net effect: editing a model + Ctrl+S in the IDE refreshes the .ts /
.yaml / .py files immediately. Previously needed a 'dotnet build'.
Dto CodeMap — easier navigation to generated artifacts:
- All <see cref> references now FULLY QUALIFIED ("{ns}.{TypeName}").
Bare names worked only when the user happened to be in scope; FQN crefs
resolve from any file in the solution (F12 / Go-to-Definition lands
on the generated .g.cs source).
- Added a banner line pointing at the on-disk location pattern
('obj/<config>/<tfm>/generated/ZibStack.NET.Dto/<EntityName>.*.g.cs')
so users with file-search habits ('go to file' Ctrl+P) find them too.
- Each cref entry now wraps the method names in <c>...</c> for IDE tooltip
formatting consistency.
Docs:
- typegen.md Output mechanism rewritten: explains the live-write path #1
(default, generator-side) AND the MSBuild path #2 (always at build).
Notes that both share the content-skip + stale-sweep behavior.
- typegen.md gains a new 'Targeting Dto-generated companion DTOs' section
documenting the synthesis path: why
b.ForType<CreateArticleRequest>().WithGeneratedTypes(TS) works without
a [GenerateTypes] anchor or symbol resolution (uses parent assembly scan
+ Dto naming-pattern detection).
- dto/fluent-config.md Limitations section trimmed and updated. Removed the
now-obsolete claims that .RenameTo on Query and .Flatten() are entirely
unwired — both surface methods exist in the interface, only their
back-end behavior is partial. Per-property fluent on [CreateDtoFor] /
[UpdateDtoFor] noted as the only remaining gap.
- Astro build clean: 40 pages.
96/96 TypeGen + 240/240 Dto passing. No regressions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Functional Result type for eliminating manual error propagation.
Includes Error types, sync/async extensions, Combine, Ensure, Tap,
implicit conversions, and comprehensive test suite.