Skip to content

Use Increment() instead of _result++ in C# code - #46

Open
konard wants to merge 3 commits into
mainfrom
issue-38-f52ecf64
Open

Use Increment() instead of _result++ in C# code#46
konard wants to merge 3 commits into
mainfrom
issue-38-f52ecf64

Conversation

@konard

@konard konard commented Sep 13, 2025

Copy link
Copy Markdown
Member

Summary

This PR addresses issue #38 by replacing direct _result++ increments with calls to the Increment() method in the IncrementAndReturnTrue methods.

Changes Made

  • Replaced _result++ with Increment() in IncrementAndReturnTrue() method (line 71)
  • Replaced _result++ with Increment() in IncrementAndReturnTrue(TValue value) method (line 92)
  • Maintained the same functionality while using the proper abstraction

Test Results

All existing tests continue to pass:

  • ParameterlessConstructedSetterTest ✓
  • ConstructedWithDefaultValueSetterTest ✓
  • MethodsWithBooleanReturnTypeTest ✓
  • MethodsWithIntegerReturnTypeTest ✓

The change ensures that incrementing behavior is consistently handled through the Increment() method rather than direct field manipulation.

Fixes #38

🤖 Generated with Claude Code

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #38
@konard konard self-assigned this Sep 13, 2025
…True methods

- Changed direct _result++ increments to use the Increment() method
- Maintains consistent behavior while following the issue requirement
- All tests continue to pass after the change

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard changed the title [WIP] Use Increment() instead of _result++ at C# code version Use Increment() instead of _result++ in C# code Sep 13, 2025
@konard
konard marked this pull request as ready for review September 13, 2025 05:57
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.

Use Increment() instead of _result++ at C# code version

1 participant