Class NotifyPropertyChangedInvocatorAttribute
Indicates that the method is contained in a type that implements INotifyPropertyChanged interface and this method is used to notify that some property value changed
Implements
Inherited Members
Namespace: JetBrains.Annotations
Assembly: UnityEngine.dll
Syntax
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public sealed class NotifyPropertyChangedInvocatorAttribute : Attribute, _Attribute
Remarks
The method should be non-static and conform to one of the supported signatures:
Examples
public class Foo : INotifyPropertyChanged {
public event PropertyChangedEventHandler PropertyChanged;
[NotifyPropertyChangedInvocator]
protected virtual void NotifyChanged(string propertyName) { ... }
private string _name;
public string Name {
get { return _name; }
set { _name = value; NotifyChanged("LastName"); /* Warning */ }
}
}
Examples of generated notifications:
Constructors
| Improve this Doc View SourceNotifyPropertyChangedInvocatorAttribute()
Declaration
public NotifyPropertyChangedInvocatorAttribute()
NotifyPropertyChangedInvocatorAttribute(String)
Declaration
public NotifyPropertyChangedInvocatorAttribute(string parameterName)
Parameters
Type | Name | Description |
---|---|---|
String | parameterName |
Properties
| Improve this Doc View SourceParameterName
Declaration
public string ParameterName { get; }
Property Value
Type | Description |
---|---|
String |