/
githubmirror
/
Files
Обзор
Документация
Войти
/
githubmirror
/
Files
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Files.App/Utils/Serialization/BaseObservableJsonSettings.cs
25 строк
726 B
Yair
Code Quality: Ran code cleanup (#17307)
25 июл 2025, 03:57
Не верифицирован
25 июл 2025, 03:57
4558bc2
Код
Авторство
О чём код?
// Copyright (c) Files Community // Licensed under the MIT License. using System.Runtime.CompilerServices; namespace Files.App.Utils.Serialization { internal abstract class BaseObservableJsonSettings : BaseJsonSettings, INotifyPropertyChanged { public event PropertyChangedEventHandler? PropertyChanged; protected override bool Set<TValue>(TValue? value, [CallerMemberName] string propertyName = "") where TValue : default { if (!base.Set<TValue>(value, propertyName)) return false; OnPropertyChanged(propertyName); return true; } protected void OnPropertyChanged([CallerMemberName] string propertyName = "") => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); } }