Skip to content

Add ZibStack.NET.Result package with Map/Bind/Match monad#2

Merged
MistyKuu merged 5 commits into
masterfrom
claude/add-missing-features-QRjCg
Apr 6, 2026
Merged

Add ZibStack.NET.Result package with Map/Bind/Match monad#2
MistyKuu merged 5 commits into
masterfrom
claude/add-missing-features-QRjCg

Conversation

@MistyKuu

@MistyKuu MistyKuu commented Apr 6, 2026

Copy link
Copy Markdown
Owner

Functional Result type for eliminating manual error propagation.
Includes Error types, sync/async extensions, Combine, Ensure, Tap,
implicit conversions, and comprehensive test suite.

MistyKuu added 5 commits April 6, 2026 10:09
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 MistyKuu merged commit 48934be into master Apr 6, 2026
1 check failed
@MistyKuu MistyKuu deleted the claude/add-missing-features-QRjCg branch April 6, 2026 16:36
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant