API reference
API reference
Select your platform
No SDKs available
No versions available

EnumCodeWrapper Class

Wraps around an Enum in code to allow querying and modifying its source code in a single source file.

Fields

const string DEFAULT_PATH[Get]

Member Functions

EnumCodeWrapper
( IFileIo fileIo,
Type enumType,
string entityName,
string sourceCodeFile )
EnumCodeWrapper
( IFileIo fileIo,
Type enumType,
string sourceCodeFile )
EnumCodeWrapper
( IFileIo fileIo,
string enumName,
string entityName,
IList< WitKeyword > enumValues,
string enumNamespace,
string sourceCodeFile )
Adds the supplied values to the enum construct. Values that already exist are ignored.
Parameters
values
The values to add.
Adds the supplied values to the enum construct. Values that already exist are ignored.
Parameters
values
The values to add.
void AddValue
( WitKeyword keyword )
void AddValue
( string value,
CodeAttributeDeclaration attribute )
void WriteToFile ( )
string ToSourceCode ( )

Object Data for package-func

Removes the supplied values to the enum construct. Values that do not exist in the enum are ignored.
Parameters
values
The values to remove.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon