/// <summary>Initializes a new instance of the <see cref="CSharpGeneratorSettings"/> class.</summary> public CSharpGeneratorSettings() { DateType = "System.DateTime"; DateTimeType = "System.DateTime"; TimeType = "System.TimeSpan"; TimeSpanType = "System.TimeSpan"; ArrayType = "System.Collections.ObjectModel.ObservableCollection"; DictionaryType = "System.Collections.Generic.Dictionary"; ArrayBaseType = "System.Collections.ObjectModel.ObservableCollection"; DictionaryBaseType = "System.Collections.Generic.Dictionary"; RequiredPropertiesMustBeDefined = true; GenerateDataAnnotations = true; ClassStyle = CSharpClassStyle.Inpc; TypeAccessModifier = "public"; SetPropertyTypeAccessModifier = string.Empty; GenerateJsonMethods = true; PropertyNameGenerator = new CSharpPropertyNameGenerator(); TemplateFactory = new DefaultTemplateFactory(this, new Assembly[] { typeof(CSharpGeneratorSettings).GetTypeInfo().Assembly }); }
/// <summary>Initializes a new instance of the <see cref="TypeScriptGeneratorSettings"/> class.</summary> public TypeScriptGeneratorSettings() { ModuleName = ""; Namespace = ""; NullValue = TypeScriptNullValue.Undefined; TypeStyle = TypeScriptTypeStyle.Class; DateTimeType = TypeScriptDateTimeType.Date; ExtensionCode = string.Empty; TypeScriptVersion = 2.7m; GenerateConstructorInterface = true; ConvertConstructorInterfaceData = false; ExportTypes = true; ValueGenerator = new TypeScriptValueGenerator(this); PropertyNameGenerator = new TypeScriptPropertyNameGenerator(); TemplateFactory = new DefaultTemplateFactory(this, new Assembly[] { typeof(TypeScriptGeneratorSettings).GetTypeInfo().Assembly }); ClassTypes = new string[0]; ExtendedClasses = new string[0]; InlineNamedDictionaries = false; }
/// <summary>Initializes a new instance of the <see cref="CSharpGeneratorSettings"/> class.</summary> public CSharpGeneratorSettings() { Namespace = "MyNamespace"; DateType = "System.DateTime"; DateTimeType = "System.DateTime"; TimeType = "System.TimeSpan"; TimeSpanType = "System.TimeSpan"; ArrayType = "System.Collections.ObjectModel.ObservableCollection"; DictionaryType = "System.Collections.Generic.Dictionary"; ArrayBaseType = "System.Collections.ObjectModel.ObservableCollection"; DictionaryBaseType = "System.Collections.Generic.Dictionary"; RequiredPropertiesMustBeDefined = true; GenerateDataAnnotations = true; ClassStyle = CSharpClassStyle.Inpc; TypeAccessModifier = "public"; PropertySetterAccessModifier = string.Empty; GenerateJsonMethods = true; EnforceFlagEnums = false; ValueGenerator = new CSharpValueGenerator(this); PropertyNameGenerator = new CSharpPropertyNameGenerator(); TemplateFactory = new DefaultTemplateFactory(this, new Assembly[] { typeof(CSharpGeneratorSettings).GetTypeInfo().Assembly }); InlineNamedArrays = false; InlineNamedDictionaries = false; InlineNamedTuples = true; UseActionResultType = false; }
/// <summary>Initializes a new instance of the <see cref="TypeScriptGeneratorSettings"/> class.</summary> public TypeScriptGeneratorSettings() { ModuleName = ""; Namespace = ""; NullValue = TypeScriptNullValue.Undefined; TypeStyle = TypeScriptTypeStyle.Class; DateTimeType = TypeScriptDateTimeType.Date; ExtensionCode = string.Empty; TypeScriptVersion = 1.8m; PropertyNameGenerator = new TypeScriptPropertyNameGenerator(); TemplateFactory = new DefaultTemplateFactory(); }
/// <summary>Initializes a new instance of the <see cref="CSharpGeneratorSettings"/> class.</summary> public CSharpGeneratorSettings() { DateType = "System.DateTime"; DateTimeType = "System.DateTime"; TimeType = "System.TimeSpan"; TimeSpanType = "System.TimeSpan"; ArrayType = "System.Collections.ObjectModel.ObservableCollection"; DictionaryType = "System.Collections.Generic.Dictionary"; RequiredPropertiesMustBeDefined = true; GenerateDataAnnotations = true; ClassStyle = CSharpClassStyle.Inpc; PropertyNameGenerator = new CSharpPropertyNameGenerator(); TemplateFactory = new DefaultTemplateFactory(); }
/// <summary>Initializes a new instance of the <see cref="CSharpGeneratorSettings"/> class.</summary> public CSharpGeneratorSettings() { AnyType = "object"; Namespace = "MyNamespace"; DateType = "System.DateTimeOffset"; DateTimeType = "System.DateTimeOffset"; TimeType = "System.TimeSpan"; TimeSpanType = "System.TimeSpan"; ArrayType = "System.Collections.Generic.ICollection"; ArrayInstanceType = "System.Collections.ObjectModel.Collection"; ArrayBaseType = "System.Collections.ObjectModel.Collection"; DictionaryType = "System.Collections.Generic.IDictionary"; DictionaryInstanceType = "System.Collections.Generic.Dictionary"; DictionaryBaseType = "System.Collections.Generic.Dictionary"; ClassStyle = CSharpClassStyle.Poco; RequiredPropertiesMustBeDefined = true; GenerateDataAnnotations = true; TypeAccessModifier = "public"; PropertySetterAccessModifier = string.Empty; GenerateJsonMethods = false; EnforceFlagEnums = false; ValueGenerator = new CSharpValueGenerator(this); PropertyNameGenerator = new CSharpPropertyNameGenerator(); TemplateFactory = new DefaultTemplateFactory(this, new Assembly[] { typeof(CSharpGeneratorSettings).GetTypeInfo().Assembly }); InlineNamedArrays = false; InlineNamedDictionaries = false; InlineNamedTuples = true; this.EnumNameGenerator = new Naming.NonCasingEnumNameGenerator(); this.PropertyNameGenerator = new Naming.NonCasingPropertyNameGenerator(); this.TypeNameGenerator = new Naming.NonCasingTypeNameGenerator(); }
public QuokkaTemplateAnalyzer() { var templateFactory = new DefaultTemplateFactory(new[] { new FormsTemplateFunction() }); templateChecker = template => templateFactory.TryCreateTemplate(template, out var errors) != null; }