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

Allow bind Enum values in IAutoInitialize ViewModels #1916

Closed
wants to merge 4 commits into from
Closed

Allow bind Enum values in IAutoInitialize ViewModels #1916

wants to merge 4 commits into from

Conversation

candidodmv
Copy link
Contributor

## Description of Change

Currently if anyone try pass through a enum value as raw type(value or name) within INavigationParameters get an error of conversion, to solve this problem was included more conversion conditions.

Bugs Fixed

  • N/A

API Changes

N/A

PR Checklist

  • Has tests
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard

@dansiegel
Copy link
Member

replaces #1890

@dansiegel
Copy link
Member

@candidodmv can you please rebase your PR

Currently if anyone try pass through a enum value as raw type(value or name) within INavigationParameters get an error of conversion, to solve this problem was included the conditions above.
I'm considering to use only the enum name because if the value is being considered during the conversion can cause side effect because the value as number can be refered to a lot of things in navigation parameters not the enum type searched.
@candidodmv
Copy link
Contributor Author

@candidodmv can you please rebase your PR

@dansiegel could you check if the rabase is it right?

Comment on lines +8 to +20
internal class MockParameters : ParametersBase
{
public MockParameters() : base() { }
public MockParameters(string query) : base(query) { }
}

internal enum MockEnum
{
None = 0,
Foo = 1,
Bar = 2,
Fizz = 3
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

each type should be in its own file. Also mocks belong under the Mocks namespace

@dansiegel
Copy link
Member

@candidodmv sorry it took a while for me to get back to you on this. If you can make this minor change then we should be good. Also need to see why the build failed.

@dansiegel
Copy link
Member

closing this PR as I have rebased your branch and fixed the tests. This will get merged via PR #1953

@dansiegel dansiegel closed this Nov 20, 2019
@candidodmv
Copy link
Contributor Author

Thanks @dansiegel !

@lock
Copy link

lock bot commented Jan 28, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants