Skip to content

Make RecordMetadata.DateTime nullable#1403

Merged
masesdevelopers merged 2 commits intomasterfrom
1402-timestamp-in-recordmetadata-does-not-exist-if-hastimestamp-is-false
Feb 28, 2026
Merged

Make RecordMetadata.DateTime nullable#1403
masesdevelopers merged 2 commits intomasterfrom
1402-timestamp-in-recordmetadata-does-not-exist-if-hastimestamp-is-false

Conversation

@masesdevelopers
Copy link
Contributor

Description

Return a nullable DateTime for RecordMetadata.DateTime and guard conversion with HasTimestamp(). This avoids producing a DateTime for records without a timestamp (returns null instead). Also updated the XML doc comment to reflect the nullable return and changed the conversion logic to only call Timestamp() when HasTimestamp() is true.

Related Issue

closed #1402

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Return a nullable DateTime for RecordMetadata.DateTime and guard conversion with HasTimestamp(). This avoids producing a DateTime for records without a timestamp (returns null instead). Also updated the XML doc comment to reflect the nullable return and changed the conversion logic to only call Timestamp() when HasTimestamp() is true.
@masesdevelopers masesdevelopers self-assigned this Feb 28, 2026
@masesdevelopers masesdevelopers added bug Something isn't working KNet KNet related issue .NET Pull requests that update .net code labels Feb 28, 2026
Applies the fix of masesgroup/KEFCore#446 to avoid errors when executing some tests
@masesdevelopers masesdevelopers merged commit e25fec7 into master Feb 28, 2026
133 checks passed
@masesdevelopers masesdevelopers deleted the 1402-timestamp-in-recordmetadata-does-not-exist-if-hastimestamp-is-false branch February 28, 2026 15:55
masesdevelopers added a commit that referenced this pull request Feb 28, 2026
* Make RecordMetadata.DateTime nullable

Return a nullable DateTime for RecordMetadata.DateTime and guard conversion with HasTimestamp(). This avoids producing a DateTime for records without a timestamp (returns null instead). Also updated the XML doc comment to reflect the nullable return and changed the conversion logic to only call Timestamp() when HasTimestamp() is true.

* Apply the fix for test execution on GitHub

Applies the fix of masesgroup/KEFCore#446 to avoid errors when executing some tests
masesdevelopers added a commit that referenced this pull request Feb 28, 2026
* Make RecordMetadata.DateTime nullable

Return a nullable DateTime for RecordMetadata.DateTime and guard conversion with HasTimestamp(). This avoids producing a DateTime for records without a timestamp (returns null instead). Also updated the XML doc comment to reflect the nullable return and changed the conversion logic to only call Timestamp() when HasTimestamp() is true.

* Apply the fix for test execution on GitHub

Applies the fix of masesgroup/KEFCore#446 to avoid errors when executing some tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working KNet KNet related issue .NET Pull requests that update .net code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Timestamp in RecordMetadata does not exist if HasTimestamp is false

1 participant