From 5b250bf664a1db02880cbb68d2d31624125e66de Mon Sep 17 00:00:00 2001 From: Tony Bark Date: Fri, 14 Mar 2025 14:28:47 -0400 Subject: [PATCH] Switched to SDK-style project - Target .NET 8 - Enable implicit usings and nullable types - Bumped to version 1.0.601 - Note: will switch to the SLNX solution format after .NET 10 launches --- .editorconfig | 128 +++++++++++++++ Lorem.NET/Extensions.cs | 43 +++--- Lorem.NET/Generate.cs | 309 ++++++++++++++++++------------------- Lorem.NET/Lorem.NET.csproj | 60 +------ Lorem.NET/RandomHelper.cs | 38 ++--- Lorem.NET/Source.cs | 38 ++--- readme.md => README.md | 10 +- 7 files changed, 345 insertions(+), 281 deletions(-) create mode 100644 .editorconfig rename readme.md => README.md (95%) diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..b4e4ee7 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,128 @@ +# editorconfig.org + +# top-most EditorConfig file +root = true + +# Default settings: +# A newline ending every file +# Use 4 spaces as indentation +[*] +charset = utf-8 +end_of_line = crlf +indent_style = tab +indent_size = 4 +insert_final_newline = false +trim_trailing_whitespace = true +dotnet_style_operator_placement_when_wrapping = beginning_of_line +tab_width = 4 + +# C# files +[*.cs] +# New line preferences +csharp_new_line_before_open_brace = all +csharp_new_line_before_else = true +csharp_new_line_before_catch = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_object_initializers = true +csharp_new_line_before_members_in_anonymous_types = true +csharp_new_line_between_query_expression_clauses = true + +# Indentation preferences +csharp_indent_block_contents = true +csharp_indent_braces = false +csharp_indent_case_contents = true +csharp_indent_switch_labels = true +csharp_indent_labels = one_less_than_current + +# avoid this. unless absolutely necessary +dotnet_style_qualification_for_field = false:suggestion +dotnet_style_qualification_for_property = false:suggestion +dotnet_style_qualification_for_method = false:suggestion +dotnet_style_qualification_for_event = false:suggestion + +# only use var when it's obvious what the variable type is +csharp_style_var_for_built_in_types = true:none +csharp_style_var_when_type_is_apparent = true:none +csharp_style_var_elsewhere = true:suggestion + +# use language keywords instead of BCL types +dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion +dotnet_style_predefined_type_for_member_access = true:suggestion + +# Use UPPER_CASE for private or internal constant fields +dotnet_naming_rule.constants_should_be_upper_case.severity = suggestion +dotnet_naming_rule.constants_should_be_upper_case.symbols = constants +dotnet_naming_rule.constants_should_be_upper_case.style = constant_style + +dotnet_naming_symbols.constants.applicable_kinds = field, local +dotnet_naming_symbols.constants.required_modifiers = const + +dotnet_naming_style.constant_style.capitalization = all_upper + +# Comment this group and uncomment out the next group if you don't want _ prefixed fields. + +# internal and private fields should be _camel_case +dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion +dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields +dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style + +dotnet_naming_symbols.private_internal_fields.applicable_kinds = field +dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal + +dotnet_naming_style.camel_case_underscore_style.required_prefix = _ +dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case + +# Code style defaults +dotnet_sort_system_directives_first = true +csharp_preserve_single_line_blocks = true +csharp_preserve_single_line_statements = false + +# Expression-level preferences +dotnet_style_object_initializer = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_explicit_tuple_names = true:suggestion +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_null_propagation = true:suggestion + +# Expression-bodied members +csharp_style_expression_bodied_methods = false:none +csharp_style_expression_bodied_constructors = false:none +csharp_style_expression_bodied_operators = false:none +csharp_style_expression_bodied_properties = true:none +csharp_style_expression_bodied_indexers = true:none +csharp_style_expression_bodied_accessors = true:none + +# Pattern matching +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion +csharp_style_inlined_variable_declaration = true:suggestion + +# Null checking preferences +csharp_style_throw_expression = true:suggestion +csharp_style_conditional_delegate_call = true:suggestion + +# Space preferences +csharp_space_after_cast = false +csharp_space_after_colon_in_inheritance_clause = true +csharp_space_after_comma = true +csharp_space_after_dot = false +csharp_space_after_keywords_in_control_flow_statements = true +csharp_space_after_semicolon_in_for_statement = true +csharp_space_around_binary_operators = before_and_after +csharp_space_before_colon_in_inheritance_clause = true +csharp_space_before_comma = false +csharp_space_before_dot = false +csharp_space_before_open_square_brackets = false +csharp_space_before_semicolon_in_for_statement = false +csharp_space_between_empty_square_brackets = false +csharp_space_between_method_call_empty_parameter_list_parentheses = false +csharp_space_between_method_call_name_and_opening_parenthesis = false +csharp_space_between_method_call_parameter_list_parentheses = false +csharp_space_between_method_declaration_empty_parameter_list_parentheses = false +csharp_space_between_method_declaration_name_and_open_parenthesis = false +csharp_space_between_method_declaration_parameter_list_parentheses = false +csharp_space_between_parentheses = false +csharp_space_between_square_brackets = false +csharp_using_directive_placement = outside_namespace:silent +csharp_prefer_simple_using_statement = true:suggestion +csharp_prefer_braces = when_multiline:silent \ No newline at end of file diff --git a/Lorem.NET/Extensions.cs b/Lorem.NET/Extensions.cs index 5073858..a0ea244 100644 --- a/Lorem.NET/Extensions.cs +++ b/Lorem.NET/Extensions.cs @@ -1,27 +1,24 @@ -using System; +namespace LoremNET; -namespace LoremNET +internal static class Extensions { - internal static class Extensions + internal static string Remove(this string s, string pattern) { - internal static string Remove(this string s, string pattern) - { - return s.Replace(pattern, ""); - } - - internal static string[] Split(this string s, string separator) - { - return s.Split(new[] { separator }, StringSplitOptions.None); - } - - internal static string UppercaseFirst(this string s) - { - if (string.IsNullOrEmpty(s)) - { - return string.Empty; - } - - return char.ToUpper(s[0]) + s.Substring(1); - } + return s.Replace(pattern, ""); } -} \ No newline at end of file + + internal static string[] Split(this string s, string separator) + { + return s.Split(new[] { separator }, StringSplitOptions.None); + } + + internal static string UppercaseFirst(this string s) + { + if (string.IsNullOrEmpty(s)) + { + return string.Empty; + } + + return char.ToUpper(s[0]) + s.Substring(1); + } +} diff --git a/Lorem.NET/Generate.cs b/Lorem.NET/Generate.cs index dede4d5..52cbe38 100644 --- a/Lorem.NET/Generate.cs +++ b/Lorem.NET/Generate.cs @@ -1,162 +1,157 @@ -using System; -using System.Collections.Generic; -using System.Linq; +namespace LoremNET; -namespace LoremNET +public static class Generate { - public static class Generate + public static bool Chance(int successes, int attempts) { - public static bool Chance(int successes, int attempts) - { - var number = Number(1, attempts); + var number = Number(1, attempts); - return number <= successes; - } - - public static T Random(T[] items) - { - var index = RandomHelper.Instance.Next(items.Length); - - return items[index]; - } - - public static TEnum Enum() where TEnum : struct, IConvertible - { - if (typeof(TEnum).IsEnum) - { - var v = System.Enum.GetValues(typeof(TEnum)); - return (TEnum)v.GetValue(RandomHelper.Instance.Next(v.Length)); - } - else - { - throw new ArgumentException("Generic type must be an enum."); - } - } - - /* http://stackoverflow.com/a/6651661/234132 */ - public static long Number(long min, long max) - { - byte[] buf = new byte[8]; - RandomHelper.Instance.NextBytes(buf); - long longRand = BitConverter.ToInt64(buf, 0); - - return (Math.Abs(longRand % ((max + 1) - min)) + min); - } - - #region DateTime - - public static DateTime DateTime(int startYear = 1950, int startMonth = 1, int startDay = 1) - { - return DateTime(new System.DateTime(startYear, startMonth, startDay), System.DateTime.Now); - } - - public static DateTime DateTime(DateTime min) - { - return DateTime(min, System.DateTime.Now); - } - - /* http://stackoverflow.com/a/1483677/234132 */ - public static DateTime DateTime(DateTime min, DateTime max) - { - TimeSpan timeSpan = max - min; - TimeSpan newSpan = new TimeSpan(0, RandomHelper.Instance.Next(0, (int)timeSpan.TotalMinutes), 0); - - return min + newSpan; - } - - #endregion - - #region Text - - public static string Email() - { - return string.Format("{0}@{1}.com", Generate.Words(1, false), Generate.Words(1, false)); - } - - public static string Words(int wordCount, bool uppercaseFirstLetter = true, bool includePunctuation = false) - { - return Words(wordCount, wordCount, uppercaseFirstLetter, includePunctuation); - } - - public static string Words(int wordCountMin, int wordCountMax, bool uppercaseFirstLetter = true, bool includePunctuation = false) - { - var source = string.Join(" ", Source.WordList(includePunctuation).Take(RandomHelper.Instance.Next(wordCountMin, wordCountMax))); - - if (uppercaseFirstLetter) - { - source = source.UppercaseFirst(); - } - - return source; - } - - public static string Sentence(int wordCount) - { - return Sentence(wordCount, wordCount); - } - - public static string Sentence(int wordCountMin, int wordCountMax) - { - return string.Format("{0}.", Words(wordCountMin, wordCountMax, true, true)).Replace(",.", ".").Remove(".."); - } - - public static string Paragraph(int wordCount, int sentenceCount) - { - return Paragraph(wordCount, wordCount, sentenceCount, sentenceCount); - } - - public static string Paragraph(int wordCountMin, int wordCountMax, int sentenceCount) - { - return Paragraph(wordCountMin, wordCountMax, sentenceCount, sentenceCount); - } - - public static string Paragraph(int wordCountMin, int wordCountMax, int sentenceCountMin, int sentenceCountMax) - { - var source = string.Join(" ", Enumerable.Range(0, RandomHelper.Instance.Next(sentenceCountMin, sentenceCountMax)).Select(x => Sentence(wordCountMin, wordCountMax))); - - //remove traililng space - return source.Remove(source.Length - 1); - } - - public static IEnumerable Paragraphs(int wordCount, int sentenceCount, int paragraphCount) - { - return Paragraphs(wordCount, wordCount, sentenceCount, sentenceCount, paragraphCount, paragraphCount); - } - - public static IEnumerable Paragraphs(int wordCountMin, int wordCountMax, int sentenceCount, int paragraphCount) - { - return Paragraphs(wordCountMin, wordCountMax, sentenceCount, sentenceCount, paragraphCount, paragraphCount); - } - - public static IEnumerable Paragraphs(int wordCountMin, int wordCountMax, int sentenceCountMin, int sentenceCountMax, int paragraphCount) - { - return Paragraphs(wordCountMin, wordCountMax, sentenceCountMin, sentenceCountMax, paragraphCount, paragraphCount); - } - - public static IEnumerable Paragraphs(int wordCountMin, int wordCountMax, int sentenceCountMin, int sentenceCountMax, int paragraphCountMin, int paragraphCountMax) - { - return Enumerable.Range(0, RandomHelper.Instance.Next(paragraphCountMin, paragraphCountMax)).Select(p => Paragraph(wordCountMin, wordCountMax, sentenceCountMin, sentenceCountMax)).ToArray(); - } - - #endregion - - #region Color - - /* http://stackoverflow.com/a/1054087/234132 */ - public static string HexNumber(int digits) - { - byte[] buffer = new byte[digits / 2]; - RandomHelper.Instance.NextBytes(buffer); - string result = String.Concat(buffer.Select(x => x.ToString("X2")).ToArray()); - - if (digits % 2 == 0) - { - return result; - } - - return result + RandomHelper.Instance.Next(16).ToString("X"); - } - - #endregion + return number <= successes; } -} \ No newline at end of file + + public static T Random(T[] items) + { + var index = RandomHelper.Instance.Next(items.Length); + + return items[index]; + } + + public static TEnum Enum() where TEnum : struct, IConvertible + { + if (typeof(TEnum).IsEnum) + { + var v = System.Enum.GetValues(typeof(TEnum)); + return (TEnum)v.GetValue(RandomHelper.Instance.Next(v.Length)); + } + else + { + throw new ArgumentException("Generic type must be an enum."); + } + } + + /* http://stackoverflow.com/a/6651661/234132 */ + public static long Number(long min, long max) + { + byte[] buf = new byte[8]; + RandomHelper.Instance.NextBytes(buf); + long longRand = BitConverter.ToInt64(buf, 0); + + return (Math.Abs(longRand % ((max + 1) - min)) + min); + } + + #region DateTime + + public static DateTime DateTime(int startYear = 1950, int startMonth = 1, int startDay = 1) + { + return DateTime(new System.DateTime(startYear, startMonth, startDay), System.DateTime.Now); + } + + public static DateTime DateTime(DateTime min) + { + return DateTime(min, System.DateTime.Now); + } + + /* http://stackoverflow.com/a/1483677/234132 */ + public static DateTime DateTime(DateTime min, DateTime max) + { + TimeSpan timeSpan = max - min; + TimeSpan newSpan = new TimeSpan(0, RandomHelper.Instance.Next(0, (int)timeSpan.TotalMinutes), 0); + + return min + newSpan; + } + + #endregion + + #region Text + + public static string Email() + { + return string.Format("{0}@{1}.com", Generate.Words(1, false), Generate.Words(1, false)); + } + + public static string Words(int wordCount, bool uppercaseFirstLetter = true, bool includePunctuation = false) + { + return Words(wordCount, wordCount, uppercaseFirstLetter, includePunctuation); + } + + public static string Words(int wordCountMin, int wordCountMax, bool uppercaseFirstLetter = true, bool includePunctuation = false) + { + var source = string.Join(" ", Source.WordList(includePunctuation).Take(RandomHelper.Instance.Next(wordCountMin, wordCountMax))); + + if (uppercaseFirstLetter) + { + source = source.UppercaseFirst(); + } + + return source; + } + + public static string Sentence(int wordCount) + { + return Sentence(wordCount, wordCount); + } + + public static string Sentence(int wordCountMin, int wordCountMax) + { + return string.Format("{0}.", Words(wordCountMin, wordCountMax, true, true)).Replace(",.", ".").Remove(".."); + } + + public static string Paragraph(int wordCount, int sentenceCount) + { + return Paragraph(wordCount, wordCount, sentenceCount, sentenceCount); + } + + public static string Paragraph(int wordCountMin, int wordCountMax, int sentenceCount) + { + return Paragraph(wordCountMin, wordCountMax, sentenceCount, sentenceCount); + } + + public static string Paragraph(int wordCountMin, int wordCountMax, int sentenceCountMin, int sentenceCountMax) + { + var source = string.Join(" ", Enumerable.Range(0, RandomHelper.Instance.Next(sentenceCountMin, sentenceCountMax)).Select(x => Sentence(wordCountMin, wordCountMax))); + + //remove traililng space + return source.Remove(source.Length - 1); + } + + public static IEnumerable Paragraphs(int wordCount, int sentenceCount, int paragraphCount) + { + return Paragraphs(wordCount, wordCount, sentenceCount, sentenceCount, paragraphCount, paragraphCount); + } + + public static IEnumerable Paragraphs(int wordCountMin, int wordCountMax, int sentenceCount, int paragraphCount) + { + return Paragraphs(wordCountMin, wordCountMax, sentenceCount, sentenceCount, paragraphCount, paragraphCount); + } + + public static IEnumerable Paragraphs(int wordCountMin, int wordCountMax, int sentenceCountMin, int sentenceCountMax, int paragraphCount) + { + return Paragraphs(wordCountMin, wordCountMax, sentenceCountMin, sentenceCountMax, paragraphCount, paragraphCount); + } + + public static IEnumerable Paragraphs(int wordCountMin, int wordCountMax, int sentenceCountMin, int sentenceCountMax, int paragraphCountMin, int paragraphCountMax) + { + return Enumerable.Range(0, RandomHelper.Instance.Next(paragraphCountMin, paragraphCountMax)).Select(p => Paragraph(wordCountMin, wordCountMax, sentenceCountMin, sentenceCountMax)).ToArray(); + } + + #endregion + + #region Color + + /* http://stackoverflow.com/a/1054087/234132 */ + public static string HexNumber(int digits) + { + byte[] buffer = new byte[digits / 2]; + RandomHelper.Instance.NextBytes(buffer); + string result = String.Concat(buffer.Select(x => x.ToString("X2")).ToArray()); + + if (digits % 2 == 0) + { + return result; + } + + return result + RandomHelper.Instance.Next(16).ToString("X"); + } + + #endregion +} diff --git a/Lorem.NET/Lorem.NET.csproj b/Lorem.NET/Lorem.NET.csproj index 9e0a497..a948a9d 100644 --- a/Lorem.NET/Lorem.NET.csproj +++ b/Lorem.NET/Lorem.NET.csproj @@ -1,56 +1,10 @@ - - - + + - Debug - AnyCPU - {787D3BA7-DB6C-4704-B89C-8D91A4392442} - Library - Properties - LoremNET - LoremNET - v4.0 - 512 + net8.0 + enable + enable + 1.0.601 - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/Lorem.NET/RandomHelper.cs b/Lorem.NET/RandomHelper.cs index 281fc65..368bd98 100644 --- a/Lorem.NET/RandomHelper.cs +++ b/Lorem.NET/RandomHelper.cs @@ -1,29 +1,25 @@ -using System; -using System.Threading; +namespace LoremNET; -namespace LoremNET +/* + * http://stackoverflow.com/a/1785821/234132 + */ +internal static class RandomHelper { - /* - * http://stackoverflow.com/a/1785821/234132 - */ - internal static class RandomHelper + private static int seedCounter = new Random().Next(); + + [ThreadStatic] + private static Random rng; + + internal static Random Instance { - private static int seedCounter = new Random().Next(); - - [ThreadStatic] - private static Random rng; - - internal static Random Instance + get { - get + if (rng == null) { - if (rng == null) - { - int seed = Interlocked.Increment(ref seedCounter); - rng = new Random(seed); - } - return rng; + int seed = Interlocked.Increment(ref seedCounter); + rng = new Random(seed); } + return rng; } } -} \ No newline at end of file +} diff --git a/Lorem.NET/Source.cs b/Lorem.NET/Source.cs index cd399ca..2373574 100644 --- a/Lorem.NET/Source.cs +++ b/Lorem.NET/Source.cs @@ -1,25 +1,21 @@ -using System.Collections.Generic; -using System.Linq; +namespace LoremNET; -namespace LoremNET +public static class Source { - public static class Source + public static string Text { get; private set; } = @"lorem ipsum amet, pellentesque mattis accumsan maximus etiam mollis ligula non iaculis ornare mauris efficitur ex eu rhoncus aliquam in hac habitasse platea dictumst maecenas ultrices, purus at venenatis auctor, sem nulla urna, molestie nisi mi a ut euismod nibh id libero lacinia, sit amet lacinia lectus viverra donec scelerisque dictum enim, dignissim dolor cursus morbi rhoncus, elementum magna sed, sed velit consectetur adipiscing elit curabitur nulla, eleifend vel, tempor metus phasellus vel pulvinar, lobortis quis, nullam felis orci congue vitae augue nisi, tincidunt id, posuere fermentum facilisis ultricies mi, nisl fusce neque, vulputate integer tortor tempus praesent proin quis nunc massa congue, quam auctor eros placerat eros, leo nec, sapien egestas duis feugiat, vestibulum porttitor, odio sollicitudin arcu, et aenean sagittis ante urna fringilla, risus et, vivamus semper nibh, eget finibus est laoreet justo commodo sagittis, vitae, nunc, diam ac, tellus posuere, condimentum enim tellus, faucibus suscipit ac nec turpis interdum malesuada fames primis quisque pretium ex, feugiat porttitor massa, vehicula dapibus blandit, hendrerit elit, aliquet nam orci, fringilla blandit ullamcorper mauris, ultrices consequat tempor, convallis gravida sodales volutpat finibus, neque pulvinar varius, porta laoreet, eu, ligula, porta, placerat, lacus pharetra erat bibendum leo, tristique cras rutrum at, dui tortor, in, varius arcu interdum, vestibulum, magna, ante, imperdiet erat, luctus odio, non, dui, volutpat, bibendum, quam, euismod, mattis, class aptent taciti sociosqu ad litora torquent per conubia nostra, inceptos himenaeos suspendisse lorem, a, sem, eleifend, commodo, dolor, cursus, luctus, lectus,"; + + internal static IEnumerable Rearrange(string words) { - public static string Text { get; private set; } = @"lorem ipsum amet, pellentesque mattis accumsan maximus etiam mollis ligula non iaculis ornare mauris efficitur ex eu rhoncus aliquam in hac habitasse platea dictumst maecenas ultrices, purus at venenatis auctor, sem nulla urna, molestie nisi mi a ut euismod nibh id libero lacinia, sit amet lacinia lectus viverra donec scelerisque dictum enim, dignissim dolor cursus morbi rhoncus, elementum magna sed, sed velit consectetur adipiscing elit curabitur nulla, eleifend vel, tempor metus phasellus vel pulvinar, lobortis quis, nullam felis orci congue vitae augue nisi, tincidunt id, posuere fermentum facilisis ultricies mi, nisl fusce neque, vulputate integer tortor tempus praesent proin quis nunc massa congue, quam auctor eros placerat eros, leo nec, sapien egestas duis feugiat, vestibulum porttitor, odio sollicitudin arcu, et aenean sagittis ante urna fringilla, risus et, vivamus semper nibh, eget finibus est laoreet justo commodo sagittis, vitae, nunc, diam ac, tellus posuere, condimentum enim tellus, faucibus suscipit ac nec turpis interdum malesuada fames primis quisque pretium ex, feugiat porttitor massa, vehicula dapibus blandit, hendrerit elit, aliquet nam orci, fringilla blandit ullamcorper mauris, ultrices consequat tempor, convallis gravida sodales volutpat finibus, neque pulvinar varius, porta laoreet, eu, ligula, porta, placerat, lacus pharetra erat bibendum leo, tristique cras rutrum at, dui tortor, in, varius arcu interdum, vestibulum, magna, ante, imperdiet erat, luctus odio, non, dui, volutpat, bibendum, quam, euismod, mattis, class aptent taciti sociosqu ad litora torquent per conubia nostra, inceptos himenaeos suspendisse lorem, a, sem, eleifend, commodo, dolor, cursus, luctus, lectus,"; - - internal static IEnumerable Rearrange(string words) - { - return words.Split(" ").OrderBy(x => RandomHelper.Instance.Next()); - } - - internal static IEnumerable WordList(bool includePuncation) - { - return includePuncation ? Rearrange(Text) : Rearrange(Text.Remove(",")); - } - - public static void Update(string text) - { - Text = text; - } + return words.Split(" ").OrderBy(x => RandomHelper.Instance.Next()); } -} \ No newline at end of file + + internal static IEnumerable WordList(bool includePuncation) + { + return includePuncation ? Rearrange(Text) : Rearrange(Text.Remove(",")); + } + + public static void Update(string text) + { + Text = text; + } +} diff --git a/readme.md b/README.md similarity index 95% rename from readme.md rename to README.md index 0bd5228..665ef5a 100644 --- a/readme.md +++ b/README.md @@ -1,10 +1,8 @@ -Lorem.NET -=============== +# Lorem.NET A .NET library for all things random! -Usage ---------------- +## Usage ### Text Helpers @@ -51,7 +49,7 @@ string[] numbers = GetNumbers(); string number = LoremNET.Generate.Random(numbers); // this will randomly select a value from the enum: -MyEnum value = LoremNET.Generate.Enum(); +MyEnum value = LoremNET.Generate.Enum(); ``` @@ -63,7 +61,7 @@ If you want to change the underlying source text, go right ahead! public void SomeStartupMethod() { LoremNET.Source.Update("Alright stop collaborate and listen ice is back with my brand new invention something grabs a hold of me tightly flow like a harpoon daily and nightly will it ever stop yo I don't know turn off the lights and I'll glow"); - + ... } ```