Class CSharpClassesGenerator
- Namespace
- SunamoDevCode.CodeGenerator
- Assembly
- SunamoDevCode.dll
Generator for C# classes. Generation of single element is in CSharpHelper.
public class CSharpClassesGenerator
- Inheritance
-
CSharpClassesGenerator
- Inherited Members
- Extension Methods
Fields
Type
Type information for runtime type checking.
public static Type Type
Field Value
Methods
Dictionary(string, List<string>, List<string>)
Generates a dictionary class with specified keys and values.
public static string Dictionary(string className, List<string> keys, List<string> values)
Parameters
classNamestringName of the class to generate.
keysList<string>List of dictionary keys.
valuesList<string>List of dictionary values.
Returns
- string
Generated C# code as string.
Dictionary(string, List<string>, Func<string>)
Generates a dictionary class with random values.
public static string Dictionary(string className, List<string> keys, Func<string> randomValue)
Parameters
classNamestringName of the class to generate.
keysList<string>List of dictionary keys.
randomValueFunc<string>Function that generates random values.
Returns
- string
Generated C# code as string.
DictionaryPascalConvention(string, List<string>, bool)
Generates a dictionary class with Pascal convention conversion.
public static string DictionaryPascalConvention(string className, List<string> list, bool switchKeysAndValues)
Parameters
classNamestringName of the class to generate.
listList<string>List of items to convert and use as keys or values.
switchKeysAndValuesboolIf true, switches keys and values in the dictionary.
Returns
- string
Generated C# code as string.