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

Clear via type's Clear method #14

Closed
bddckr opened this issue Jan 11, 2019 · 1 comment
Closed

Clear via type's Clear method #14

bddckr opened this issue Jan 11, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@bddckr
Copy link
Contributor

bddckr commented Jan 11, 2019

The current implementation of the ClearPropertyMethod weaver only sets a reference type property to null.

The task is to instead do the following (in order):

  1. Call the getter to retrieve the current value.
  2. Compare the value against null/the type's default value.
  3. If it's null/default return early.
  4. If it's not null/default check if the type has a public void Clear() method.
  5. Call that Clear method on the value if found.
  6. If not found continue doing the existing property = default; instead.

Also update the documentation found in the Readme.

@bddckr bddckr added enhancement New feature or request and removed feature labels Jan 26, 2019
@bddckr
Copy link
Contributor Author

bddckr commented Jan 28, 2019

Closing in favor of #25.

@bddckr bddckr closed this as completed Jan 28, 2019
@bddckr bddckr removed the w_ready label Jan 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant