Class ModelGeneratorSettings
Specifies model code generator settings.
Namespace: Neon.ModelGen
Assembly: Neon.ModelGen.dll
Syntax
public class ModelGeneratorSettings
Constructors
ModelGeneratorSettings(params string[])
Constructs an instance with reasonable settings.
Declaration
public ModelGeneratorSettings(params string[] targetGroups)
Parameters
Type | Name | Description |
---|---|---|
string[] | targetGroups | Specifies the targets to be included in the generated output code. |
Properties
AllowDebuggerStepInto
Optionally enables source code debuggers to step into methods and properties
generated for both data and service models. This is normally used
only when debugging model generation and defaults to false
.
Declaration
public bool AllowDebuggerStepInto { get; set; }
Property Value
Type | Description |
---|---|
bool |
NoServiceClients
Indicates that service client code should not be generated. This defaults to
false
and may be set to true
when only the data models
need to be generated.
Declaration
public bool NoServiceClients { get; set; }
Property Value
Type | Description |
---|---|
bool |
Persisted
Optionally generate generated database persistance related code for
data models tagged with [Persistable]
. This defaults to
false
.
Declaration
public bool Persisted { get; set; }
Property Value
Type | Description |
---|---|
bool |
RoundTrip
Enhances data model code generation to prevent property loss
for noSQL scenarios where somebody added a model property before
all referencing applications have regenerated their data models.
This defaults to true
.
Declaration
public bool RoundTrip { get; set; }
Property Value
Type | Description |
---|---|
bool |
SourceNamespace
Specifies the C# namespace
to be used to filter the
service and data model classes processed by the code generator.
This is especially handy for unit testing. This defaults to
null
which disables any filtering.
Declaration
public string SourceNamespace { get; set; }
Property Value
Type | Description |
---|---|
string |
TargetNamespace
Specifies the C# namespace
to be used when generating the output
code. This defaults to Neon.ModelGen.Output
.
Declaration
public string TargetNamespace { get; set; }
Property Value
Type | Description |
---|---|
string |
Targets
Used to select a specific targets to be included in the generated output.
note
All groups will be generated when the Targets list is empty.
Declaration
public List<string> Targets { get; set; }
Property Value
Type | Description |
---|---|
List<string> |
UxFramework
Optionally specifies the user experience framework that the generated classes should support by generating additional code.
Declaration
public UxFrameworks UxFramework { get; set; }
Property Value
Type | Description |
---|---|
UxFrameworks |
V1Compatible
Optionally specifies that model classes should be generated such that
document type __T
properties be serialized using the old v1.x
compatible "__T" property name rather than the "T$$"
property name generated for Neon.ModelGen v2+.
New projects should leave this alone but existing 1.x based projects
must set this to true
or use the new neon-modelgen --v1compatible
option to avoid database corruption and/or data transmission issues.
Declaration
public bool V1Compatible { get; set; }
Property Value
Type | Description |
---|---|
bool |