We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b01558 commit 28e6e92Copy full SHA for 28e6e92
managed/src/SwiftlyS2.Shared/Helper.cs
@@ -88,6 +88,16 @@ public static T AsSchema<T>( nint ptr ) where T : ISchemaClass<T>
88
return T.From(ptr);
89
}
90
91
+ /// <summary>
92
+ /// Get the size of a schema class.
93
+ /// </summary>
94
+ /// <typeparam name="T">The schema class to get the size of.</typeparam>
95
+ /// <returns>The size of the schema class.</returns>
96
+ public static int GetSchemaSize<T>() where T : ISchemaClass<T>
97
+ {
98
+ return T.Size;
99
+ }
100
+
101
/// <summary>
102
/// Estimates the display width of a character based on its type.
103
/// Inspired by: https://github.com/spectreconsole/wcwidth
0 commit comments