vpenades 8 months ago
parent
commit
42913180e8
1 changed files with 12 additions and 0 deletions
  1. 12 0
      src/SharpGLTF.Core/Reflection/Interfaces.cs

+ 12 - 0
src/SharpGLTF.Core/Reflection/Interfaces.cs

@@ -6,12 +6,24 @@ using FIELDINFO = SharpGLTF.Reflection.FieldInfo;
 
 namespace SharpGLTF.Reflection
 {
+
+    /// <summary>
+    /// Signals that an object contains a named collection of <see cref="FIELDINFO"/>
+    /// </summary>
+    /// <remarks>
+    /// if an object implementing this interface also implements <see cref="IReflectionArray"/>,
+    /// then <see cref="TryGetField(string, out FIELDINFO)"/> should work using the index
+    /// converted to a string as in <code>TryGetField("17", out var field); field == IReflectionArray.GetField(17);</code>
+    /// </remarks>
     public interface IReflectionObject
     {
         IEnumerable<FIELDINFO> GetFields();
         bool TryGetField(string name, out FIELDINFO value);
     }
 
+    /// <summary>
+    /// Signals that an object contains a variable collection of <see cref="FIELDINFO"/>
+    /// </summary>    
     public interface IReflectionArray : IReflectionObject
     {
         int Count { get; }