Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultSingleFileName = "Models.cs" DefaultNamespace = "CCLGenerated" AttributeNamespace = "CSharpNamespace" )
View Source
const (
CurrentLanguage = gValues.LanguageCS
)
Variables ¶
View Source
var (
LanguageAliases = []string{
"cs",
"csharp",
"c#",
}
)
Functions ¶
func GenerateCode ¶
func GenerateCode(options *gen.CodeGenerationOptions) (*gen.CodeGenerationResult, error)
GenerateCode generates C# code from the provided CCL source file.
Types ¶
type CCLField ¶ added in v0.0.3
type CCLField = cclValues.ModelFieldDefinition
CCLField is a type alias for the field definition type from the CCL's internal packages.
type CCLModel ¶ added in v0.0.3
type CCLModel = cclValues.ModelDefinition
CCLModel is a type alias for the model definition type from the CCL's internal packages.
type CSharpGenerationContext ¶ added in v0.0.3
type CSharpGenerationContext struct {
*gen.CodeGenerationBase
// One builder per model class file (or single builder for single file mode)
ModelClasses map[string]*codeBuilder.CodeBuilder
// SingleFileBuilder is the builder used in single file mode
SingleFileBuilder *codeBuilder.CodeBuilder
// IsSingleFile indicates if we are generating a single file
IsSingleFile bool
// SingleFileName is the name of the single file to generate
SingleFileName string
// CSharpNamespace is the namespace to use for the generated code
CSharpNamespace string
}
type NamespaceDetectionError ¶ added in v0.0.3
func (*NamespaceDetectionError) Error ¶ added in v0.0.3
func (e *NamespaceDetectionError) Error() string
Click to show internal directories.
Click to hide internal directories.