2
0
Эх сурвалжийг харах

Various C# documentation improvements

Fixes wrong/invalid documentation and add documentation to some OS members.
Raul Santos 3 жил өмнө
parent
commit
f8ceceed15

+ 10 - 0
modules/mono/editor/GodotTools/GodotTools/Utils/OS.cs

@@ -15,6 +15,9 @@ namespace GodotTools.Utils
     [SuppressMessage("ReSharper", "InconsistentNaming")]
     public static class OS
     {
+        /// <summary>
+        /// Display names for the OS platforms.
+        /// </summary>
         private static class Names
         {
             public const string Windows = "Windows";
@@ -30,6 +33,9 @@ namespace GodotTools.Utils
             public const string HTML5 = "HTML5";
         }
 
+        /// <summary>
+        /// Godot platform identifiers.
+        /// </summary>
         public static class Platforms
         {
             public const string Windows = "windows";
@@ -42,6 +48,10 @@ namespace GodotTools.Utils
             public const string HTML5 = "javascript";
         }
 
+        /// <summary>
+        /// OS name part of the .NET runtime identifier (RID).
+        /// See https://docs.microsoft.com/en-us/dotnet/core/rid-catalog.
+        /// </summary>
         public static class DotNetOS
         {
             public const string Win = "win";

+ 0 - 2
modules/mono/glue/GodotSharp/GodotSharp/Core/GD.cs

@@ -189,8 +189,6 @@ namespace Godot
         /// Pushes an error message to Godot's built-in debugger and to the OS terminal.
         ///
         /// Note: Errors printed this way will not pause project execution.
-        /// To print an error message and pause project execution in debug builds,
-        /// use [code]assert(false, "test error")[/code] instead.
         /// </summary>
         /// <example>
         /// <code>

+ 4 - 3
modules/mono/glue/GodotSharp/GodotSharp/Core/Mathf.cs

@@ -754,9 +754,10 @@ namespace Godot
         }
 
         /// <summary>
-        /// Returns the [code]value[/code] wrapped between [code]0[/code] and the [code]length[/code].
-        /// If the limit is reached, the next value the function returned is decreased to the [code]0[/code] side or increased to the [code]length[/code] side (like a triangle wave).
-        /// If [code]length[/code] is less than zero, it becomes positive.
+        /// Returns the <paramref name="value"/> wrapped between <c>0</c> and the <paramref name="length"/>.
+        /// If the limit is reached, the next value the function returned is decreased to the <c>0</c> side
+        /// or increased to the <paramref name="length"/> side (like a triangle wave).
+        /// If <paramref name="length"/> is less than zero, it becomes positive.
         /// </summary>
         /// <param name="value">The value to pingpong.</param>
         /// <param name="length">The maximum value of the function.</param>

+ 4 - 4
modules/mono/glue/GodotSharp/GodotSharp/Core/Projection.cs

@@ -39,22 +39,22 @@ namespace Godot
         }
 
         /// <summary>
-        /// The projections's X column. Also accessible by using the index position <c>[0]</c>.
+        /// The projection's X column. Also accessible by using the index position <c>[0]</c>.
         /// </summary>
         public Vector4 x;
 
         /// <summary>
-        /// The projections's Y column. Also accessible by using the index position <c>[1]</c>.
+        /// The projection's Y column. Also accessible by using the index position <c>[1]</c>.
         /// </summary>
         public Vector4 y;
 
         /// <summary>
-        /// The projections's Z column. Also accessible by using the index position <c>[2]</c>.
+        /// The projection's Z column. Also accessible by using the index position <c>[2]</c>.
         /// </summary>
         public Vector4 z;
 
         /// <summary>
-        /// The projections's W column. Also accessible by using the index position <c>[3]</c>.
+        /// The projection's W column. Also accessible by using the index position <c>[3]</c>.
         /// </summary>
         public Vector4 w;
 

+ 2 - 2
modules/mono/glue/GodotSharp/GodotSharp/Core/StringName.cs

@@ -59,9 +59,9 @@ namespace Godot
         }
 
         /// <summary>
-        /// Constructs a <see cref="StringName"/> from the given <paramref name="path"/> string.
+        /// Constructs a <see cref="StringName"/> from the given <paramref name="name"/> string.
         /// </summary>
-        /// <param name="path">String to construct the <see cref="StringName"/> from.</param>
+        /// <param name="name">String to construct the <see cref="StringName"/> from.</param>
         public StringName(string name)
         {
             if (!string.IsNullOrEmpty(name))