mirror of
https://github.com/BeyondDimension/SteamTools.git
synced 2026-10-21 17:13:09 +08:00
18 lines
636 B
C#
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));
|
|
}
|
|
}
|
|
} |