{"id":29111483,"url":"https://github.com/mathtone/mist","last_synced_at":"2025-08-10T20:04:57.776Z","repository":{"id":143004195,"uuid":"55399936","full_name":"mathtone/MIST","owner":"mathtone","description":"Implements change notification for properties (ie: INotifyPropertyChanged) using IL weaving and a custom Visual Studio build task.","archived":false,"fork":false,"pushed_at":"2022-05-21T03:00:11.000Z","size":479,"stargazers_count":49,"open_issues_count":2,"forks_count":7,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-07-31T11:16:27.112Z","etag":null,"topics":["csharp","dotnet","inotifypropertychanged","inpc","mist","mvvm","nuget","ui","visual-studio"],"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/mathtone.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-04-04T09:40:35.000Z","updated_at":"2024-04-20T16:35:42.000Z","dependencies_parsed_at":"2024-06-21T18:54:40.461Z","dependency_job_id":null,"html_url":"https://github.com/mathtone/MIST","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/mathtone/MIST","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathtone%2FMIST","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathtone%2FMIST/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathtone%2FMIST/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathtone%2FMIST/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mathtone","download_url":"https://codeload.github.com/mathtone/MIST/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathtone%2FMIST/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269780615,"owners_count":24474682,"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","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","dotnet","inotifypropertychanged","inpc","mist","mvvm","nuget","ui","visual-studio"],"created_at":"2025-06-29T10:01:14.866Z","updated_at":"2025-08-10T20:04:57.749Z","avatar_url":"https://github.com/mathtone.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MIST\nImplements change notification for properties (ie: INotifyPropertyChanged) using IL weaving and a custom Visual Studio build task.\n\nThis is how it works:\n\n**The NuGet package now covers .NET framework versions 4.0-4.7.**\n\n1. Create a WPF project in visual studio, Target any framework 4.0 - 4.7 (if there's any favorable response I'll set up other frameworks in the NuGet package, what I've done should mostly work for all of them)\n2. In the package manager type the NuGet command: `install-package Mathtone.MIST`. Visual Studio will prompt you to reload the project.\n3. This should set everything up, adding a reference to the Mathtone.MIST assembly (which only contains the attribute classes you will use to decorate your code), copying the Mathtone.MIST.Builder and Mono.Cecil (this is the framework that does the actual weaving of IL operations, a fine piece of work) assemblies to the NuGet package \"tools\" folder.  Additionally, it executes a nonthreatening script that modifies your project file and adds the post build task.\n\nUsing MIST from Nuget.org\n\n1. Install MIST build components (available from nuget.org) in the project containing classes for which you would like notification to be automatically implemented.\n\nInstall-Package Mathtone.MIST\n\n2. If you unload and Edit the project file, it should contain a build task similar to the following:The location of the Mathtone.MIST.Builder assembly is the default and can be changed by modifying your local Nuget.config file (If you install MIST via the nuget package, this should be handled for you).\n\n\u0026lt;UsingTask TaskName=\"Mathtone.MIST.NotificationWeaverBuildTask\"      AssemblyFile=\"$(ProjectDir)..\\packages\\Mathtone.MIST.1.0.1\\tools\\Mathtone.MIST.Builder.dll\" /\u0026gt;\n   \u0026lt;Target Name=\"AfterBuild\"\u0026gt;\n   \u0026lt;NotificationWeaverBuildTask TargetPath=\"$(TargetPath)\" DebugMode=\"True\" /\u0026gt;\n\u0026lt;/Target\u0026gt;\n\nApply notification attributes\n\n3. Use the \"NotifierAttribute\", \"NotifyAttribute\" and \"NotifyTargetAttributte\"\n\nTypical usage scenario:\n\n    public class NotifierBase : INotifyPropertyChanged {\n\n\t\t[NotifyTarget]\n\t\tprotected void RaisePropertyChanged(string propertyName) {\n\t\t\tvar method = PropertyChanged;\n\t\t\tif (method != null) {\n\t\t\t\tPropertyChanged(this, new PropertyChangedEventArgs(propertyName));\n\t\t\t}\n\t\t}\n\n\t\tpublic event PropertyChangedEventHandler PropertyChanged;\n    }\n\n\t[Notifier(NotificationMode.Implicit)]\n\tpublic class ImplicitTestNotifier : NotifierBase {\n\n\t\tpublic string Property1 { get; set; }\n\n\t\tpublic string Property2 { get; set; }\n\n\t\tpublic string Property3 { get; set; }\n\n\t\t[SupressNotify]\n\t\tpublic string Supressed { get; set; }\n\n\t\t[Notify(\"Prop1And2\", \"Property1\", \"Property2\")]\n\t\tpublic string Prop1And2 { get; set; }\n\t}\n\n\t[Notifier]\n\tpublic class ExplicitTestNotifier : NotifierBase {\n\n\t\t[Notify]\n\t\tpublic string Property1 { get; set; }\n\n\t\t[Notify]\n\t\tpublic string Property2 { get; set; }\n\n\t\t[Notify]\n\t\tpublic string Property3 { get; set; }\n\n\t\tpublic string Supressed { get; set; }\n\n\t\t[Notify(\"Prop1And2\", \"Property1\", \"Property2\")]\n\t\tpublic string Prop1And2 { get; set; }\n\t}\n\nIf it's all wired up correctly, you should see a message in the build output window: \"Lightly Misting: \u0026lt;your project output\u0026gt;\" at build time.\n\nOnChange Notification:\n\nAdditionally, the MIST utility supports notification only when the value being set changes from a previous value.  This is controlled by setting the notifycation style to NotificationStyle.OnChange and this can be applied to the NotifierAttribute as a default, or the NotifyAttribute as an override.  This method respects all known conventions (at least those known to me) for the comparing of equality among value \u0026 reference types, including overridden \"Equals\" methods, etc:\n        \n       [Notifier(NotificationMode.Implicit, NotificationStyle.OnChange)]\n\tpublic class OnChangeTest : TestNotifierBase\n\t{\n\t\tpublic string StringValue { get; set; } = \"\";\n\n\t\t[Notify(NotificationStyle.OnSet)]\n\t\tpublic string ExplicitOnSetString { get; set; }\n\t}\n\nHappy coding!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathtone%2Fmist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathtone%2Fmist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathtone%2Fmist/lists"}