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

Add [Type] annotation #6

Open
tpluscode opened this issue Jan 11, 2017 · 0 comments
Open

Add [Type] annotation #6

tpluscode opened this issue Jan 11, 2017 · 0 comments
Assignees

Comments

@tpluscode
Copy link
Contributor

tpluscode commented Jan 11, 2017

As suggested by @asbjornu, it will be good to give users an option to define @type using an attribute. Of course multiple would have to be allowed.

[Type("http://schema.org/Person")]
[Type("foaf:Person")]
public class Person
{
}

It would be equivalent to the current:

public class Person
{
    public string[] Type => new string[] 
    {
        "http://schema.org/Person",
        "foaf:Person"
    }
}
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

1 participant