Table of Contents

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

Type

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

className string

Name of the class to generate.

keys List<string>

List of dictionary keys.

values List<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

className string

Name of the class to generate.

keys List<string>

List of dictionary keys.

randomValue Func<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

className string

Name of the class to generate.

list List<string>

List of items to convert and use as keys or values.

switchKeysAndValues bool

If true, switches keys and values in the dictionary.

Returns

string

Generated C# code as string.