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

FactType order #44

Open
weitzhandler opened this issue Jan 25, 2017 · 2 comments
Open

FactType order #44

weitzhandler opened this issue Jan 25, 2017 · 2 comments

Comments

@weitzhandler
Copy link
Contributor

Hi,

I'd like to ask for a change in the enum type ordering of the members.

Currently as I see, it's ordered alphabetically, but when searching for stuff, I'd want to retrieve items by priority.
For example, I want to retrieve all the facts of a person related to birth or death. Meaning all the facts that have a KnownType which is Death, Funeral, Burial etc., selecting the first significant one that's available, in this case, Death should come before Burial, but since its ordered alphabetically it's not.

Here's example code:

_Death = Person.Facts
        .OrderBy(f => f.KnownType) //Since Burial comes before Death, it will return it first.
        .FirstOrDefault(f => f.KnownType == FactType.Death || f.KnownType == FactType.Funeral);

I'm new to this repo and don't know how strict things are here about pull requests, so I'm just talking out. Meanwhile I'm gonna use a custom IComparer<KnownType>.

@misbach
Copy link
Contributor

misbach commented Jan 25, 2017

@weitzhandler We are not that strict with pull requests. The main issue is that we don't have much expertise with c#, so we might be a little slow at responding and accepting your pull requests.

Can I ask why you are using this SDK instead of the newer and preferred lite SDK?

@weitzhandler
Copy link
Contributor Author

I'm not using the light SDK, because it doesn't offer navigating thru objects via properties, only via links. Makes no sense to me. I'm strict OO, and can't afford to build the routing system from scratch.

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

No branches or pull requests

2 participants