From bb2dedccadf49519b9d0a086b373f1ad0633713f Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Sat, 16 Nov 2019 11:15:21 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9A=20Add=20XML=20doc=20to=20StructExt?= =?UTF-8?q?ensions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- X10D/StructExtensions.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/X10D/StructExtensions.cs b/X10D/StructExtensions.cs index 1ffeff1..f23cac8 100644 --- a/X10D/StructExtensions.cs +++ b/X10D/StructExtensions.cs @@ -7,10 +7,18 @@ #endregion /// - /// A set of extension methods for types. + /// Extension methods for types. /// public static class StructExtensions { + /// + /// Returns the next value in an using the specified value as a starting point. + /// + /// An . + /// An value + /// Optional. Whether or not to wrap to the to the start of the enum. Defaults to + /// true. + /// Returns a value. public static T Next(this T src, bool wrap = true) where T : struct { if (!typeof(T).IsEnum) @@ -23,6 +31,14 @@ return arr.Length == j ? arr[wrap ? 0 : j - 1] : arr[j]; } + /// + /// Returns the previous value in an using the specified value as a starting point. + /// + /// An . + /// An value + /// Optional. Whether or not to wrap to the to the end of the enum. Defaults to + /// true. + /// Returns a value. public static T Previous(this T src, bool wrap = true) where T : struct { if (!typeof(T).IsEnum)