{"id":13629706,"url":"https://github.com/ufcpp/ValueChangedGenerator","last_synced_at":"2025-04-17T09:36:00.611Z","repository":{"id":33664829,"uuid":"37317427","full_name":"ufcpp/ValueChangedGenerator","owner":"ufcpp","description":"Roslyn Code Fix / Source Generator for generating PropertyChanged from inner struct members.","archived":false,"fork":false,"pushed_at":"2023-07-07T04:42:54.000Z","size":221,"stargazers_count":12,"open_issues_count":2,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-28T12:21:53.622Z","etag":null,"topics":["csharp-sourcegenerator"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ufcpp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-06-12T11:03:10.000Z","updated_at":"2024-08-01T22:37:16.170Z","dependencies_parsed_at":"2024-08-01T22:52:11.089Z","dependency_job_id":null,"html_url":"https://github.com/ufcpp/ValueChangedGenerator","commit_stats":null,"previous_names":["ufcpp/valuechangedganerator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ufcpp%2FValueChangedGenerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ufcpp%2FValueChangedGenerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ufcpp%2FValueChangedGenerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ufcpp%2FValueChangedGenerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ufcpp","download_url":"https://codeload.github.com/ufcpp/ValueChangedGenerator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223729572,"owners_count":17193342,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp-sourcegenerator"],"created_at":"2024-08-01T22:01:16.992Z","updated_at":"2024-11-08T20:31:47.487Z","avatar_url":"https://github.com/ufcpp.png","language":"C#","readme":"# ValueChangedGenerator\n\nA Roslyn Code Fix provider for generating PropertyChanged from inner struct members.\n\nThis inlcudes VSIX and NuGet packages of an analyzer created by using .NET Compiler Platform (Roslyn).\n\nCode Fix version (C# 6.0)\n\n- VSIX: https://visualstudiogallery.msdn.microsoft.com/bf5dbce2-b73d-4f5f-8e1c-0e1de386b7ce\n- NuGet: https://www.nuget.org/packages/ValueChangedGenerator/\n\nSource Generator version (C# 9.0)\n\n- NuGet: https://www.nuget.org/packages/ValueChangedGenerator.SourceGenerator/\n\n## Usage\n\n- Insert an inner struct named `NotifyRecord` into a class that you want to generete its properties.\n- Use 'Quick Action' (Lightbulb) to fix the code\n\n![screenshot](https://github.com/ufcpp/ValueChangedGenerator/blob/master/ValueChangedGenerator/ValueChangedGenerator/ValueChangedGenerator.Vsix/Screenshot.png)\n\n## Sample\n\noriginal source: \n\n```cs\nclass Point : BindableBase\n{\n    struct NotifyRecord\n    {\n        public int X;\n        public int Y;\n        public int Z =\u003e X * Y;\n\n        /// \u003csummary\u003e\n        /// Name.\n        /// \u003c/summary\u003e\n        public string Name;\n    }\n}\n```\n\nfixed result of the original source (`partial` modifier added):\n\n```cs\npartial class Point : BindableBase\n{\n    struct NotifyRecord\n    {\n        public int X;\n        public int Y;\n        public int Z =\u003e X * Y;\n\n        /// \u003csummary\u003e\n        /// Name.\n        /// \u003c/summary\u003e\n        public string Name;\n    }\n}\n```\n\nthe generetated source code:\n\n```cs\nusing System.ComponentModel;\n\npartial class Point\n{\n    private NotifyRecord _value;\n\n    public int X { get { return _value.X; } set { SetProperty(ref _value.X, value, XProperty); OnPropertyChanged(ZProperty); } }\n    private static readonly PropertyChangedEventArgs XProperty = new PropertyChangedEventArgs(nameof(X));\n    public int Y { get { return _value.Y; } set { SetProperty(ref _value.Y, value, YProperty); OnPropertyChanged(ZProperty); } }\n    private static readonly PropertyChangedEventArgs YProperty = new PropertyChangedEventArgs(nameof(Y));\n\n    /// \u003csummary\u003e\n    /// Name.\n    /// \u003c/summary\u003e\n    public string Name { get { return _value.Name; } set { SetProperty(ref _value.Name, value, NameProperty); } }\n    private static readonly PropertyChangedEventArgs NameProperty = new PropertyChangedEventArgs(nameof(Name));\n    public int Z =\u003e _value.Z;\n    private static readonly PropertyChangedEventArgs ZProperty = new PropertyChangedEventArgs(nameof(Z));\n}\n```\n\n","funding_links":[],"categories":["Source Generators","Do not want to test 112 ( old ISourceGenerator )"],"sub_categories":["XAML / WPF / Avalonia","1. [ThisAssembly](https://ignatandrei.github.io/RSCG_Examples/v2/docs/ThisAssembly) , in the [EnhancementProject](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enhancementproject) category"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fufcpp%2FValueChangedGenerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fufcpp%2FValueChangedGenerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fufcpp%2FValueChangedGenerator/lists"}