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

No longer can set Alias for property like this: [YamlMember(Alias = "$ref")] #93

Open
BuzzyLizzy opened this issue Sep 16, 2021 · 1 comment
Labels

Comments

@BuzzyLizzy
Copy link

BuzzyLizzy commented Sep 16, 2021

I switched over from YamlDotNet to SharpYaml to investigate shortcomings of YamlDotNet is improved, but I can no longer set the Alias for a property in an object I declared as I did with YamlDotNet, like this:

    public class MessageObjectRef : IMessageObject {
        [YamlMember(Alias = "$ref")]
        public string Ref { get; set; }
    }
@xoofx xoofx added the question label Sep 16, 2021
@xoofx
Copy link
Owner

xoofx commented Sep 16, 2021

I don't know what is alias but YamlMember in SharpYaml has a ctor taking a string directly:

public YamlMemberAttribute(string name)
{
this.name = name;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants