Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate Mapper system #407

Merged
merged 10 commits into from
Jul 26, 2024
Merged

Deprecate Mapper system #407

merged 10 commits into from
Jul 26, 2024

Conversation

timyhac
Copy link
Collaborator

@timyhac timyhac commented Jul 17, 2024

  • Deprecates the Mapper system (IPlcMapper, Tag<M,T>, DintPlcMapper, TagDint, ...).
  • Adds an example for using inheritance as an alternative to the Mapper system.
  • Directly exposes the NativeTagWrapper as the Tag type (i.e. deleted Tag, and renamed NativeTagWrapper -> Tag - resulting in fewer objects to garbage collect.
  • Modified the examples so they primarily use Tag instead of Tag<M,T>.
  • Modified tests to suit.

The rationale behind this change can be seen on #406

* Moves PlcMapper / Tag<M,T> system from an official class to an example.
* Add an alternative implementation for code reuse that uses inheritance.
* Clean up Examples to reflect this change.
* Remove a layer of indirection from Tag / NativeTagWrapper (directly expose NativeTagWrapper as Tag)
IPlcMapper and ITag are collaborators with TagOfT.
Since this is an example, just move them into the same file.

Move the implementations of mappers into a separate file (ExampleMappers.cs)
Although issue #406 says to **remove** these classes, start the process by deprecating them instead.
@timyhac timyhac changed the title Remove Mapper system Deprecate Mapper system Jul 26, 2024
@kyle-github
Copy link
Member

Wow. You are a machine!

@timyhac timyhac merged commit 2e13641 into master Jul 26, 2024
2 checks passed
@timyhac timyhac deleted the #406 branch July 26, 2024 21:32
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