Drop use of CallerMemberName
This commit is contained in:
parent
a872555f93
commit
1ac34c7625
1 changed files with 8 additions and 6 deletions
|
@ -2,7 +2,6 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using DT2;
|
using DT2;
|
||||||
|
@ -35,7 +34,7 @@ namespace DT3 {
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
size = value;
|
size = value;
|
||||||
NotifyPropertyChanged();
|
NotifyPropertyChanged(nameof(Size));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,7 +43,7 @@ namespace DT3 {
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
time = value;
|
time = value;
|
||||||
NotifyPropertyChanged();
|
NotifyPropertyChanged(nameof(Time));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,14 +52,17 @@ namespace DT3 {
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
url = value;
|
url = value;
|
||||||
NotifyPropertyChanged();
|
NotifyPropertyChanged(nameof(Url));
|
||||||
var _ = urlTester.GetUrlAsync(Url);
|
var _ = urlTester.GetUrlAsync(Url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void NotifyPropertyChanged([CallerMemberName] string memberName = null)
|
protected void NotifyPropertyChanged(string memberName)
|
||||||
{
|
{
|
||||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(memberName));
|
if (PropertyChanged != null)
|
||||||
|
{
|
||||||
|
PropertyChanged.Invoke(this, new PropertyChangedEventArgs(memberName));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue