diff --git a/SmartReactives.PostSharp/NotifyPropertyChanged/RaisesNotifyPropertyChangedAttribute.cs b/SmartReactives.PostSharp/NotifyPropertyChanged/RaisesNotifyPropertyChangedAttribute.cs
index 3cbfd35..1c4c798 100644
--- a/SmartReactives.PostSharp/NotifyPropertyChanged/RaisesNotifyPropertyChangedAttribute.cs
+++ b/SmartReactives.PostSharp/NotifyPropertyChanged/RaisesNotifyPropertyChangedAttribute.cs
@@ -41,15 +41,14 @@ namespace SmartReactives.PostSharp.NotifyPropertyChanged
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public sealed class RaisesNotifyPropertyChangedAttribute : Attribute
{
- public RaisesNotifyPropertyChangedAttribute()
- {
- }
+ public string ParameterName { get; private set; }
+
+ public RaisesNotifyPropertyChangedAttribute() { }
public RaisesNotifyPropertyChangedAttribute(string parameterName)
{
ParameterName = parameterName;
}
- public string ParameterName { get; private set; }
}
}
\ No newline at end of file
diff --git a/SmartReactives.PostSharp/NotifyPropertyChanged/SmartNotifyPropertyChangedAttribute.cs b/SmartReactives.PostSharp/NotifyPropertyChanged/SmartNotifyPropertyChangedAttribute.cs
index 05f9972..c310d85 100644
--- a/SmartReactives.PostSharp/NotifyPropertyChanged/SmartNotifyPropertyChangedAttribute.cs
+++ b/SmartReactives.PostSharp/NotifyPropertyChanged/SmartNotifyPropertyChangedAttribute.cs
@@ -24,9 +24,6 @@ public sealed override void OnGetValue(LocationInterceptionArgs args)
}
///
- public override string ToString()
- {
- return "Sink from: " + property.GetType().Name + "." + property.Name;
- }
+ public override string ToString() => $"Sink from: {Property.GetType().Name}.{Property.Name}";
}
}
\ No newline at end of file
diff --git a/SmartReactives.PostSharp/NotifyPropertyChanged/SmartNotifyPropertyChangedExpressionAttribute.cs b/SmartReactives.PostSharp/NotifyPropertyChanged/SmartNotifyPropertyChangedExpressionAttribute.cs
index 2eb962f..76553fc 100644
--- a/SmartReactives.PostSharp/NotifyPropertyChanged/SmartNotifyPropertyChangedExpressionAttribute.cs
+++ b/SmartReactives.PostSharp/NotifyPropertyChanged/SmartNotifyPropertyChangedExpressionAttribute.cs
@@ -40,10 +40,7 @@ public sealed override void OnGetValue(LocationInterceptionArgs args)
}
///
- public override string ToString()
- {
- return "Sink from: " + Property.GetType().Name + "." + Property.Name;
- }
+ public override string ToString() => $"Sink from: {property.GetType().Name}.{property.Name}";
public IEnumerable ProvideAspects(object targetElement)
{
diff --git a/SmartReactives.PostSharp/NotifyPropertyChanged/SmartNotifyPropertyChangedVariableAttributeBase.cs b/SmartReactives.PostSharp/NotifyPropertyChanged/SmartNotifyPropertyChangedVariableAttributeBase.cs
index 4d554a6..e853589 100644
--- a/SmartReactives.PostSharp/NotifyPropertyChanged/SmartNotifyPropertyChangedVariableAttributeBase.cs
+++ b/SmartReactives.PostSharp/NotifyPropertyChanged/SmartNotifyPropertyChangedVariableAttributeBase.cs
@@ -17,11 +17,7 @@ public abstract class SmartNotifyPropertyChangedVariableAttributeBase : Location
protected PropertyInfo property;
///
- public override string ToString()
- {
- // ReSharper disable once PossibleNullReferenceException
- return "Source from: " + property.DeclaringType.Name + "." + property.Name;
- }
+ public override string ToString() => $"Source from: {property.DeclaringType?.Name}.{property.Name}";
///
public sealed override void OnSetValue(LocationInterceptionArgs args)
diff --git a/SmartReactives.PostSharp/ReactiveCacheAttribute.cs b/SmartReactives.PostSharp/ReactiveCacheAttribute.cs
index fd366d2..e5341f0 100644
--- a/SmartReactives.PostSharp/ReactiveCacheAttribute.cs
+++ b/SmartReactives.PostSharp/ReactiveCacheAttribute.cs
@@ -16,15 +16,14 @@ public class ReactiveCacheAttribute : LocationInterceptionAspect, IInstanceScope
public object Value { get; set; }
public bool IsSet { get; set; }
-
- public object CreateInstance(AdviceArgs adviceArgs)
- {
- return new ReactiveCacheAttribute();
- }
- public void RuntimeInitializeInstance()
- {
- }
+ public bool StrongReference => false;
+
+ public object CreateInstance(AdviceArgs adviceArgs) => new ReactiveCacheAttribute();
+
+ public void Notify() => IsSet = false;
+
+ public void RuntimeInitializeInstance() {}
public sealed override void OnGetValue(LocationInterceptionArgs args)
{
@@ -44,11 +43,6 @@ public sealed override void OnGetValue(LocationInterceptionArgs args)
}
}
- public void Notify()
- {
- IsSet = false;
- }
- public bool StrongReference => false;
}
}
\ No newline at end of file