Skip to content

Add [Type] annotation #6

@tpluscode

Description

@tpluscode

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"
    }
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions