Skip to content

Conversation

@ChuckNovice
Copy link
Owner

Summary

  • Make Domain classes internal to hide implementation details from library consumers
  • Make repository interfaces and MongoDB providers internal
  • Change CreateRecurrenceAsync and CreateOccurrenceAsync to return CalendarEntry instead of domain types
  • Update CalendarEntry property accessibility with proper immutability rules
  • Allow Type and ResourcePath changes on standalone occurrences (previously blocked)
  • Add OriginalResourcePath tracking for database lookups when ResourcePath is modified

Breaking Changes

Change Before After
CreateRecurrenceAsync return type Task<Recurrence> Task<CalendarEntry>
CreateOccurrenceAsync return type Task<Occurrence> Task<CalendarEntry>
Domain classes visibility public internal
Repository interfaces visibility public internal
CalendarEntry.Organization set init (immutable)
CalendarEntry.EntryType set init (immutable)
CalendarEntry.TimeZone set init (immutable)
CalendarEntry.EndTime set internal set
CalendarEntry IDs set init (immutable)
Standalone occurrence Type/ResourcePath immutable mutable

Property Mutability Rules

Always mutable: StartTime, Duration, Extensions

Mutable on standalone occurrences and recurrences only: Type, ResourcePath

Always immutable: Organization, EntryType, TimeZone, RecurrenceId, OccurrenceId, OverrideId, ExceptionId, RecurrenceDetails, Original

Test plan

  • Build succeeds
  • All 131 unit tests pass
  • Type change on standalone occurrence now succeeds (previously failed)
  • Type/ResourcePath changes on virtualized occurrences still blocked

🤖 Generated with Claude Code

- Make Domain classes (Recurrence, Occurrence, OccurrenceException,
  OccurrenceOverride) internal to hide implementation details
- Make repository interfaces internal
- Make RecurrenceEngine and MongoDB repositories/mapper internal
- Change CreateRecurrenceAsync and CreateOccurrenceAsync to return
  CalendarEntry instead of domain types
- Update CalendarEntry property accessibility:
  - Immutable: Organization, EntryType, TimeZone, RecurrenceId,
    OccurrenceId, OverrideId, ExceptionId, RecurrenceDetails, Original
  - Mutable on all: StartTime, Duration, Extensions
  - Mutable on standalone/recurrence only: Type, ResourcePath
- Add OriginalResourcePath tracking for database lookups when
  ResourcePath is modified
- Allow Type and ResourcePath changes on standalone occurrences
- Block Type and ResourcePath changes on virtualized occurrences
- Add InternalsVisibleTo for test projects and DynamicProxyGenAssembly2

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@ChuckNovice ChuckNovice merged commit 148a121 into main Jan 28, 2026
2 checks passed
@ChuckNovice ChuckNovice deleted the feature/api-improvements-internal-visibility branch January 28, 2026 02:10
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.

2 participants