Skip to content

[Mvvm] Mark attributes as conditional #39

@tranb3r

Description

@tranb3r

This is an optimization, and it may be premature. I'll let you decide if/when it's relevant to implement it.

I think the BindableProperty attribute (and probably all the attributes here) could be marked as Conditional.
Indeed, once the source generators have generated the code, there is no reason to keep the attribute in the published app.
This would allow the linker to get rid of the Squan.Helpers.Maui assembly in the final package, if it's not required anymore.

[AttributeUsage(AttributeTargets.Property, Inherited = false, AllowMultiple = false)]
[System.Diagnostics.Conditional(""BindablePropertyGenerator_DEBUG"")]
public class BindablePropertyAttribute : Attribute

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions