Files
SteamTools/System.Application.SteamTools.Client.Desktop/Mvvm/EventArgsFactory.cs
T
Aigio Liu 12c09fed18 format
2021-02-26 21:09:15 +08:00

18 lines
636 B
C#

using System.Collections.Concurrent;
using System.ComponentModel;
namespace System.Application.Mvvm
{
internal static class EventArgsFactory
{
static readonly ConcurrentDictionary<string, PropertyChangedEventArgs>
PropertyChangedEventArgsDictionary =
new ConcurrentDictionary<string, PropertyChangedEventArgs>();
public static PropertyChangedEventArgs GetPropertyChangedEventArgs(string? propertyName)
{
return PropertyChangedEventArgsDictionary.GetOrAdd(propertyName ?? string.Empty,
name => new PropertyChangedEventArgs(name));
}
}
}