summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/Reflection
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI/Framework/Reflection')
-rw-r--r--src/SMAPI/Framework/Reflection/ReflectedField.cs7
-rw-r--r--src/SMAPI/Framework/Reflection/ReflectedMethod.cs9
-rw-r--r--src/SMAPI/Framework/Reflection/ReflectedProperty.cs7
-rw-r--r--src/SMAPI/Framework/Reflection/Reflector.cs2
4 files changed, 10 insertions, 15 deletions
diff --git a/src/SMAPI/Framework/Reflection/ReflectedField.cs b/src/SMAPI/Framework/Reflection/ReflectedField.cs
index d771422c..3c4da4fc 100644
--- a/src/SMAPI/Framework/Reflection/ReflectedField.cs
+++ b/src/SMAPI/Framework/Reflection/ReflectedField.cs
@@ -23,7 +23,7 @@ namespace StardewModdingAPI.Framework.Reflection
/*********
** Accessors
*********/
- /// <summary>The reflection metadata.</summary>
+ /// <inheritdoc />
public FieldInfo FieldInfo { get; }
@@ -55,7 +55,7 @@ namespace StardewModdingAPI.Framework.Reflection
this.FieldInfo = field;
}
- /// <summary>Get the field value.</summary>
+ /// <inheritdoc />
public TValue GetValue()
{
try
@@ -72,8 +72,7 @@ namespace StardewModdingAPI.Framework.Reflection
}
}
- /// <summary>Set the field value.</summary>
- //// <param name="value">The value to set.</param>
+ /// <inheritdoc />
public void SetValue(TValue value)
{
try
diff --git a/src/SMAPI/Framework/Reflection/ReflectedMethod.cs b/src/SMAPI/Framework/Reflection/ReflectedMethod.cs
index 82737a7f..26112806 100644
--- a/src/SMAPI/Framework/Reflection/ReflectedMethod.cs
+++ b/src/SMAPI/Framework/Reflection/ReflectedMethod.cs
@@ -22,7 +22,7 @@ namespace StardewModdingAPI.Framework.Reflection
/*********
** Accessors
*********/
- /// <summary>The reflection metadata.</summary>
+ /// <inheritdoc />
public MethodInfo MethodInfo { get; }
@@ -54,9 +54,7 @@ namespace StardewModdingAPI.Framework.Reflection
this.MethodInfo = method;
}
- /// <summary>Invoke the method.</summary>
- /// <typeparam name="TValue">The return type.</typeparam>
- /// <param name="arguments">The method arguments to pass in.</param>
+ /// <inheritdoc />
public TValue Invoke<TValue>(params object[] arguments)
{
// invoke method
@@ -85,8 +83,7 @@ namespace StardewModdingAPI.Framework.Reflection
}
}
- /// <summary>Invoke the method.</summary>
- /// <param name="arguments">The method arguments to pass in.</param>
+ /// <inheritdoc />
public void Invoke(params object[] arguments)
{
// invoke method
diff --git a/src/SMAPI/Framework/Reflection/ReflectedProperty.cs b/src/SMAPI/Framework/Reflection/ReflectedProperty.cs
index 8a10ff9a..42d7bb59 100644
--- a/src/SMAPI/Framework/Reflection/ReflectedProperty.cs
+++ b/src/SMAPI/Framework/Reflection/ReflectedProperty.cs
@@ -23,7 +23,7 @@ namespace StardewModdingAPI.Framework.Reflection
/*********
** Accessors
*********/
- /// <summary>The reflection metadata.</summary>
+ /// <inheritdoc />
public PropertyInfo PropertyInfo { get; }
@@ -61,7 +61,7 @@ namespace StardewModdingAPI.Framework.Reflection
this.SetMethod = (Action<TValue>)Delegate.CreateDelegate(typeof(Action<TValue>), obj, this.PropertyInfo.SetMethod);
}
- /// <summary>Get the property value.</summary>
+ /// <inheritdoc />
public TValue GetValue()
{
if (this.GetMethod == null)
@@ -81,8 +81,7 @@ namespace StardewModdingAPI.Framework.Reflection
}
}
- /// <summary>Set the property value.</summary>
- //// <param name="value">The value to set.</param>
+ /// <inheritdoc />
public void SetValue(TValue value)
{
if (this.SetMethod == null)
diff --git a/src/SMAPI/Framework/Reflection/Reflector.cs b/src/SMAPI/Framework/Reflection/Reflector.cs
index d4904878..889c7ed6 100644
--- a/src/SMAPI/Framework/Reflection/Reflector.cs
+++ b/src/SMAPI/Framework/Reflection/Reflector.cs
@@ -263,7 +263,7 @@ namespace StardewModdingAPI.Framework.Reflection
CacheEntry entry = (CacheEntry)this.Cache[key];
return entry.IsValid
? (TMemberInfo)entry.MemberInfo
- : default(TMemberInfo);
+ : default;
}
// fetch & cache new value