├── Tests ├── SignalR │ ├── ClientApp │ │ └── src │ │ │ ├── assets │ │ │ └── .gitkeep │ │ │ ├── app │ │ │ ├── multiple │ │ │ │ └── services-2 │ │ │ │ │ └── index.ts │ │ │ ├── app.component.html │ │ │ ├── home │ │ │ │ └── home.component.ts │ │ │ ├── app.component.ts │ │ │ ├── counter │ │ │ │ ├── counter.component.html │ │ │ │ └── counter.component.ts │ │ │ └── nav-menu │ │ │ │ └── nav-menu.component.css │ │ │ ├── environments │ │ │ └── environment.prod.ts │ │ │ └── styles.css │ ├── AssemblyInfo.cs │ ├── wwwroot │ │ └── favicon.ico │ ├── Pages │ │ └── _ViewImports.cshtml │ ├── appsettings.json │ ├── appsettings.Development.json │ └── Models │ │ └── WeatherForecast.cs ├── WebApiFluent │ ├── ClientApp │ │ ├── src │ │ │ ├── assets │ │ │ │ └── .gitkeep │ │ │ ├── environments │ │ │ │ └── environment.prod.ts │ │ │ ├── app │ │ │ │ ├── app.component.html │ │ │ │ ├── home │ │ │ │ │ └── home.component.ts │ │ │ │ ├── app.component.ts │ │ │ │ └── counter │ │ │ │ │ ├── counter.component.html │ │ │ │ │ └── counter.component.ts │ │ │ ├── tsconfig.app.json │ │ │ ├── tsconfig.server.json │ │ │ ├── tsconfig.spec.json │ │ │ └── styles.css │ │ └── e2e │ │ │ ├── src │ │ │ ├── app.po.ts │ │ │ └── app.e2e-spec.ts │ │ │ └── tsconfig.e2e.json │ ├── wwwroot │ │ └── favicon.ico │ ├── Pages │ │ └── _ViewImports.cshtml │ ├── appsettings.Development.json │ ├── appsettings.json │ └── WeatherForecast.cs ├── Generator │ ├── Resources │ │ ├── empty-configuration.json │ │ ├── empty-generate.json │ │ ├── empty-configuration-array.json │ │ ├── old-config.json │ │ ├── one-generate.json │ │ ├── one-generate-in-array.json │ │ ├── old-config.xml │ │ ├── one-generate-in-array-array.json │ │ ├── one-read-one-generate.json │ │ ├── two-generates-in-array-array.json │ │ └── two-reads-one-generate.json │ └── Models │ │ ├── Read1Configuration.cs │ │ ├── Read2Configuration.cs │ │ ├── Write1Configuration.cs │ │ ├── Write2Configuration.cs │ │ ├── Reader1.cs │ │ └── Reader2.cs ├── UrlVersionedWebApiController │ ├── ClientApp │ │ ├── src │ │ │ ├── assets │ │ │ │ └── .gitkeep │ │ │ ├── environments │ │ │ │ └── environment.prod.ts │ │ │ ├── app │ │ │ │ ├── app.component.html │ │ │ │ ├── home │ │ │ │ │ └── home.component.ts │ │ │ │ ├── app.component.ts │ │ │ │ └── counter │ │ │ │ │ └── counter.component.html │ │ │ ├── tsconfig.app.json │ │ │ └── tsconfig.server.json │ │ └── e2e │ │ │ ├── src │ │ │ └── app.po.ts │ │ │ └── tsconfig.e2e.json │ ├── AssemblyInfo.cs │ ├── wwwroot │ │ └── favicon.ico │ ├── Pages │ │ └── _ViewImports.cshtml │ ├── appsettings.Development.json │ └── appsettings.json ├── WebApiController │ ├── ClientApp │ │ ├── src │ │ │ ├── app │ │ │ │ ├── date │ │ │ │ │ ├── date.component.css │ │ │ │ │ ├── services │ │ │ │ │ │ └── index.ts │ │ │ │ │ └── models │ │ │ │ │ │ └── date-model.ts │ │ │ │ ├── fix-casing │ │ │ │ │ ├── fix-casing.component.css │ │ │ │ │ └── models │ │ │ │ │ │ └── index.ts │ │ │ │ ├── keep-casing │ │ │ │ │ ├── keep-casing.component.css │ │ │ │ │ └── keep-casing.component.html │ │ │ │ ├── versioned-api │ │ │ │ │ ├── versioned-api.component.css │ │ │ │ │ └── versioned-api.component.html │ │ │ │ ├── edge-cases │ │ │ │ │ ├── components │ │ │ │ │ │ └── edge-cases.component.css │ │ │ │ │ └── models │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── date-model.ts │ │ │ │ │ │ └── exclusive-generic-complex-result.ts │ │ │ │ ├── rename │ │ │ │ │ └── models │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── data.ts │ │ │ │ │ │ └── rename-model.ts │ │ │ │ ├── convert-to-interface │ │ │ │ │ ├── models │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── convert-me.ts │ │ │ │ │ │ └── convert-me-optional.ts │ │ │ │ │ └── services │ │ │ │ │ │ └── index.ts │ │ │ │ ├── get-complex │ │ │ │ │ └── models │ │ │ │ │ │ └── index.ts │ │ │ │ ├── app.component.html │ │ │ │ ├── home │ │ │ │ │ └── home.component.ts │ │ │ │ ├── app.component.ts │ │ │ │ ├── counter │ │ │ │ │ ├── counter.component.html │ │ │ │ │ └── counter.component.ts │ │ │ │ └── post │ │ │ │ │ └── models │ │ │ │ │ └── post-model.ts │ │ │ ├── environments │ │ │ │ └── environment.prod.ts │ │ │ ├── tsconfig.app.json │ │ │ ├── tsconfig.server.json │ │ │ └── tsconfig.spec.json │ │ ├── e2e │ │ │ ├── src │ │ │ │ └── app.po.ts │ │ │ └── tsconfig.e2e.json │ │ └── .editorconfig │ ├── AssemblyInfo.cs │ ├── Models │ │ ├── DummyData.cs │ │ ├── RenameDto.cs │ │ ├── PostModel.cs │ │ ├── ConvertMe.cs │ │ └── SelfReferencingModel.cs │ ├── wwwroot │ │ └── favicon.ico │ ├── Pages │ │ └── _ViewImports.cshtml │ ├── Services │ │ └── DummyService.cs │ ├── appsettings.Development.json │ └── appsettings.json ├── Net5 │ ├── AssemblyInfo.cs │ └── Output │ │ ├── sub-type.ts │ │ └── generic-sub-type.ts ├── Net6 │ ├── AssemblyInfo.cs │ └── Output │ │ ├── sub-type.ts │ │ └── generic-sub-type.ts ├── Net7 │ ├── AssemblyInfo.cs │ └── Output │ │ ├── sub-type.ts │ │ └── generic-sub-type.ts ├── Net8 │ ├── AssemblyInfo.cs │ └── Output │ │ ├── sub-type.ts │ │ └── generic-sub-type.ts ├── Net9 │ ├── AssemblyInfo.cs │ └── Output │ │ ├── sub-type.ts │ │ └── generic-sub-type.ts ├── Sqlite │ ├── AssemblyInfo.cs │ ├── Program.cs │ └── Models │ │ ├── Complex.cs │ │ ├── Simple.cs │ │ └── SimpleWithPrimary.cs ├── AnnotationAsync │ ├── AssemblyInfo.cs │ ├── Output │ │ ├── sub-type.ts │ │ ├── not-async-type.ts │ │ └── angular-async.ts │ ├── Program.cs │ ├── AngularAsync.cs │ └── NotAsyncType.cs ├── Net10 │ └── Net10 │ │ ├── AssemblyInfo.cs │ │ ├── Program.cs │ │ └── Output │ │ └── sub-type.ts ├── v10 │ ├── TypeScriptValidationStrict │ │ └── validate.cmd │ ├── TypeScriptValidationNotStrict │ │ ├── validate.cmd │ │ └── index.js │ ├── CustomBuildOutputLocation │ │ ├── Class1.cs │ │ ├── AssemblyInfo.cs │ │ └── Output │ │ │ └── class-1.ts │ ├── StrictAnnotationsNullableDisabled │ │ └── AssemblyInfo.cs │ ├── StrictAnnotationsNullableEnabled │ │ └── AssemblyInfo.cs │ ├── EnumAnnotationsNullableDisabled │ │ └── AssemblyInfo.cs │ ├── InheritanceAnnotationsNullableDisabled │ │ ├── AssemblyInfo.cs │ │ └── Output │ │ │ ├── abstract.ts │ │ │ ├── Angular │ │ │ ├── abstract.ts │ │ │ └── index.ts │ │ │ └── base.ts │ ├── TypesAnnotationsNullableEnabled │ │ ├── Output │ │ │ ├── sub-type.ts │ │ │ └── generic-sub-type.ts │ │ └── AssemblyInfo.cs │ ├── SelfReferencingAnnotationsNullableEnabled │ │ └── AssemblyInfo.cs │ └── TypesAnnotationsNullableDisabled │ │ ├── Output │ │ ├── sub-type.ts │ │ └── generic-sub-type.ts │ │ └── AssemblyInfo.cs ├── AnnotationInNestedClass │ ├── AssemblyInfo.cs │ ├── Output │ │ └── class-2.ts │ └── Class1.cs ├── ReflectionLoadFromNugetPackageNet5 │ ├── AssemblyInfo.cs │ └── Output │ │ └── class-1.ts ├── AnnotationAsyncAssembly │ ├── AssemblyInfo.cs │ ├── Output │ │ ├── class-1.ts │ │ └── class-2.ts │ ├── Class2.cs │ └── Class1.cs ├── AnnotationsWithMultipleOutputs │ ├── Output │ │ ├── First │ │ │ ├── index.ts │ │ │ └── sub-type.ts │ │ ├── Second │ │ │ ├── index.ts │ │ │ └── sub-type.ts │ │ └── Third │ │ │ └── third-type.ts │ ├── SubType.cs │ ├── ThirdType.cs │ ├── FirstType.cs │ └── SecondType.cs ├── Derive │ ├── AssemblyInfo.cs │ └── Output │ │ ├── base-interface.interface.ts │ │ ├── abstract-type.ts │ │ ├── derived-from-class-prefer-interface.ts │ │ ├── derived-from-abstract-class-prefer-interface.ts │ │ ├── derive-from-interface-prefer-interface.ts │ │ └── base-class.ts ├── Formatting │ ├── Formatting │ │ ├── Interface.cs │ │ ├── IInterface.cs │ │ ├── TabTest.cs │ │ ├── TwoWhitespaceTest.cs │ │ ├── Formatting.csproj │ │ └── MyClass.cs │ └── Generator │ │ └── Output │ │ ├── WithoutPrefix │ │ ├── interface.ts │ │ └── interface.interface.ts │ │ ├── WithPrefix │ │ └── interface.interface.ts │ │ ├── tab-test.ts │ │ └── two-whitespace-test.ts ├── Caseing.Generator │ └── Output │ │ ├── index.ts │ │ ├── case-me.ts │ │ └── keep-my-case.ts ├── Fluent │ ├── Fluent │ │ ├── SubType.cs │ │ ├── IGenericInterface.cs │ │ ├── TypeWithInterface.cs │ │ ├── Fluent.csproj │ │ ├── TypeWithIgnoredBase.cs │ │ ├── TypeWithIgnoreInterface.cs │ │ ├── TypeWithGenericIgnoredBase.cs │ │ ├── TypeWithGenericInterface.cs │ │ ├── TypeWithIgnoreGenericInterface.cs │ │ ├── IGenericInterfaceWithNonGenericBase.cs │ │ ├── SelfReferencingType.cs │ │ ├── TypeWithGenericAndNotGenericInterface.cs │ │ ├── IIgnoreMe.cs │ │ ├── IInterface.cs │ │ ├── IgnoreMe.cs │ │ └── TypeWithGenericAndNotGenericBaseInterface.cs │ └── Fluent.Generator │ │ └── Output │ │ └── Models │ │ ├── interface.interface.ts │ │ ├── generic-interface.interface.ts │ │ ├── interface-generic.interface.ts │ │ ├── sub-type.ts │ │ ├── edge-case-1-sub-type.ts │ │ ├── type-with-ignored-base.ts │ │ └── generic-interface-with-non-generic-base.interface.ts └── Caseing │ ├── Caseing.csproj │ ├── CaseMe.cs │ ├── KeepMyCase.cs │ └── MixedCaseing.cs ├── Examples ├── Reflection │ ├── README.md │ ├── ReflectionFromExecutable │ │ ├── Program.cs │ │ └── TypeToRead.cs │ ├── ReflectionReturnTypeAttribute │ │ ├── SubType.cs │ │ └── OtherSubType.cs │ ├── ReflectionFromIndex │ │ ├── IgnoredType.cs │ │ ├── AnotherType.cs │ │ ├── TypeToRead.cs │ │ └── Index.cs │ ├── ReflectionFromMultipleAssemblies │ │ └── SecondAssembly │ │ │ ├── SecondType.cs │ │ │ └── SecondAssembly.csproj │ ├── ReflectionIgnoreAttribute │ │ ├── EnumToIgnore.cs │ │ └── TypeToIgnore.cs │ ├── ReflectionFromCore │ │ ├── Program.cs │ │ └── TypeToRead.cs │ ├── ReflectionX86 │ │ └── TypeToRead.cs │ ├── ReflectionFromStandard │ │ └── TypeToRead.cs │ ├── ReflectionFromNet5 │ │ └── TypeToRead.cs │ └── ReflectionFromAttributes │ │ └── TypeToRead.cs ├── Angular │ ├── Annotation │ │ ├── Strict │ │ │ ├── ClientApp │ │ │ │ └── src │ │ │ │ │ ├── assets │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── app │ │ │ │ │ ├── app.component.scss │ │ │ │ │ ├── models │ │ │ │ │ │ └── index.ts │ │ │ │ │ └── app-routing.module.ts │ │ │ │ │ ├── environments │ │ │ │ │ └── environment.prod.ts │ │ │ │ │ ├── styles.scss │ │ │ │ │ └── favicon.ico │ │ │ ├── Pages │ │ │ │ └── _ViewImports.cshtml │ │ │ ├── wwwroot │ │ │ │ └── favicon.ico │ │ │ ├── appsettings.Development.json │ │ │ └── appsettings.json │ │ ├── ChangeReturnType │ │ │ ├── ClientApp │ │ │ │ └── src │ │ │ │ │ ├── assets │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── environments │ │ │ │ │ └── environment.prod.ts │ │ │ │ │ └── app │ │ │ │ │ ├── app.component.html │ │ │ │ │ ├── home │ │ │ │ │ └── home.component.ts │ │ │ │ │ ├── models │ │ │ │ │ └── custom-weather-forecast.ts │ │ │ │ │ ├── app.component.ts │ │ │ │ │ └── counter │ │ │ │ │ └── counter.component.html │ │ │ ├── SpecialWeatherForecast.cs │ │ │ ├── Pages │ │ │ │ └── _ViewImports.cshtml │ │ │ ├── wwwroot │ │ │ │ └── favicon.ico │ │ │ ├── appsettings.json │ │ │ └── appsettings.Development.json │ │ ├── ServiceFromAspNetCore │ │ │ ├── ClientApp │ │ │ │ ├── src │ │ │ │ │ ├── assets │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── environments │ │ │ │ │ │ └── environment.prod.ts │ │ │ │ │ ├── app │ │ │ │ │ │ ├── app.component.html │ │ │ │ │ │ ├── home │ │ │ │ │ │ │ └── home.component.ts │ │ │ │ │ │ ├── app.component.ts │ │ │ │ │ │ └── counter │ │ │ │ │ │ │ └── counter.component.html │ │ │ │ │ ├── tsconfig.app.json │ │ │ │ │ └── tsconfig.server.json │ │ │ │ ├── e2e │ │ │ │ │ ├── src │ │ │ │ │ │ └── app.po.ts │ │ │ │ │ └── tsconfig.e2e.json │ │ │ │ └── .editorconfig │ │ │ ├── wwwroot │ │ │ │ └── favicon.ico │ │ │ ├── Pages │ │ │ │ └── _ViewImports.cshtml │ │ │ ├── appsettings.Development.json │ │ │ └── appsettings.json │ │ ├── ServiceFromAspNetCoreSignalRHub │ │ │ ├── ClientApp │ │ │ │ ├── src │ │ │ │ │ ├── assets │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── environments │ │ │ │ │ │ └── environment.prod.ts │ │ │ │ │ ├── app │ │ │ │ │ │ ├── app.component.html │ │ │ │ │ │ ├── home │ │ │ │ │ │ │ └── home.component.ts │ │ │ │ │ │ ├── app.component.ts │ │ │ │ │ │ └── counter │ │ │ │ │ │ │ └── counter.component.html │ │ │ │ │ ├── tsconfig.app.json │ │ │ │ │ └── tsconfig.server.json │ │ │ │ ├── e2e │ │ │ │ │ ├── src │ │ │ │ │ │ └── app.po.ts │ │ │ │ │ └── tsconfig.e2e.json │ │ │ │ └── .editorconfig │ │ │ ├── wwwroot │ │ │ │ └── favicon.ico │ │ │ ├── Pages │ │ │ │ └── _ViewImports.cshtml │ │ │ ├── appsettings.Development.json │ │ │ └── appsettings.json │ │ ├── ModelFromAssembly │ │ │ ├── Output │ │ │ │ └── index.ts │ │ │ ├── IgnoredType.cs │ │ │ ├── AnotherType.cs │ │ │ ├── TypeToRead.cs │ │ │ └── Index.cs │ │ └── FromModel │ │ │ └── TypeToRead.cs │ ├── Fluent │ │ ├── ChangeReturnType │ │ │ └── Assembly │ │ │ │ ├── ClientApp │ │ │ │ ├── src │ │ │ │ │ ├── assets │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── environments │ │ │ │ │ │ └── environment.prod.ts │ │ │ │ │ ├── app │ │ │ │ │ │ ├── app.component.html │ │ │ │ │ │ ├── home │ │ │ │ │ │ │ └── home.component.ts │ │ │ │ │ │ ├── models │ │ │ │ │ │ │ └── custom-weather-forecast.ts │ │ │ │ │ │ ├── app.component.ts │ │ │ │ │ │ └── counter │ │ │ │ │ │ │ └── counter.component.html │ │ │ │ │ ├── tsconfig.app.json │ │ │ │ │ └── tsconfig.server.json │ │ │ │ └── e2e │ │ │ │ │ ├── src │ │ │ │ │ └── app.po.ts │ │ │ │ │ └── tsconfig.e2e.json │ │ │ │ ├── Pages │ │ │ │ └── _ViewImports.cshtml │ │ │ │ ├── wwwroot │ │ │ │ └── favicon.ico │ │ │ │ ├── appsettings.Development.json │ │ │ │ └── appsettings.json │ │ ├── ServiceFromAspNetCore │ │ │ └── Service │ │ │ │ ├── ClientApp │ │ │ │ ├── src │ │ │ │ │ ├── assets │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── environments │ │ │ │ │ │ └── environment.prod.ts │ │ │ │ │ ├── app │ │ │ │ │ │ ├── app.component.html │ │ │ │ │ │ ├── home │ │ │ │ │ │ │ └── home.component.ts │ │ │ │ │ │ ├── app.component.ts │ │ │ │ │ │ └── counter │ │ │ │ │ │ │ └── counter.component.html │ │ │ │ │ ├── tsconfig.app.json │ │ │ │ │ └── tsconfig.server.json │ │ │ │ └── e2e │ │ │ │ │ ├── src │ │ │ │ │ └── app.po.ts │ │ │ │ │ └── tsconfig.e2e.json │ │ │ │ ├── wwwroot │ │ │ │ └── favicon.ico │ │ │ │ ├── Pages │ │ │ │ └── _ViewImports.cshtml │ │ │ │ ├── appsettings.Development.json │ │ │ │ └── appsettings.json │ │ ├── ServiceFromSignalR │ │ │ └── Service │ │ │ │ ├── ClientApp │ │ │ │ ├── src │ │ │ │ │ ├── assets │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── environments │ │ │ │ │ │ └── environment.prod.ts │ │ │ │ │ ├── app │ │ │ │ │ │ ├── models │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── app.component.html │ │ │ │ │ │ ├── home │ │ │ │ │ │ │ └── home.component.ts │ │ │ │ │ │ ├── app.component.ts │ │ │ │ │ │ └── counter │ │ │ │ │ │ │ └── counter.component.html │ │ │ │ │ ├── tsconfig.app.json │ │ │ │ │ └── tsconfig.server.json │ │ │ │ └── e2e │ │ │ │ │ ├── src │ │ │ │ │ └── app.po.ts │ │ │ │ │ └── tsconfig.e2e.json │ │ │ │ ├── wwwroot │ │ │ │ └── favicon.ico │ │ │ │ ├── Pages │ │ │ │ └── _ViewImports.cshtml │ │ │ │ ├── appsettings.Development.json │ │ │ │ └── appsettings.json │ │ ├── WithCustomHttpClient │ │ │ └── Service │ │ │ │ ├── ClientApp │ │ │ │ ├── src │ │ │ │ │ ├── assets │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── environments │ │ │ │ │ │ └── environment.prod.ts │ │ │ │ │ ├── app │ │ │ │ │ │ ├── app.component.html │ │ │ │ │ │ ├── home │ │ │ │ │ │ │ └── home.component.ts │ │ │ │ │ │ ├── app.component.ts │ │ │ │ │ │ └── counter │ │ │ │ │ │ │ └── counter.component.html │ │ │ │ │ ├── tsconfig.app.json │ │ │ │ │ └── tsconfig.server.json │ │ │ │ └── e2e │ │ │ │ │ ├── src │ │ │ │ │ └── app.po.ts │ │ │ │ │ └── tsconfig.e2e.json │ │ │ │ ├── wwwroot │ │ │ │ └── favicon.ico │ │ │ │ ├── Pages │ │ │ │ └── _ViewImports.cshtml │ │ │ │ ├── appsettings.Development.json │ │ │ │ └── appsettings.json │ │ ├── FromModel │ │ │ └── Assembly │ │ │ │ ├── FromModel.csproj │ │ │ │ └── TypeToRead.cs │ │ ├── GenerateInterfacesInsteadClasses │ │ │ ├── Assembly │ │ │ │ ├── TestModel.cs │ │ │ │ └── GenerateInterfacesInsteadClasses.csproj │ │ │ └── Generator │ │ │ │ └── Output │ │ │ │ └── test-model.ts │ │ └── NpmPackage │ │ │ ├── appsettings.Development.json │ │ │ ├── appsettings.json │ │ │ └── NpmPackage.csproj │ └── build.cmd ├── Sqlite │ └── FromDatabase │ │ └── test.db ├── Json │ └── JsonWithReader │ │ ├── Source │ │ ├── simple.json │ │ └── complex.json │ │ └── Program.cs ├── AspDotNet │ ├── WebApi │ │ ├── Global.asax │ │ ├── Models │ │ │ └── Value.cs │ │ └── Global.asax.cs │ ├── WebApi.Attributes │ │ ├── Global.asax │ │ ├── Models │ │ │ └── Value.cs │ │ └── Global.asax.cs │ ├── WebApi.Core │ │ ├── appsettings.json │ │ ├── Models │ │ │ └── Value.cs │ │ └── appsettings.Development.json │ └── WebApi.Attributes.Core │ │ ├── appsettings.json │ │ ├── appsettings.Development.json │ │ └── Models │ │ └── Value.cs ├── Tsql │ └── Tsql │ │ └── Program.cs └── build.cmd ├── icon.png ├── nircmd.exe ├── Common.Fluent └── Syntax │ ├── IReadFluentSyntax.cs │ ├── IWriteFluentSyntaxInternal.cs │ ├── IReadFluentSyntaxInternal.cs │ ├── IExecutableSyntax.cs │ ├── ISyntaxResolver.cs │ └── IFluentInternalSyntax.cs ├── Reflection.Tests ├── Results │ ├── subtype.result │ ├── first.interface.ts.result │ ├── second.interface.ts.result │ ├── third.interface.ts.result │ ├── inner-custom-type.ts.result │ ├── generic-type.ts.result │ ├── exported-primitive-type.ts.result │ ├── one-interface-type.ts.result │ ├── inherit-first.interface.ts.result │ ├── exported-type.ts.result │ ├── inherit-interface-type.ts.result │ ├── two-interfaces-type.ts.result │ └── base-class-and-one-interface-type.ts.result ├── Data │ ├── IFirst.cs │ ├── IThird.cs │ ├── ISecond.cs │ ├── OneProperty.cs │ ├── InnerCustomType.cs │ ├── BasedOnCustomGenericString.cs │ ├── BasedOnCustomGenericSubtype.cs │ ├── RecursiveType.cs │ ├── IInheritFirst.cs │ ├── OneInterfaceType.cs │ ├── BasedOnStringList.cs │ ├── BasedOnSubtypeList.cs │ ├── ExportedPrimitiveType.cs │ ├── OnePropertyWithCustomType.cs │ ├── CustomGenericStringProperty.cs │ ├── OneField.cs │ ├── CustomGenericSubtypeProperty.cs │ ├── GenericType.cs │ ├── CustomGeneric.cs │ ├── CustomTypeInList.cs │ ├── BaseClassAndOneInterfaceType.cs │ ├── CustomTypeInArray.cs │ ├── ExportedType.cs │ ├── TwoInterfacesType.cs │ ├── InheritInterfaceType.cs │ └── BaseClassAndTwoInterfacesType.cs └── Resources │ └── reflection.generator.json ├── EntityFramework ├── Fluent │ ├── IFluentLanguageElement.cs │ ├── FluentStoredProcedureAction.cs │ └── FluentSetting.cs └── AssemblyInfo.cs ├── Json ├── AssemblyInfo.cs └── Fluent │ ├── IJsonReadSyntax.cs │ ├── IJsonWriteModelOrReaderSyntax.cs │ ├── IJsonWriteSyntax.cs │ └── IJsonWriteModelSyntax.cs ├── Sqlite.Fluent ├── ISqliteFromDatabaseSyntax.cs ├── ISqliteReadSyntax.cs └── ISqliteFromDatabaseOrReadSyntax.cs ├── Tsql └── AssemblyInfo.cs ├── Angular ├── AssemblyInfo.cs └── Models │ └── IncrementVersion.cs ├── Csharp └── AssemblyInfo.cs ├── Json.Tests └── Resources │ ├── simple.json │ ├── Alllowerobject.cs.result │ ├── Allupperobject.cs.result │ ├── ObjectProperty.cs.result │ ├── ObjectArrayProperty.cs.result │ ├── Simple.cs.result │ ├── complex.json │ ├── SimpleWithoutReader.cs.result │ └── formatNames.json ├── OData └── AssemblyInfo.cs ├── OpenApi └── AssemblyInfo.cs ├── Sqlite ├── AssemblyInfo.cs └── Annotations │ ├── GenerateAsNotNullAttribute.cs │ ├── GenerateAsPrimaryKeyAttribute.cs │ └── GenerateAsAutoIncrementAttribute.cs ├── AspDotNet └── AssemblyInfo.cs ├── Common.Generator ├── Templates │ ├── Base │ │ └── ICodeFragment.cs │ ├── Executing │ │ ├── BlankLineTemplate.cs │ │ ├── ThisTemplate.cs │ │ ├── BaseTemplate.cs │ │ ├── NotTemplate.cs │ │ ├── AwaitTemplate.cs │ │ ├── TypeOfTemplate.cs │ │ ├── NullValueTemplate.cs │ │ ├── ReturnTemplate.cs │ │ ├── NullConditionalTemplate.cs │ │ └── ParenthesisTemplate.cs │ ├── Types │ │ ├── VoidTemplate.cs │ │ └── NullTemplate.cs │ ├── Structural │ │ └── ExportTemplate.cs │ └── Extensions │ │ └── CommentTemplateExtension.cs ├── Client │ ├── GeneratorClient.cs │ ├── GeneratorClientConfiguration.cs │ └── GeneratorConfiguration.cs ├── Transfer │ ├── ITransferObject.cs │ ├── Readers │ │ └── ITransferReader.cs │ ├── Writers │ │ └── ITransferWriter.cs │ ├── ControllerTransferObject.cs │ ├── EntitySetTransferObject.cs │ ├── EntityActionParameterTransferObject.cs │ ├── GenericAliasTransferObject.cs │ ├── HttpServiceActionTypeTransferObject.cs │ └── EntityKeyTransferObject.cs ├── Fluent │ └── IGeneratorRunSyntax.cs ├── Command │ ├── IPrepareCommand.cs │ └── IGeneratorCommand.cs ├── Licensing │ ├── MessageType.cs │ ├── Message.cs │ └── License.cs ├── Assemblies │ ├── Loaders │ │ └── IAssemblyLoader.cs │ └── Locators │ │ └── IAssemblyLocator.cs ├── Output │ ├── IOutputAction.cs │ └── IOutputCache.cs ├── Configurations │ ├── ExecuteConfiguration.cs │ └── IModelConfiguration.cs ├── Mappings │ ├── ITypeMappingTypeSyntax.cs │ ├── ITypeMappingFromSyntax.cs │ └── ITypeMappingMapSyntax.cs ├── Models │ └── Visibility.cs ├── Helpers │ ├── Codeable.cs │ └── Code.cs ├── Statistics │ └── CommandStatistic.cs ├── Writers │ ├── ITypeWriter.cs │ ├── ITemplateWriter.cs │ ├── IGenericTypeWriter.cs │ ├── AwaitWriter.cs │ ├── NotWriter.cs │ ├── NullWriter.cs │ ├── ThisWriter.cs │ ├── VoidWriter.cs │ ├── BlankLineWriter.cs │ ├── NullValueWriter.cs │ └── NullConditionalWriter.cs ├── Settings │ └── GlobalSettings.cs └── Options │ └── IOptionsFactory.cs ├── Reflection └── AssemblyInfo.cs ├── Sqlite.Generator ├── Parsers │ └── ISqliteStatement.cs └── Transfer │ └── SqliteFieldTransferObject.cs ├── TypeScript.Generator ├── Transfer │ ├── IIndexLine.cs │ ├── UnknownIndexLine.cs │ ├── ExportIndexLine.cs │ └── TypeScriptIndexFile.cs ├── Templates │ ├── ForceNullTemplate.cs │ └── ConstructorTemplate.cs ├── Languages │ └── LanguageExtension.cs └── Writers │ └── TypeScriptNamespaceWriter.cs ├── TypeScript ├── AssemblyInfo.cs └── Annotations │ ├── GenerateNoIndexAttribute.cs │ └── GenerateForceIndexAttribute.cs ├── AspDotNet.Tests └── more-tests.md ├── Common ├── Models │ ├── CaseMode.cs │ └── OutputLanguage.cs └── Annotations │ ├── GenerateNoHeaderAttribute.cs │ ├── IGeneratorCommandAdditionalParameterAttribute.cs │ ├── GenerateOnlySubTypesAttribute.cs │ ├── GenerateNoOptionalAttribute.cs │ ├── IGeneratorCommandAttribute.cs │ ├── GenerateFieldsAsPropertiesAttribute.cs │ ├── GeneratePropertiesAsFieldsAttribute.cs │ ├── GenerateFixCasingWithMappingAttribute.cs │ ├── GeneratePluginAttribute.cs │ └── GenerateIgnoreAttribute.cs ├── Tsql.Fluent └── ITsqlReadSyntax.cs ├── TypeScript.Fluent └── ITypeScriptSyntax.cs ├── AspDotNet.Generator ├── Writers │ └── AspDotNetODataControllerWriter.cs └── Configurations │ ├── AspDotNetReadHubConfiguration.cs │ ├── AspDotNetReadControllerConfiguration.cs │ ├── AspDotNetReadConfiguration.cs │ └── AspDotNetWriteEntityControllerActionAttributeValueConfiguration.cs ├── CLI ├── App.config └── FodyWeavers.xml ├── Json.Generator ├── Transfers │ └── JsonModelTransferObject.cs ├── Configurations │ └── JsonReadConfiguration.cs └── Language │ └── JsonLanguage.cs ├── Main.Legacy └── App.config ├── Tsql.Generator ├── Configurations │ ├── TsqlReadStoredProcedure.cs │ └── TsqlReadEntityKeyAction.cs └── Type │ └── TsqlParameter.cs ├── EntityFramework.Generator └── Configurations │ └── EntityFrameworkCoreWriteConfiguration.cs ├── Reflection.Fluent └── IReflectionWriteSyntax.cs ├── Reflection.Generator └── Configurations │ └── ReflectionReadConfiguration.cs ├── Angular.Generator └── Configurations │ └── AngularWriteModelConfiguration.cs ├── Csharp.Generator ├── Templates │ ├── VerbatimStringTemplate.cs │ └── CsharpTemplate.cs └── Languages │ └── LanguageExtension.cs ├── Angular.Fluent └── IAngularWriteSyntax.cs ├── OData.Tests └── Resources │ ├── address.ts.result │ └── user.ts.result └── Watchdog └── Helpers └── InstanceHelper.cs /Tests/SignalR/ClientApp/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Tests/WebApiFluent/ClientApp/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Tests/Generator/Resources/empty-configuration.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /Examples/Reflection/README.md: -------------------------------------------------------------------------------- 1 | # Reflection Examples 2 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/Strict/ClientApp/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Tests/UrlVersionedWebApiController/ClientApp/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/src/app/date/date.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/Strict/ClientApp/src/app/app.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ChangeReturnType/ClientApp/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Tests/Generator/Resources/empty-generate.json: -------------------------------------------------------------------------------- 1 | { 2 | "generate": {} 3 | } -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/src/app/fix-casing/fix-casing.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/src/app/keep-casing/keep-casing.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KY-Programming/generator/HEAD/icon.png -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ServiceFromAspNetCore/ClientApp/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ChangeReturnType/Assembly/ClientApp/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ServiceFromAspNetCore/Service/ClientApp/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ServiceFromSignalR/Service/ClientApp/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/WithCustomHttpClient/Service/ClientApp/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Tests/Generator/Resources/empty-configuration-array.json: -------------------------------------------------------------------------------- 1 | [ 2 | {}, 3 | {} 4 | ] -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/src/app/versioned-api/versioned-api.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nircmd.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KY-Programming/generator/HEAD/nircmd.exe -------------------------------------------------------------------------------- /Tests/Net5/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly:GenerateNoHeader] 4 | -------------------------------------------------------------------------------- /Tests/Net6/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly:GenerateNoHeader] 4 | -------------------------------------------------------------------------------- /Tests/Net7/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly:GenerateNoHeader] 4 | -------------------------------------------------------------------------------- /Tests/Net8/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly:GenerateNoHeader] 4 | -------------------------------------------------------------------------------- /Tests/Net9/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly:GenerateNoHeader] 4 | -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/src/app/edge-cases/components/edge-cases.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ServiceFromAspNetCoreSignalRHub/ClientApp/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Tests/SignalR/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly:GenerateNoHeader] 4 | -------------------------------------------------------------------------------- /Tests/Sqlite/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly:GenerateNoHeader] 4 | -------------------------------------------------------------------------------- /Tests/AnnotationAsync/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly:GenerateNoHeader] 4 | -------------------------------------------------------------------------------- /Tests/Net10/Net10/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly:GenerateNoHeader] 4 | -------------------------------------------------------------------------------- /Tests/v10/TypeScriptValidationStrict/validate.cmd: -------------------------------------------------------------------------------- 1 | rmdir /S/Q Output 2 | npx -p typescript tsc 3 | -------------------------------------------------------------------------------- /Tests/WebApiController/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly:GenerateNoHeader] 4 | -------------------------------------------------------------------------------- /Tests/v10/TypeScriptValidationNotStrict/validate.cmd: -------------------------------------------------------------------------------- 1 | rmdir /S/Q Output 2 | npx -p typescript tsc 3 | -------------------------------------------------------------------------------- /Tests/AnnotationInNestedClass/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly:GenerateNoHeader] 4 | -------------------------------------------------------------------------------- /Tests/UrlVersionedWebApiController/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly:GenerateNoHeader] 4 | -------------------------------------------------------------------------------- /Tests/ReflectionLoadFromNugetPackageNet5/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly:GenerateNoHeader] 4 | -------------------------------------------------------------------------------- /Common.Fluent/Syntax/IReadFluentSyntax.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator; 2 | 3 | public interface IReadFluentSyntax 4 | { } 5 | -------------------------------------------------------------------------------- /Tests/SignalR/ClientApp/src/app/multiple/services-2/index.ts: -------------------------------------------------------------------------------- 1 | 2 | export * from "./multiple-output-hub.service"; 3 | 4 | -------------------------------------------------------------------------------- /Tests/SignalR/ClientApp/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /Reflection.Tests/Results/subtype.result: -------------------------------------------------------------------------------- 1 | // tslint:disable 2 | 3 | export class SubType { 4 | public property: string; 5 | } -------------------------------------------------------------------------------- /Tests/SignalR/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KY-Programming/generator/HEAD/Tests/SignalR/wwwroot/favicon.ico -------------------------------------------------------------------------------- /Tests/WebApiFluent/ClientApp/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /EntityFramework/Fluent/IFluentLanguageElement.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator; 2 | 3 | public interface IFluentLanguageElement 4 | { } 5 | -------------------------------------------------------------------------------- /Examples/Sqlite/FromDatabase/test.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KY-Programming/generator/HEAD/Examples/Sqlite/FromDatabase/test.db -------------------------------------------------------------------------------- /Json/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly: GenerateWith("KY.Generator.Json.Generator", UseSameVersion = true)] 4 | -------------------------------------------------------------------------------- /Sqlite.Fluent/ISqliteFromDatabaseSyntax.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator; 2 | 3 | public interface ISqliteFromDatabaseSyntax 4 | { } 5 | -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /Tests/v10/TypeScriptValidationNotStrict/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | -------------------------------------------------------------------------------- /Tsql/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly: GenerateWith("KY.Generator.Tsql.Generator", UseSameVersion = true)] 4 | -------------------------------------------------------------------------------- /Angular/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly: GenerateWith("KY.Generator.Angular.Generator", UseSameVersion = true)] 4 | -------------------------------------------------------------------------------- /Csharp/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly: GenerateWith("KY.Generator.Csharp.Generator", UseSameVersion = true)] 4 | -------------------------------------------------------------------------------- /Json.Tests/Resources/simple.json: -------------------------------------------------------------------------------- 1 | { 2 | "stringProperty": "Test", 3 | "numberProperty": 123, 4 | "booleanProperty": true 5 | } -------------------------------------------------------------------------------- /OData/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly: GenerateWith("KY.Generator.OData.Generator", UseSameVersion = true)] 4 | -------------------------------------------------------------------------------- /OpenApi/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly: GenerateWith("KY.Generator.OpenApi.Generator", UseSameVersion = true)] 4 | -------------------------------------------------------------------------------- /Sqlite/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly: GenerateWith("KY.Generator.Sqlite.Generator", UseSameVersion = true)] 4 | -------------------------------------------------------------------------------- /Tests/AnnotationAsyncAssembly/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly:GenerateAsync] 4 | [assembly:GenerateNoHeader] 5 | -------------------------------------------------------------------------------- /Tests/AnnotationsWithMultipleOutputs/Output/First/index.ts: -------------------------------------------------------------------------------- 1 | 2 | export * from "./first-type"; 3 | export * from "./sub-type"; 4 | 5 | -------------------------------------------------------------------------------- /Tests/AnnotationsWithMultipleOutputs/Output/Second/index.ts: -------------------------------------------------------------------------------- 1 | 2 | export * from "./second-type"; 3 | export * from "./sub-type"; 4 | 5 | -------------------------------------------------------------------------------- /Tests/Derive/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly:GenerateNoHeader] 4 | [assembly:GenerateModelOutput("Output")] 5 | -------------------------------------------------------------------------------- /Tests/Formatting/Formatting/Interface.cs: -------------------------------------------------------------------------------- 1 | namespace Formatting 2 | { 3 | public interface Interface 4 | { 5 | 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/src/app/rename/models/index.ts: -------------------------------------------------------------------------------- 1 | 2 | export * from "./data"; 3 | export * from "./rename-model"; 4 | 5 | -------------------------------------------------------------------------------- /Tests/WebApiController/Models/DummyData.cs: -------------------------------------------------------------------------------- 1 | namespace WebApiController.Models 2 | { 3 | public class DummyData 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /Tests/WebApiFluent/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KY-Programming/generator/HEAD/Tests/WebApiFluent/wwwroot/favicon.ico -------------------------------------------------------------------------------- /AspDotNet/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly: GenerateWith("KY.Generator.AspDotNet.Generator", UseSameVersion = true)] 4 | -------------------------------------------------------------------------------- /Common.Generator/Templates/Base/ICodeFragment.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Templates 2 | { 3 | public interface ICodeFragment 4 | { } 5 | } -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ModelFromAssembly/Output/index.ts: -------------------------------------------------------------------------------- 1 | 2 | export * from "./another-type"; 3 | export * from "./type-to-read"; 4 | 5 | -------------------------------------------------------------------------------- /Reflection.Tests/Results/first.interface.ts.result: -------------------------------------------------------------------------------- 1 | // tslint:disable 2 | 3 | export interface IFirst { 4 | firstProperty: string; 5 | } -------------------------------------------------------------------------------- /Reflection.Tests/Results/second.interface.ts.result: -------------------------------------------------------------------------------- 1 | // tslint:disable 2 | 3 | export interface ISecond { 4 | secondProperty: string; 5 | } -------------------------------------------------------------------------------- /Reflection.Tests/Results/third.interface.ts.result: -------------------------------------------------------------------------------- 1 | // tslint:disable 2 | 3 | export interface IThird { 4 | thirdProperty: string; 5 | } -------------------------------------------------------------------------------- /Tests/Formatting/Formatting/IInterface.cs: -------------------------------------------------------------------------------- 1 | namespace Formatting 2 | { 3 | public interface IInterface 4 | { 5 | 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Tests/Generator/Resources/old-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "Language": "Csharp", 3 | "Generator": { 4 | "Client": { 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Tests/Net10/Net10/Program.cs: -------------------------------------------------------------------------------- 1 | // See https://aka.ms/new-console-template for more information 2 | 3 | Console.WriteLine("Hello, World!"); 4 | -------------------------------------------------------------------------------- /Tests/SignalR/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using SignalR 2 | @namespace SignalR.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers -------------------------------------------------------------------------------- /Tests/WebApiController/Models/RenameDto.cs: -------------------------------------------------------------------------------- 1 | namespace WebApiController.Models 2 | { 3 | public class RenameDto 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Common.Generator/Client/GeneratorClient.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Client 2 | { 3 | public class GeneratorClient 4 | { 5 | 6 | } 7 | } -------------------------------------------------------------------------------- /Examples/Angular/Annotation/Strict/ClientApp/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/Strict/ClientApp/src/styles.scss: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /Reflection/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly: GenerateWith("KY.Generator.Reflection.Generator", UseSameVersion = true)] 4 | -------------------------------------------------------------------------------- /Sqlite.Generator/Parsers/ISqliteStatement.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Sqlite.Parsers 2 | { 3 | public interface ISqliteStatement 4 | { } 5 | } -------------------------------------------------------------------------------- /Tests/UrlVersionedWebApiController/ClientApp/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /Tests/WebApiController/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KY-Programming/generator/HEAD/Tests/WebApiController/wwwroot/favicon.ico -------------------------------------------------------------------------------- /TypeScript.Generator/Transfer/IIndexLine.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.TypeScript.Transfer 2 | { 3 | public interface IIndexLine 4 | { } 5 | } -------------------------------------------------------------------------------- /TypeScript/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly: GenerateWith("KY.Generator.TypeScript.Generator", UseSameVersion = true)] 4 | -------------------------------------------------------------------------------- /Common.Generator/Transfer/ITransferObject.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Transfer 2 | { 3 | public interface ITransferObject 4 | { 5 | 6 | } 7 | } -------------------------------------------------------------------------------- /Examples/Angular/Annotation/Strict/ClientApp/src/app/models/index.ts: -------------------------------------------------------------------------------- 1 | 2 | export * from "./sub-type"; 3 | export * from "./weather-forecast"; 4 | 5 | -------------------------------------------------------------------------------- /Examples/Json/JsonWithReader/Source/simple.json: -------------------------------------------------------------------------------- 1 | { 2 | "stringProperty": "Test", 3 | "numberProperty": 123, 4 | "booleanProperty": true 5 | } -------------------------------------------------------------------------------- /Reflection.Tests/Results/inner-custom-type.ts.result: -------------------------------------------------------------------------------- 1 | // tslint:disable 2 | 3 | export class InnerCustomType { 4 | public customValue1: number; 5 | } -------------------------------------------------------------------------------- /Tests/Caseing.Generator/Output/index.ts: -------------------------------------------------------------------------------- 1 | 2 | export * from "./case-me"; 3 | export * from "./keep-my-case"; 4 | export * from "./mixed-caseing"; 5 | 6 | -------------------------------------------------------------------------------- /Tests/Generator/Resources/one-generate.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "generate": { 4 | "write": "1", 5 | "property1": "Test1" 6 | } 7 | } -------------------------------------------------------------------------------- /Common.Generator/Fluent/IGeneratorRunSyntax.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator; 2 | 3 | public interface IGeneratorRunSyntax 4 | { 5 | Task Run(); 6 | } 7 | -------------------------------------------------------------------------------- /EntityFramework/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly: GenerateWith("KY.Generator.EntityFramework.Generator", UseSameVersion = true)] 4 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ChangeReturnType/ClientApp/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/Strict/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using Strict 2 | @namespace Strict.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers -------------------------------------------------------------------------------- /Tests/Fluent/Fluent/SubType.cs: -------------------------------------------------------------------------------- 1 | namespace Types 2 | { 3 | public class SubType 4 | { 5 | public string Property { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/src/app/date/services/index.ts: -------------------------------------------------------------------------------- 1 | 2 | export * from "./date.service"; 3 | export * from "./optional-property.service"; 4 | 5 | -------------------------------------------------------------------------------- /Tests/WebApiFluent/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using WebApiFluent 2 | @namespace WebApiFluent.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers -------------------------------------------------------------------------------- /Common.Generator/Command/IPrepareCommand.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Command; 2 | 3 | public interface IPrepareCommand : IGeneratorCommand 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /Common.Generator/Transfer/Readers/ITransferReader.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Transfer.Readers 2 | { 3 | public interface ITransferReader 4 | { } 5 | } 6 | -------------------------------------------------------------------------------- /Common.Generator/Transfer/Writers/ITransferWriter.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Transfer.Writers 2 | { 3 | public interface ITransferWriter 4 | { } 5 | } 6 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ServiceFromAspNetCore/ClientApp/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ChangeReturnType/Assembly/ClientApp/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ServiceFromAspNetCore/Service/ClientApp/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ServiceFromSignalR/Service/ClientApp/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/WithCustomHttpClient/Service/ClientApp/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /Examples/AspDotNet/WebApi/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="KY.Generator.Examples.AspDotNet.WebApiApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /Examples/Reflection/ReflectionFromExecutable/Program.cs: -------------------------------------------------------------------------------- 1 | // See https://aka.ms/new-console-template for more information 2 | 3 | Console.WriteLine("Hello, World!"); -------------------------------------------------------------------------------- /Tests/Formatting/Formatting/TabTest.cs: -------------------------------------------------------------------------------- 1 | namespace Formatting 2 | { 3 | public class TabTest 4 | { 5 | public string Property { get; } 6 | } 7 | } -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/src/app/fix-casing/models/index.ts: -------------------------------------------------------------------------------- 1 | 2 | export * from "./casing-model"; 3 | export * from "./casing-with-mapping-model"; 4 | 5 | -------------------------------------------------------------------------------- /AspDotNet.Tests/more-tests.md: -------------------------------------------------------------------------------- 1 | More ASP.NET tests are found in [KY.Generator.Angular.Tests](https://github.com/KY-Programming/generator/tree/master/Angular.Tests) 2 | -------------------------------------------------------------------------------- /Common.Generator/Licensing/MessageType.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Licensing; 2 | 3 | public enum MessageType 4 | { 5 | Info, 6 | Warning, 7 | Error 8 | } -------------------------------------------------------------------------------- /Common.Generator/Templates/Executing/BlankLineTemplate.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Templates 2 | { 3 | public class BlankLineTemplate : ICodeFragment 4 | { } 5 | } -------------------------------------------------------------------------------- /Examples/Angular/Annotation/Strict/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KY-Programming/generator/HEAD/Examples/Angular/Annotation/Strict/wwwroot/favicon.ico -------------------------------------------------------------------------------- /Examples/Angular/build.cmd: -------------------------------------------------------------------------------- 1 | @title KY-Generator Examples Angular 2 | 3 | cd Annotation 4 | call build.cmd 5 | cd ../ 6 | 7 | cd Fluent 8 | call build.cmd 9 | cd ../ -------------------------------------------------------------------------------- /Tests/UrlVersionedWebApiController/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KY-Programming/generator/HEAD/Tests/UrlVersionedWebApiController/wwwroot/favicon.ico -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/src/app/convert-to-interface/models/index.ts: -------------------------------------------------------------------------------- 1 | 2 | export * from "./convert-me"; 3 | export * from "./convert-me-optional"; 4 | 5 | -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/src/app/get-complex/models/index.ts: -------------------------------------------------------------------------------- 1 | 2 | export * from "./get-complex-model"; 3 | export * from "./get-complex-model-service"; 4 | 5 | -------------------------------------------------------------------------------- /Common/Models/CaseMode.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Models 2 | { 3 | public enum CaseMode 4 | { 5 | Fix, 6 | AspDotNetCompatible 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ServiceFromAspNetCoreSignalRHub/ClientApp/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /Reflection.Tests/Results/generic-type.ts.result: -------------------------------------------------------------------------------- 1 | // tslint:disable 2 | 3 | export class GenericType { 4 | public value1: number; 5 | public genericValue: T; 6 | } -------------------------------------------------------------------------------- /Tests/WebApiController/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using WebApiController 2 | @namespace WebApiController.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /Common.Generator/Transfer/ControllerTransferObject.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Transfer 2 | { 3 | public class ControllerTransferObject : TypeTransferObject 4 | { } 5 | } -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ServiceFromSignalR/Service/ClientApp/src/app/models/index.ts: -------------------------------------------------------------------------------- 1 | 2 | export * from "./connection-status"; 3 | export * from "./weather-forecast"; 4 | 5 | -------------------------------------------------------------------------------- /Examples/AspDotNet/WebApi.Attributes/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="KY.Generator.Examples.AspDotNet.WebApiApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /Examples/AspDotNet/WebApi.Core/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Warning" 5 | } 6 | }, 7 | "AllowedHosts": "*" 8 | } 9 | -------------------------------------------------------------------------------- /Tests/Fluent/Fluent/IGenericInterface.cs: -------------------------------------------------------------------------------- 1 | namespace Types 2 | { 3 | public interface IGenericInterface 4 | { 5 | public T Property { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /Tsql.Fluent/ITsqlReadSyntax.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator; 2 | 3 | public interface ITsqlReadSyntax 4 | { 5 | ITsqlReadSyntax FromTable(string schema, string table); 6 | } 7 | -------------------------------------------------------------------------------- /Angular/Models/IncrementVersion.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator; 2 | 3 | public enum IncrementVersion 4 | { 5 | None, 6 | Major, 7 | Minor, 8 | Patch 9 | } 10 | -------------------------------------------------------------------------------- /Common.Fluent/Syntax/IWriteFluentSyntaxInternal.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator; 2 | 3 | public interface IWriteFluentSyntaxInternal : IWriteFluentSyntax, IFluentInternalSyntax 4 | { } 5 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ChangeReturnType/SpecialWeatherForecast.cs: -------------------------------------------------------------------------------- 1 | namespace ChangeReturnType; 2 | 3 | public class SpecialWeatherForecast : WeatherForecast 4 | { 5 | 6 | } -------------------------------------------------------------------------------- /Examples/Angular/Annotation/Strict/ClientApp/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KY-Programming/generator/HEAD/Examples/Angular/Annotation/Strict/ClientApp/src/favicon.ico -------------------------------------------------------------------------------- /Reflection.Tests/Data/IFirst.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Reflection.Tests 2 | { 3 | public interface IFirst 4 | { 5 | string FirstProperty { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /Reflection.Tests/Data/IThird.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Reflection.Tests 2 | { 3 | public interface IThird 4 | { 5 | string ThirdProperty { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /Tests/Generator/Resources/one-generate-in-array.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "generate": [ 4 | { 5 | "write": "1", 6 | "property1": "Test1" 7 | } 8 | ] 9 | } -------------------------------------------------------------------------------- /Tests/v10/CustomBuildOutputLocation/Class1.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | namespace CustomBuildOutputLocation; 4 | 5 | [GenerateAngularModel] 6 | public class Class1 7 | { } 8 | -------------------------------------------------------------------------------- /Common/Models/OutputLanguage.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator 2 | { 3 | public enum OutputLanguage 4 | { 5 | Inherit, 6 | Csharp, 7 | TypeScript 8 | } 9 | } -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ChangeReturnType/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using ChangeReturnType 2 | @namespace ChangeReturnType.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ChangeReturnType/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KY-Programming/generator/HEAD/Examples/Angular/Annotation/ChangeReturnType/wwwroot/favicon.ico -------------------------------------------------------------------------------- /Examples/AspDotNet/WebApi.Attributes.Core/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Warning" 5 | } 6 | }, 7 | "AllowedHosts": "*" 8 | } 9 | -------------------------------------------------------------------------------- /Reflection.Tests/Data/ISecond.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Reflection.Tests 2 | { 3 | public interface ISecond 4 | { 5 | string SecondProperty { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /Reflection.Tests/Data/OneProperty.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Reflection.Tests 2 | { 3 | internal class OneProperty 4 | { 5 | public string Prop1 { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /Tests/Fluent/Fluent/TypeWithInterface.cs: -------------------------------------------------------------------------------- 1 | namespace Types 2 | { 3 | public class TypeWithInterface : IInterface 4 | { 5 | public string Property { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /Tests/Formatting/Formatting/TwoWhitespaceTest.cs: -------------------------------------------------------------------------------- 1 | namespace Formatting 2 | { 3 | public class TwoWhitespaceTest 4 | { 5 | public string Property { get; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Tests/WebApiController/Models/PostModel.cs: -------------------------------------------------------------------------------- 1 | namespace WebApiController.Models 2 | { 3 | public class PostModel 4 | { 5 | public string Value { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /Common.Generator/Assemblies/Loaders/IAssemblyLoader.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator; 2 | 3 | public interface IAssemblyLoader 4 | { 5 | AssemblyLocation? Load(AssemblyLocateInfo info); 6 | } 7 | -------------------------------------------------------------------------------- /EntityFramework/Fluent/FluentStoredProcedureAction.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator; 2 | 3 | public enum FluentStoredProcedureAction 4 | { 5 | Insert, 6 | Delete, 7 | Update 8 | } 9 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ChangeReturnType/Assembly/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using ChangeReturnType 2 | @namespace ChangeReturnType.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers -------------------------------------------------------------------------------- /Examples/Reflection/ReflectionReturnTypeAttribute/SubType.cs: -------------------------------------------------------------------------------- 1 | namespace ReflectionReturnTypeAttribute; 2 | 3 | public class SubType 4 | { 5 | public string StringProperty { get; set; } 6 | } -------------------------------------------------------------------------------- /Json/Fluent/IJsonReadSyntax.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator 2 | { 3 | public interface IJsonReadSyntax 4 | { 5 | IJsonReadSyntax FromFile(string relativePath); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Tests/AnnotationInNestedClass/Output/class-2.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class Class2 { 5 | } 6 | 7 | // outputid:8a7b8713-4f4f-4960-99ff-a4d8232036e0 8 | -------------------------------------------------------------------------------- /Tests/Fluent/Fluent/Fluent.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Tests/Fluent/Fluent/TypeWithIgnoredBase.cs: -------------------------------------------------------------------------------- 1 | namespace Types 2 | { 3 | public class TypeWithIgnoredBase : IgnoreMe 4 | { 5 | public string Property { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /Tests/SignalR/ClientApp/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /Common.Generator/Assemblies/Locators/IAssemblyLocator.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator; 2 | 3 | public interface IAssemblyLocator 4 | { 5 | AssemblyLocation? Locate(AssemblyLocateInfo info); 6 | } 7 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ModelFromAssembly/IgnoredType.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | namespace ModelFromAssembly 4 | { 5 | [GenerateIgnore] 6 | public class IgnoredType 7 | { } 8 | } -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ServiceFromAspNetCore/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KY-Programming/generator/HEAD/Examples/Angular/Annotation/ServiceFromAspNetCore/wwwroot/favicon.ico -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ChangeReturnType/Assembly/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KY-Programming/generator/HEAD/Examples/Angular/Fluent/ChangeReturnType/Assembly/wwwroot/favicon.ico -------------------------------------------------------------------------------- /Examples/Reflection/ReflectionFromIndex/IgnoredType.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | namespace ReflectionFromIndex 4 | { 5 | [GenerateIgnore] 6 | public class IgnoredType 7 | { } 8 | } -------------------------------------------------------------------------------- /Reflection.Tests/Data/InnerCustomType.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Reflection.Tests 2 | { 3 | public class InnerCustomType 4 | { 5 | public int CustomValue1 { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /Tests/Caseing/Caseing.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/src/app/keep-casing/keep-casing.component.html: -------------------------------------------------------------------------------- 1 |
Loading...
2 |
Works
3 |
{{model | json}}
-------------------------------------------------------------------------------- /Tests/WebApiController/Models/ConvertMe.cs: -------------------------------------------------------------------------------- 1 | namespace WebApiController.Models 2 | { 3 | public class ConvertMe 4 | { 5 | public string StringProperty { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Tests/WebApiController/Services/DummyService.cs: -------------------------------------------------------------------------------- 1 | namespace WebApiController.Services 2 | { 3 | public class DummyService 4 | { 5 | public void Action() 6 | { } 7 | } 8 | } -------------------------------------------------------------------------------- /Tests/WebApiFluent/ClientApp/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /Tests/v10/StrictAnnotationsNullableDisabled/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly:GenerateNoHeader] 4 | [assembly:GenerateModelOutput("Output")] 5 | [assembly:GenerateNoIndex] 6 | -------------------------------------------------------------------------------- /Tests/v10/StrictAnnotationsNullableEnabled/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly:GenerateNoHeader] 4 | [assembly:GenerateModelOutput("Output")] 5 | [assembly:GenerateNoIndex] 6 | -------------------------------------------------------------------------------- /Common.Generator/Licensing/Message.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Licensing; 2 | 3 | public class Message 4 | { 5 | public MessageType Type { get; set; } 6 | public string Text { get; set; } 7 | } -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ServiceFromSignalR/Service/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KY-Programming/generator/HEAD/Examples/Angular/Fluent/ServiceFromSignalR/Service/wwwroot/favicon.ico -------------------------------------------------------------------------------- /Reflection.Tests/Data/BasedOnCustomGenericString.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Reflection.Tests 2 | { 3 | public class BasedOnCustomGenericString : CustomGeneric 4 | { 5 | 6 | } 7 | } -------------------------------------------------------------------------------- /Reflection.Tests/Data/BasedOnCustomGenericSubtype.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Reflection.Tests 2 | { 3 | public class BasedOnCustomGenericSubtype : CustomGeneric 4 | { 5 | 6 | } 7 | } -------------------------------------------------------------------------------- /Reflection.Tests/Data/RecursiveType.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Reflection.Tests 2 | { 3 | internal class RecursiveType 4 | { 5 | public RecursiveType Parent { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /Tests/Caseing/CaseMe.cs: -------------------------------------------------------------------------------- 1 | namespace Caseing 2 | { 3 | public class CaseMe 4 | { 5 | public string StringProperty { get; set; } 6 | public string S1 { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Tests/UrlVersionedWebApiController/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using UrlVersionedWebApiController 2 | @namespace UrlVersionedWebApiController.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/src/app/convert-to-interface/services/index.ts: -------------------------------------------------------------------------------- 1 | 2 | export * from "./convert-to-interface.service"; 3 | export * from "./convert-to-interface-optional.service"; 4 | 5 | -------------------------------------------------------------------------------- /TypeScript.Fluent/ITypeScriptSyntax.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator; 2 | 3 | public interface ITypeScriptSyntax : IFluentSyntax 4 | { 5 | void Strict(bool value = true); 6 | void NoIndex(); 7 | } 8 | -------------------------------------------------------------------------------- /Common.Fluent/Syntax/IReadFluentSyntaxInternal.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator; 2 | 3 | public interface IReadFluentSyntaxInternal : IReadFluentSyntax, IFluentInternalSyntax, ISwitchToWriteFluentSyntax 4 | { } 5 | -------------------------------------------------------------------------------- /Common.Generator/Output/IOutputAction.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Output 2 | { 3 | public interface IOutputAction 4 | { 5 | string FilePath { get; } 6 | void Execute(); 7 | } 8 | } -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ServiceFromAspNetCore/Service/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KY-Programming/generator/HEAD/Examples/Angular/Fluent/ServiceFromAspNetCore/Service/wwwroot/favicon.ico -------------------------------------------------------------------------------- /Examples/Angular/Fluent/WithCustomHttpClient/Service/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KY-Programming/generator/HEAD/Examples/Angular/Fluent/WithCustomHttpClient/Service/wwwroot/favicon.ico -------------------------------------------------------------------------------- /Examples/Reflection/ReflectionReturnTypeAttribute/OtherSubType.cs: -------------------------------------------------------------------------------- 1 | namespace ReflectionReturnTypeAttribute; 2 | 3 | public class OtherSubType 4 | { 5 | public string OtherStringProperty { get; set; } 6 | } -------------------------------------------------------------------------------- /Tests/AnnotationsWithMultipleOutputs/SubType.cs: -------------------------------------------------------------------------------- 1 | namespace AnnotationsWithMultipleOutputs 2 | { 3 | public class SubType 4 | { 5 | public string StringProperty { get; set; } 6 | 7 | } 8 | } -------------------------------------------------------------------------------- /Tests/Fluent/Fluent/TypeWithIgnoreInterface.cs: -------------------------------------------------------------------------------- 1 | namespace Types 2 | { 3 | public class TypeWithIgnoreInterface : IIgnoreMe 4 | { 5 | public string IgnoredProperty { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /Tests/Generator/Models/Read1Configuration.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Tests.Models 2 | { 3 | internal class Read1Configuration 4 | { 5 | public string Property1 { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Tests/Generator/Models/Read2Configuration.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Tests.Models 2 | { 3 | internal class Read2Configuration 4 | { 5 | public string Property2 { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Tests/Net5/Output/sub-type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class SubType { 5 | public property?: string; 6 | } 7 | 8 | // outputid:f489d528-1077-4d58-83a4-45c2926a2206 9 | -------------------------------------------------------------------------------- /Tests/Net6/Output/sub-type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class SubType { 5 | public property?: string; 6 | } 7 | 8 | // outputid:0aacfb49-66dd-4b19-94db-18e7cc1628c0 9 | -------------------------------------------------------------------------------- /Tests/Net7/Output/sub-type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class SubType { 5 | public property?: string; 6 | } 7 | 8 | // outputid:6efc183e-a677-4cf2-bd36-b22c0bb466ce 9 | -------------------------------------------------------------------------------- /Tests/Net8/Output/sub-type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class SubType { 5 | public property: string; 6 | } 7 | 8 | // outputid:8d02ce37-8013-4a57-a40d-4a10c8c65de2 9 | -------------------------------------------------------------------------------- /Tests/Net9/Output/sub-type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class SubType { 5 | public property: string; 6 | } 7 | 8 | // outputid:9c33e37c-3a6c-404f-8fab-dae790c04a8c 9 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/WithCustomHttpClient/Service/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using WithCustomHttpClient 2 | @namespace WithCustomHttpClient.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /Reflection.Tests/Data/IInheritFirst.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Reflection.Tests 2 | { 3 | public interface IInheritFirst : IFirst 4 | { 5 | string FirstInheritedProperty { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /Reflection.Tests/Data/OneInterfaceType.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Reflection.Tests 2 | { 3 | public class OneInterfaceType : IFirst 4 | { 5 | public string FirstProperty { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /Tests/Formatting/Formatting/Formatting.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Tests/Formatting/Generator/Output/WithoutPrefix/interface.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export interface Interface { 5 | } 6 | 7 | // outputid:95ca21b8-f1ff-4cc7-b96e-63d5a90970c3 8 | -------------------------------------------------------------------------------- /Tests/Generator/Models/Write1Configuration.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Tests.Models 2 | { 3 | internal class Write1Configuration 4 | { 5 | public string Property1 { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Tests/Generator/Models/Write2Configuration.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Tests.Models 2 | { 3 | internal class Write2Configuration 4 | { 5 | public string Property2 { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Tests/UrlVersionedWebApiController/ClientApp/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /TypeScript.Generator/Templates/ForceNullTemplate.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator.Templates; 2 | 3 | namespace KY.Generator.TypeScript.Templates 4 | { 5 | public class ForceNullTemplate : NullTemplate 6 | { } 7 | } -------------------------------------------------------------------------------- /AspDotNet.Generator/Writers/AspDotNetODataControllerWriter.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.AspDotNet.Writers 2 | { 3 | public class AspDotNetODataControllerWriter 4 | { 5 | // TODO: Implement 6 | } 7 | } -------------------------------------------------------------------------------- /CLI/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Common.Generator/Configurations/ExecuteConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Configurations 2 | { 3 | public class ExecuteConfiguration 4 | { 5 | public string File { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Common.Generator/Mappings/ITypeMappingTypeSyntax.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Mappings 2 | { 3 | public interface ITypeMappingTypeSyntax 4 | { 5 | ITypeMappingFromSyntax From(string type); 6 | } 7 | } -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ServiceFromAspNetCoreSignalRHub/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KY-Programming/generator/HEAD/Examples/Angular/Annotation/ServiceFromAspNetCoreSignalRHub/wwwroot/favicon.ico -------------------------------------------------------------------------------- /Json.Generator/Transfers/JsonModelTransferObject.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator.Transfer; 2 | 3 | namespace KY.Generator.Json.Transfers 4 | { 5 | public class JsonModelTransferObject : ModelTransferObject 6 | { } 7 | } -------------------------------------------------------------------------------- /Reflection.Tests/Data/BasedOnStringList.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace KY.Generator.Reflection.Tests 4 | { 5 | public class BasedOnStringList : List 6 | { 7 | 8 | } 9 | } -------------------------------------------------------------------------------- /Reflection.Tests/Data/BasedOnSubtypeList.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace KY.Generator.Reflection.Tests 4 | { 5 | public class BasedOnSubtypeList : List 6 | { 7 | 8 | } 9 | } -------------------------------------------------------------------------------- /Tests/AnnotationAsync/Output/sub-type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class SubType { 5 | public property: string; 6 | } 7 | 8 | // outputid:84eb1514-1fc9-499f-924d-4a93a076f40a 9 | -------------------------------------------------------------------------------- /Tests/Caseing/KeepMyCase.cs: -------------------------------------------------------------------------------- 1 | namespace Caseing 2 | { 3 | public class KeepMyCase 4 | { 5 | public string StringProperty { get; set; } 6 | public int Number_Property { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Tests/Fluent/Fluent/TypeWithGenericIgnoredBase.cs: -------------------------------------------------------------------------------- 1 | namespace Types 2 | { 3 | public class TypeWithGenericIgnoredBase : IgnoreMe 4 | { 5 | public string Property { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Tests/Formatting/Generator/Output/WithPrefix/interface.interface.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export interface IInterface { 5 | } 6 | 7 | // outputid:95ca21b8-f1ff-4cc7-b96e-63d5a90970c3 8 | -------------------------------------------------------------------------------- /Tests/v10/CustomBuildOutputLocation/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly:GenerateNoHeader] 4 | [assembly:GenerateModelOutput("Output")] 5 | [assembly:GenerateStrict] 6 | [assembly:GenerateNoIndex] 7 | -------------------------------------------------------------------------------- /Common.Fluent/Syntax/IExecutableSyntax.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator.Command; 2 | 3 | namespace KY.Generator; 4 | 5 | public interface IExecutableSyntax 6 | { 7 | List Commands { get; } 8 | } 9 | -------------------------------------------------------------------------------- /Common.Generator/Client/GeneratorClientConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Client 2 | { 3 | internal class GeneratorClientConfiguration 4 | { 5 | public string Connection { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ChangeReturnType/ClientApp/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /Examples/Reflection/ReflectionFromIndex/AnotherType.cs: -------------------------------------------------------------------------------- 1 | namespace ReflectionFromIndex 2 | { 3 | public class AnotherType 4 | { 5 | public string StringField; 6 | public int NumberField; 7 | } 8 | } -------------------------------------------------------------------------------- /Main.Legacy/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Reflection.Tests/Data/ExportedPrimitiveType.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Reflection.Tests 2 | { 3 | public class ExportedPrimitiveType 4 | { 5 | public GenericType Value { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /Reflection.Tests/Data/OnePropertyWithCustomType.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Reflection.Tests 2 | { 3 | internal class OnePropertyWithCustomType 4 | { 5 | public OneProperty Prop2 { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /Tests/Caseing/MixedCaseing.cs: -------------------------------------------------------------------------------- 1 | namespace Caseing 2 | { 3 | public class MixedCaseing 4 | { 5 | public CaseMe CaseMe { get; set; } 6 | public KeepMyCase KeepMyCase { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Tests/Fluent/Fluent/TypeWithGenericInterface.cs: -------------------------------------------------------------------------------- 1 | namespace Types 2 | { 3 | public class TypeWithGenericInterface : IGenericInterface 4 | { 5 | public string Property { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Tests/Formatting/Generator/Output/WithoutPrefix/interface.interface.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export interface IInterface { 5 | } 6 | 7 | // outputid:95ca21b8-f1ff-4cc7-b96e-63d5a90970c3 8 | -------------------------------------------------------------------------------- /Tests/Generator/Resources/old-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Csharp 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /TypeScript.Generator/Transfer/UnknownIndexLine.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.TypeScript.Transfer 2 | { 3 | public class UnknownIndexLine : IIndexLine 4 | { 5 | public string Content { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ModelFromAssembly/AnotherType.cs: -------------------------------------------------------------------------------- 1 | namespace ModelFromAssembly 2 | { 3 | public class AnotherType 4 | { 5 | public string StringField; 6 | public int NumberField; 7 | } 8 | } -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ServiceFromAspNetCore/ClientApp/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ServiceFromAspNetCore/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using ServiceFromAspNetCoreAnnotation 2 | @namespace ServiceFromAspNetCoreAnnotation.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ChangeReturnType/Assembly/ClientApp/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/FromModel/Assembly/FromModel.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ServiceFromSignalR/Service/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using ServiceFromSignalRViaFluentApi 2 | @namespace ServiceFromSignalRViaFluentApi.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /Examples/Reflection/ReflectionFromMultipleAssemblies/SecondAssembly/SecondType.cs: -------------------------------------------------------------------------------- 1 | namespace SecondAssembly 2 | { 3 | public class SecondType 4 | { 5 | public string StringProperty { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /Json/Fluent/IJsonWriteModelOrReaderSyntax.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator 2 | { 3 | public interface IJsonWriteModelOrReaderSyntax : IJsonWriteModelSyntax 4 | { 5 | IJsonWriteModelSyntax WithoutReader(); 6 | } 7 | } -------------------------------------------------------------------------------- /Json/Fluent/IJsonWriteSyntax.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator 2 | { 3 | public interface IJsonWriteSyntax 4 | { 5 | IJsonWriteModelOrReaderSyntax Model(string relativePath, string name, string nameSpace); 6 | } 7 | } -------------------------------------------------------------------------------- /Reflection.Tests/Results/exported-primitive-type.ts.result: -------------------------------------------------------------------------------- 1 | // tslint:disable 2 | 3 | import { GenericType } from "./generic-type"; 4 | 5 | export class ExportedPrimitiveType { 6 | public value: GenericType; 7 | } -------------------------------------------------------------------------------- /Reflection.Tests/Results/one-interface-type.ts.result: -------------------------------------------------------------------------------- 1 | // tslint:disable 2 | 3 | import { IFirst } from "./first.interface"; 4 | 5 | export class OneInterfaceType implements IFirst { 6 | public firstProperty: string; 7 | } -------------------------------------------------------------------------------- /Tests/Fluent/Fluent/TypeWithIgnoreGenericInterface.cs: -------------------------------------------------------------------------------- 1 | namespace Types 2 | { 3 | public class TypeWithIgnoreGenericInterface : IIgnoreMe 4 | { 5 | public string IgnoredProperty { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /Tests/Generator/Resources/one-generate-in-array-array.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "generate": [ 4 | [ 5 | { 6 | "write": "1", 7 | "property1": "Test1" 8 | } 9 | ] 10 | ] 11 | } -------------------------------------------------------------------------------- /Tests/v10/EnumAnnotationsNullableDisabled/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly:GenerateNoHeader] 4 | [assembly:GenerateModelOutput("Output")] 5 | [assembly:GenerateStrict] 6 | [assembly:GenerateNoIndex] 7 | -------------------------------------------------------------------------------- /Common.Generator/Client/GeneratorConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Client 2 | { 3 | internal class GeneratorConfiguration 4 | { 5 | public GeneratorClientConfiguration Client { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ServiceFromAspNetCore/Service/ClientApp/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ServiceFromSignalR/Service/ClientApp/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/WithCustomHttpClient/Service/ClientApp/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /Examples/AspDotNet/WebApi/Models/Value.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Examples.AspDotNet.Models 2 | { 3 | public class Value 4 | { 5 | public int Id { get; set; } 6 | public string Text { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Reflection.Tests/Results/inherit-first.interface.ts.result: -------------------------------------------------------------------------------- 1 | // tslint:disable 2 | 3 | import { IFirst } from "./first.interface"; 4 | 5 | export interface IInheritFirst extends IFirst { 6 | firstInheritedProperty: string; 7 | } -------------------------------------------------------------------------------- /Tests/AnnotationAsync/Output/not-async-type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class NotAsyncType { 5 | public stringProperty: string; 6 | } 7 | 8 | // outputid:84eb1514-1fc9-499f-924d-4a93a076f40a 9 | -------------------------------------------------------------------------------- /Tests/AnnotationAsyncAssembly/Output/class-1.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class Class1 { 5 | public stringProperty?: string; 6 | } 7 | 8 | // outputid:01f469b8-5361-4a82-8512-fa7fefe14fc4 9 | -------------------------------------------------------------------------------- /Tests/AnnotationAsyncAssembly/Output/class-2.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class Class2 { 5 | public stringProperty?: string; 6 | } 7 | 8 | // outputid:01f469b8-5361-4a82-8512-fa7fefe14fc4 9 | -------------------------------------------------------------------------------- /Tests/Fluent/Fluent/IGenericInterfaceWithNonGenericBase.cs: -------------------------------------------------------------------------------- 1 | namespace Types 2 | { 3 | public interface IGenericInterfaceWithNonGenericBase : IInterface 4 | { 5 | public T GenericProperty { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /Tests/ReflectionLoadFromNugetPackageNet5/Output/class-1.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class Class1 { 5 | public test?: string; 6 | } 7 | 8 | // outputid:3d99e563-cf4b-42d2-aaca-9088f7a71b7e 9 | -------------------------------------------------------------------------------- /Tests/v10/InheritanceAnnotationsNullableDisabled/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly:GenerateNoHeader] 4 | [assembly:GenerateModelOutput("Output")] 5 | [assembly:GenerateStrict] 6 | [assembly:GenerateNoIndex] 7 | -------------------------------------------------------------------------------- /Tests/v10/TypesAnnotationsNullableEnabled/Output/sub-type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export interface SubType { 5 | property: string; 6 | } 7 | 8 | // outputid:f13dd313-1bd6-4a8e-9b3f-d6266d3a25ff 9 | -------------------------------------------------------------------------------- /CLI/FodyWeavers.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Common/Annotations/GenerateNoHeaderAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator; 2 | 3 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Assembly, Inherited = false)] 4 | public class GenerateNoHeaderAttribute : Attribute 5 | { } 6 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ServiceFromAspNetCoreSignalRHub/ClientApp/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ServiceFromAspNetCoreSignalRHub/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using ServiceFromAspNetCoreSignalRHub 2 | @namespace ServiceFromAspNetCoreSignalRHub.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/GenerateInterfacesInsteadClasses/Assembly/TestModel.cs: -------------------------------------------------------------------------------- 1 | namespace GenerateInterfacesInsteadClasses 2 | { 3 | public class TestModel 4 | { 5 | public string Property { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ServiceFromAspNetCore/Service/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using ServiceFromAspNetCoreViaFluentApi 2 | @namespace ServiceFromAspNetCoreViaFluentApi.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /Examples/AspDotNet/WebApi.Core/Models/Value.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Examples.AspDotNet.Models 2 | { 3 | public class Value 4 | { 5 | public int Id { get; set; } 6 | public string Text { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Json.Tests/Resources/Alllowerobject.cs.result: -------------------------------------------------------------------------------- 1 | // ReSharper disable All 2 | 3 | namespace KY.Generator.Examples.Json 4 | { 5 | public partial class Alllowerobject 6 | { 7 | public int Prop1 { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /Json.Tests/Resources/Allupperobject.cs.result: -------------------------------------------------------------------------------- 1 | // ReSharper disable All 2 | 3 | namespace KY.Generator.Examples.Json 4 | { 5 | public partial class Allupperobject 6 | { 7 | public int Prop1 { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /Reflection.Tests/Data/CustomGenericStringProperty.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Reflection.Tests 2 | { 3 | public class CustomGenericStringProperty 4 | { 5 | public CustomGeneric Property { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /Reflection.Tests/Data/OneField.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Reflection.Tests 2 | { 3 | internal class OneField 4 | { 5 | #pragma warning disable 649 6 | public string Field1; 7 | #pragma warning restore 649 8 | } 9 | } -------------------------------------------------------------------------------- /Tests/Derive/Output/base-interface.interface.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export interface IBaseInterface { 5 | stringProperty?: string; 6 | } 7 | 8 | // outputid:e818f5ca-e427-4c1c-baf2-38476bfa9665 9 | -------------------------------------------------------------------------------- /Tests/v10/SelfReferencingAnnotationsNullableEnabled/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly:GenerateNoHeader] 4 | [assembly:GenerateModelOutput("Output")] 5 | [assembly:GenerateStrict] 6 | [assembly:GenerateNoIndex] 7 | -------------------------------------------------------------------------------- /Tests/v10/TypesAnnotationsNullableDisabled/Output/sub-type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export interface SubType { 5 | property?: string; 6 | } 7 | 8 | // outputid:88210355-ddb5-4bf6-a426-81493e839d4e 9 | -------------------------------------------------------------------------------- /Common.Generator/Models/Visibility.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Models 2 | { 3 | public enum Visibility 4 | { 5 | None, 6 | Private, 7 | Protected, 8 | Internal, 9 | Public 10 | } 11 | } -------------------------------------------------------------------------------- /Examples/AspDotNet/WebApi.Core/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Json.Tests/Resources/ObjectProperty.cs.result: -------------------------------------------------------------------------------- 1 | // ReSharper disable All 2 | 3 | namespace KY.Generator.Examples.Json 4 | { 5 | public partial class ObjectProperty 6 | { 7 | public string Property { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /Reflection.Tests/Data/CustomGenericSubtypeProperty.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Reflection.Tests 2 | { 3 | public class CustomGenericSubtypeProperty 4 | { 5 | public CustomGeneric Property { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /Reflection.Tests/Data/GenericType.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Reflection.Tests 2 | { 3 | public class GenericType 4 | { 5 | public int Value1 { get; set; } 6 | 7 | public T GenericValue { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /Tests/Derive/Output/abstract-type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export abstract class AbstractType { 5 | public abstractStringProperty?: string; 6 | } 7 | 8 | // outputid:e818f5ca-e427-4c1c-baf2-38476bfa9665 9 | -------------------------------------------------------------------------------- /Tests/Fluent/Fluent.Generator/Output/Models/interface.interface.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export interface IInterface { 5 | property?: string; 6 | } 7 | 8 | // outputid:f32fd57a-e5ce-4ae5-97bc-bbca02f65904 9 | -------------------------------------------------------------------------------- /Tests/Fluent/Fluent/SelfReferencingType.cs: -------------------------------------------------------------------------------- 1 | namespace Types 2 | { 3 | public class SelfReferencingType 4 | { 5 | public string Property { get; set; } 6 | public SelfReferencingType Self { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Tests/SignalR/ClientApp/src/app/home/home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-home', 5 | templateUrl: './home.component.html', 6 | }) 7 | export class HomeComponent { 8 | } 9 | -------------------------------------------------------------------------------- /Common.Generator/Templates/Types/VoidTemplate.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Templates 2 | { 3 | public class VoidTemplate : TypeTemplate 4 | { 5 | public VoidTemplate() 6 | : base(string.Empty) 7 | { } 8 | } 9 | } -------------------------------------------------------------------------------- /Common/Annotations/IGeneratorCommandAdditionalParameterAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator; 2 | 3 | public interface IGeneratorCommandAdditionalParameterAttribute 4 | { 5 | IEnumerable Commands { get; } 6 | } 7 | -------------------------------------------------------------------------------- /Json.Tests/Resources/ObjectArrayProperty.cs.result: -------------------------------------------------------------------------------- 1 | // ReSharper disable All 2 | 3 | namespace KY.Generator.Examples.Json 4 | { 5 | public partial class ObjectArrayProperty 6 | { 7 | public string Text { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /Reflection.Tests/Data/CustomGeneric.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace KY.Generator.Reflection.Tests 6 | { 7 | public class CustomGeneric 8 | { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Reflection.Tests/Data/CustomTypeInList.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace KY.Generator.Reflection.Tests 4 | { 5 | public class CustomTypeInList 6 | { 7 | public List List { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /Tests/Fluent/Fluent/TypeWithGenericAndNotGenericInterface.cs: -------------------------------------------------------------------------------- 1 | namespace Types 2 | { 3 | public class TypeWithGenericAndNotGenericInterface : IInterface, IInterface 4 | { 5 | public string Property { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /Tests/WebApiFluent/ClientApp/src/app/home/home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-home', 5 | templateUrl: './home.component.html', 6 | }) 7 | export class HomeComponent { 8 | } 9 | -------------------------------------------------------------------------------- /Common.Fluent/Syntax/ISyntaxResolver.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator; 2 | 3 | public interface ISyntaxResolver 4 | { 5 | T Create(); 6 | void Register() where TInterface : IFluentSyntax where TSyntax : TInterface; 7 | } 8 | -------------------------------------------------------------------------------- /Common.Generator/Transfer/EntitySetTransferObject.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Transfer 2 | { 3 | public class EntitySetTransferObject : HttpServiceTransferObject 4 | { 5 | public EntityTransferObject Entity { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /Examples/Angular/Fluent/FromModel/Assembly/TypeToRead.cs: -------------------------------------------------------------------------------- 1 | namespace FromModel 2 | { 3 | public class TypeToRead 4 | { 5 | public string StringProperty { get; set; } 6 | public int NumberProperty { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Examples/AspDotNet/WebApi.Attributes.Core/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Examples/Reflection/ReflectionFromIndex/TypeToRead.cs: -------------------------------------------------------------------------------- 1 | namespace ReflectionFromIndex 2 | { 3 | public class TypeToRead 4 | { 5 | public string StringProperty { get; set; } 6 | public int NumberProperty { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/src/app/edge-cases/models/index.ts: -------------------------------------------------------------------------------- 1 | 2 | export * from "./date-model"; 3 | export * from "./exclusive-generic-complex-result"; 4 | export * from "./generic-result"; 5 | export * from "./self-referencing-model"; 6 | 7 | -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/src/app/home/home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-home', 5 | templateUrl: './home.component.html', 6 | }) 7 | export class HomeComponent { 8 | } 9 | -------------------------------------------------------------------------------- /Tests/WebApiFluent/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Common.Generator/Helpers/Codeable.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator 2 | { 3 | public abstract class Codeable 4 | { 5 | protected static Code Code = default; 6 | 7 | protected Codeable() 8 | { 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /Common.Generator/Mappings/ITypeMappingFromSyntax.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Mappings 2 | { 3 | public interface ITypeMappingFromSyntax 4 | { 5 | ITypeMappingTypeOrToDetailsSyntax To(string type, string constructor = null); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Common/Annotations/GenerateOnlySubTypesAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace KY.Generator 4 | { 5 | [AttributeUsage(AttributeTargets.Class, Inherited = false)] 6 | public class GenerateOnlySubTypesAttribute : Attribute 7 | { } 8 | } 9 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ModelFromAssembly/TypeToRead.cs: -------------------------------------------------------------------------------- 1 | namespace ModelFromAssembly 2 | { 3 | public class TypeToRead 4 | { 5 | public string StringProperty { get; set; } 6 | public int NumberProperty { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Reflection.Tests/Data/BaseClassAndOneInterfaceType.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Reflection.Tests 2 | { 3 | public class BaseClassAndOneInterfaceType : OneInterfaceType, ISecond 4 | { 5 | public string SecondProperty { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /Tests/Fluent/Fluent.Generator/Output/Models/generic-interface.interface.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export interface IGenericInterface { 5 | property?: T; 6 | } 7 | 8 | // outputid:f32fd57a-e5ce-4ae5-97bc-bbca02f65904 9 | -------------------------------------------------------------------------------- /Tests/Fluent/Fluent.Generator/Output/Models/interface-generic.interface.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export interface IInterfaceGeneric { 5 | property?: T; 6 | } 7 | 8 | // outputid:f32fd57a-e5ce-4ae5-97bc-bbca02f65904 9 | -------------------------------------------------------------------------------- /Tests/Sqlite/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Sqlite 4 | { 5 | class Program 6 | { 7 | static void Main(string[] args) 8 | { 9 | Console.WriteLine("Hello World!"); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Tests/WebApiController/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /TypeScript/Annotations/GenerateNoIndexAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace KY.Generator; 4 | 5 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Assembly, Inherited = false)] 6 | public class GenerateNoIndexAttribute : Attribute 7 | { } -------------------------------------------------------------------------------- /Common/Annotations/GenerateNoOptionalAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace KY.Generator; 4 | 5 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Assembly, Inherited = false)] 6 | public class GenerateNoOptionalAttribute : Attribute 7 | { } 8 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/GenerateInterfacesInsteadClasses/Generator/Output/test-model.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export interface TestModel { 5 | property?: string; 6 | } 7 | 8 | // outputid:068986b5-c7fe-4280-9442-8601b87f9114 9 | -------------------------------------------------------------------------------- /Examples/Reflection/ReflectionIgnoreAttribute/EnumToIgnore.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | namespace ReflectionIgnoreAttribute 4 | { 5 | [GenerateIgnore] 6 | public enum EnumToIgnore 7 | { 8 | None, 9 | Any 10 | } 11 | } -------------------------------------------------------------------------------- /Examples/Tsql/Tsql/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Tsql 4 | { 5 | class Program 6 | { 7 | static void Main(string[] args) 8 | { 9 | Console.WriteLine("Hello World!"); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Reflection.Tests/Data/CustomTypeInArray.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text; 3 | 4 | namespace KY.Generator.Reflection.Tests 5 | { 6 | public class CustomTypeInArray 7 | { 8 | public SubType[] Array { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Reflection.Tests/Data/ExportedType.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace KY.Generator.Reflection.Tests 4 | { 5 | public class ExportedType 6 | { 7 | public List> Listing { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /Sqlite/Annotations/GenerateAsNotNullAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace KY.Generator 4 | { 5 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] 6 | public class GenerateAsNotNullAttribute : Attribute 7 | { } 8 | } 9 | -------------------------------------------------------------------------------- /Tests/SignalR/ClientApp/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html' 6 | }) 7 | export class AppComponent { 8 | title = 'app'; 9 | } 10 | -------------------------------------------------------------------------------- /Tests/UrlVersionedWebApiController/ClientApp/src/app/home/home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-home', 5 | templateUrl: './home.component.html', 6 | }) 7 | export class HomeComponent { 8 | } 9 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/Strict/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/NpmPackage/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Json/Fluent/IJsonWriteModelSyntax.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator 2 | { 3 | public interface IJsonWriteModelSyntax 4 | { 5 | IJsonWriteModelOrReaderSyntax FieldsToProperties(); 6 | IJsonWriteModelOrReaderSyntax PropertiesToFields(); 7 | } 8 | } -------------------------------------------------------------------------------- /Sqlite.Fluent/ISqliteReadSyntax.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator; 2 | 3 | public interface ISqliteReadSyntax 4 | { 5 | ISqliteFromDatabaseOrReadSyntax UseConnectionString(string connectionString); 6 | ISqliteFromDatabaseOrReadSyntax UseFile(string file); 7 | } 8 | -------------------------------------------------------------------------------- /Sqlite/Annotations/GenerateAsPrimaryKeyAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace KY.Generator 4 | { 5 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] 6 | public class GenerateAsPrimaryKeyAttribute : Attribute 7 | { } 8 | } 9 | -------------------------------------------------------------------------------- /Tests/SignalR/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /Tests/UrlVersionedWebApiController/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/src/app/convert-to-interface/models/convert-me.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export interface ConvertMe { 5 | stringProperty?: string; 6 | } 7 | 8 | // outputid:627408ca-a818-4326-b843-415f5bbfb028 9 | -------------------------------------------------------------------------------- /Tests/WebApiFluent/ClientApp/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html' 6 | }) 7 | export class AppComponent { 8 | title = 'app'; 9 | } 10 | -------------------------------------------------------------------------------- /Tests/v10/TypesAnnotationsNullableDisabled/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly:GenerateNoHeader] 4 | [assembly:GenerateModelOutput("Output")] 5 | [assembly:GenerateStrict] 6 | [assembly:GenerateNoIndex] 7 | [assembly:GeneratePreferInterfaces] 8 | -------------------------------------------------------------------------------- /Tests/v10/TypesAnnotationsNullableEnabled/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | [assembly:GenerateNoHeader] 4 | [assembly:GenerateModelOutput("Output")] 5 | [assembly:GenerateStrict] 6 | [assembly:GenerateNoIndex] 7 | [assembly:GeneratePreferInterfaces] 8 | -------------------------------------------------------------------------------- /Tsql.Generator/Configurations/TsqlReadStoredProcedure.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Tsql.Configurations 2 | { 3 | public class TsqlReadStoredProcedure 4 | { 5 | public string Schema { get; set; } 6 | public string Name { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /TypeScript/Annotations/GenerateForceIndexAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace KY.Generator; 4 | 5 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Assembly, Inherited = false)] 6 | public class GenerateForceIndexAttribute : Attribute 7 | { 8 | } -------------------------------------------------------------------------------- /AspDotNet.Generator/Configurations/AspDotNetReadHubConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.AspDotNet.Configurations; 2 | 3 | public class AspDotNetReadHubConfiguration 4 | { 5 | public string Name { get; set; } 6 | public string Namespace { get; set; } 7 | } 8 | -------------------------------------------------------------------------------- /Common/Annotations/IGeneratorCommandAttribute.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace KY.Generator 4 | { 5 | public interface IGeneratorCommandAttribute 6 | { 7 | IEnumerable Commands { get; } 8 | } 9 | } -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ChangeReturnType/ClientApp/src/app/home/home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-home', 5 | templateUrl: './home.component.html', 6 | }) 7 | export class HomeComponent { 8 | } 9 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/GenerateInterfacesInsteadClasses/Assembly/GenerateInterfacesInsteadClasses.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Sqlite/Annotations/GenerateAsAutoIncrementAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace KY.Generator 4 | { 5 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] 6 | public class GenerateAsAutoIncrementAttribute : Attribute 7 | { } 8 | } 9 | -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html' 6 | }) 7 | export class AppComponent { 8 | title = 'app'; 9 | } 10 | -------------------------------------------------------------------------------- /Tests/WebApiFluent/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /Common.Generator/Mappings/ITypeMappingMapSyntax.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator.Languages; 2 | 3 | namespace KY.Generator.Mappings 4 | { 5 | public interface ITypeMappingMapSyntax 6 | { 7 | ITypeMappingTypeSyntax To() where T : ILanguage; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ChangeReturnType/ClientApp/src/app/models/custom-weather-forecast.ts: -------------------------------------------------------------------------------- 1 | import { WeatherForecast } from './weather-forecast'; 2 | 3 | export class CustomWeatherForecast extends WeatherForecast { 4 | public additionalProperty: string = ''; 5 | } 6 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ServiceFromAspNetCore/ClientApp/src/app/home/home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-home', 5 | templateUrl: './home.component.html', 6 | }) 7 | export class HomeComponent { 8 | } 9 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ChangeReturnType/Assembly/ClientApp/src/app/home/home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-home', 5 | templateUrl: './home.component.html', 6 | }) 7 | export class HomeComponent { 8 | } 9 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ChangeReturnType/Assembly/ClientApp/src/app/models/custom-weather-forecast.ts: -------------------------------------------------------------------------------- 1 | import { WeatherForecast } from './weather-forecast'; 2 | 3 | export class CustomWeatherForecast extends WeatherForecast { 4 | public additionalProperty: string; 5 | } 6 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ServiceFromSignalR/Service/ClientApp/src/app/home/home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-home', 5 | templateUrl: './home.component.html', 6 | }) 7 | export class HomeComponent { 8 | } 9 | -------------------------------------------------------------------------------- /Json.Generator/Configurations/JsonReadConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Json.Configurations 2 | { 3 | internal class JsonReadConfiguration 4 | { 5 | public string Source { get; set; } 6 | public string BasePath { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Reflection.Tests/Results/exported-type.ts.result: -------------------------------------------------------------------------------- 1 | // tslint:disable 2 | 3 | import { GenericType } from "./generic-type"; 4 | import { InnerCustomType } from "./inner-custom-type"; 5 | 6 | export class ExportedType { 7 | public listing: GenericType[]; 8 | } -------------------------------------------------------------------------------- /Tests/AnnotationAsync/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace AnnotationAsync 4 | { 5 | class Program 6 | { 7 | static void Main(string[] args) 8 | { 9 | Console.WriteLine("Hello World!"); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Tests/Generator/Resources/one-read-one-generate.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "generate": [ 4 | { 5 | "Read": "1", 6 | "Property1": "Test1" 7 | }, 8 | { 9 | "Write": "1", 10 | "Property1": "Test2" 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /Tests/Net10/Net10/Output/sub-type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class SubType { 5 | public property: string; 6 | } 7 | 8 | // outputid:3fe25a27-4f60-4718-8fb2-be47996315d8 9 | // outputid:9c33e37c-3a6c-404f-8fab-dae790c04a8c 10 | -------------------------------------------------------------------------------- /Tests/WebApiController/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /Tests/WebApiFluent/ClientApp/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "types": [] 6 | }, 7 | "exclude": [ 8 | "src/test.ts", 9 | "**/*.spec.ts" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ServiceFromAspNetCore/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ChangeReturnType/Assembly/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ServiceFromAspNetCore/Service/ClientApp/src/app/home/home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-home', 5 | templateUrl: './home.component.html', 6 | }) 7 | export class HomeComponent { 8 | } 9 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/WithCustomHttpClient/Service/ClientApp/src/app/home/home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-home', 5 | templateUrl: './home.component.html', 6 | }) 7 | export class HomeComponent { 8 | } 9 | -------------------------------------------------------------------------------- /Examples/Json/JsonWithReader/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace JsonWithReader 4 | { 5 | class Program 6 | { 7 | static void Main(string[] args) 8 | { 9 | Console.WriteLine("Hello World!"); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Examples/Reflection/ReflectionIgnoreAttribute/TypeToIgnore.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | namespace ReflectionIgnoreAttribute 4 | { 5 | [GenerateIgnore] 6 | public class TypeToIgnore 7 | { 8 | public string StringProperty { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /Examples/build.cmd: -------------------------------------------------------------------------------- 1 | @title KY-Generator Examples 2 | 3 | cd Angular 4 | start build.cmd 5 | cd ../ 6 | 7 | cd Reflection 8 | start build.cmd 9 | cd ../ 10 | 11 | cd Json 12 | call build.cmd 13 | cd ../ 14 | 15 | cd Sqlite 16 | call build.cmd 17 | cd ../ 18 | 19 | PAUSE -------------------------------------------------------------------------------- /Reflection.Tests/Data/TwoInterfacesType.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Reflection.Tests 2 | { 3 | public class TwoInterfacesType : IFirst, ISecond 4 | { 5 | public string FirstProperty { get; set; } 6 | public string SecondProperty { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "types": [] 6 | }, 7 | "exclude": [ 8 | "src/test.ts", 9 | "**/*.spec.ts" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /Tests/WebApiFluent/ClientApp/src/tsconfig.server.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "module": "commonjs" 5 | }, 6 | "angularCompilerOptions": { 7 | "entryModule": "app/app.server.module#AppServerModule" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /AspDotNet.Generator/Configurations/AspDotNetReadControllerConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.AspDotNet.Configurations; 2 | 3 | public class AspDotNetReadControllerConfiguration 4 | { 5 | public string Name { get; set; } 6 | public string Namespace { get; set; } 7 | } 8 | -------------------------------------------------------------------------------- /Common.Generator/Statistics/CommandStatistic.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace KY.Generator.Statistics 4 | { 5 | public class CommandStatistic 6 | { 7 | public string Command { get; set; } 8 | public TimeSpan Duration { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Common.Generator/Transfer/EntityActionParameterTransferObject.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Transfer 2 | { 3 | public class EntityActionParameterTransferObject 4 | { 5 | public string Name { get; set; } 6 | public TypeTransferObject Type { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Common.Generator/Transfer/GenericAliasTransferObject.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Transfer 2 | { 3 | public class GenericAliasTransferObject 4 | { 5 | public TypeTransferObject Alias { get; set; } 6 | public TypeTransferObject Type { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Common.Generator/Transfer/HttpServiceActionTypeTransferObject.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Transfer 2 | { 3 | public enum HttpServiceActionTypeTransferObject 4 | { 5 | Get, 6 | Post, 7 | Put, 8 | Patch, 9 | Delete 10 | } 11 | } -------------------------------------------------------------------------------- /Common.Generator/Writers/ITypeWriter.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator.Output; 2 | using KY.Generator.Templates; 3 | 4 | namespace KY.Generator.Writers 5 | { 6 | public interface ITypeWriter 7 | { 8 | void Write(TypeTemplate template, IOutputCache output); 9 | } 10 | } -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ServiceFromAspNetCoreSignalRHub/ClientApp/src/app/home/home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-home', 5 | templateUrl: './home.component.html', 6 | }) 7 | export class HomeComponent { 8 | } 9 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/Strict/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/NpmPackage/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ServiceFromAspNetCore/Service/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ServiceFromSignalR/Service/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/WithCustomHttpClient/Service/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Tests/AnnotationAsync/AngularAsync.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | namespace AnnotationAsync 4 | { 5 | [GenerateAngularModel("Output")] 6 | [GenerateAsync] 7 | public class AngularAsync 8 | { 9 | public string Property { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Tests/AnnotationAsync/NotAsyncType.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | namespace AnnotationAsync 4 | { 5 | [Generate(OutputLanguage.TypeScript, "Output")] 6 | public class NotAsyncType 7 | { 8 | public string StringProperty { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Tests/AnnotationAsyncAssembly/Class2.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | namespace AnnotationAsyncAssembly 4 | { 5 | [Generate(OutputLanguage.TypeScript, "Output")] 6 | public class Class2 7 | { 8 | public string StringProperty { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Tests/AnnotationInNestedClass/Class1.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | namespace AnnotationInNestedClass 4 | { 5 | public class Class1 6 | { 7 | [Generate(OutputLanguage.TypeScript, "Output")] 8 | public class Class2 9 | { } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Tests/Fluent/Fluent/IIgnoreMe.cs: -------------------------------------------------------------------------------- 1 | namespace Types 2 | { 3 | public interface IIgnoreMe 4 | { 5 | string IgnoredProperty { get; set; } 6 | } 7 | 8 | public interface IIgnoreMe 9 | { 10 | T IgnoredProperty { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Tests/UrlVersionedWebApiController/ClientApp/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html' 6 | }) 7 | export class AppComponent { 8 | title = 'app'; 9 | } 10 | -------------------------------------------------------------------------------- /Tests/UrlVersionedWebApiController/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/src/tsconfig.server.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "module": "commonjs" 5 | }, 6 | "angularCompilerOptions": { 7 | "entryModule": "app/app.server.module#AppServerModule" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ServiceFromAspNetCoreSignalRHub/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Reflection.Tests/Data/InheritInterfaceType.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Reflection.Tests 2 | { 3 | public class InheritInterfaceType : IInheritFirst 4 | { 5 | public string FirstProperty { get; set; } 6 | public string FirstInheritedProperty { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Tests/Fluent/Fluent/IInterface.cs: -------------------------------------------------------------------------------- 1 | namespace Types 2 | { 3 | public interface IInterface 4 | { 5 | public string Property { get; set; } 6 | } 7 | 8 | public interface IInterface 9 | { 10 | public T Property { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Tests/Fluent/Fluent/IgnoreMe.cs: -------------------------------------------------------------------------------- 1 | namespace Types 2 | { 3 | public class IgnoreMe 4 | { 5 | public string IgnoredProperty { get; set; } 6 | } 7 | 8 | public class IgnoreMe 9 | { 10 | public T IgnoredProperty { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Tests/Generator/Models/Reader1.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator.Transfer.Readers; 2 | 3 | namespace KY.Generator.Tests.Models 4 | { 5 | internal class Reader1 : ITransferReader 6 | { 7 | public void Read(Read1Configuration configuration) 8 | { } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Tests/Generator/Models/Reader2.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator.Transfer.Readers; 2 | 3 | namespace KY.Generator.Tests.Models 4 | { 5 | internal class Reader2 : ITransferReader 6 | { 7 | public void Read(Read2Configuration configuration) 8 | { } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Tests/UrlVersionedWebApiController/ClientApp/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "types": [] 6 | }, 7 | "exclude": [ 8 | "src/test.ts", 9 | "**/*.spec.ts" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /Common.Generator/Writers/ITemplateWriter.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator.Output; 2 | using KY.Generator.Templates; 3 | 4 | namespace KY.Generator.Writers 5 | { 6 | public interface ITemplateWriter 7 | { 8 | void Write(ICodeFragment fragment, IOutputCache output); 9 | } 10 | } -------------------------------------------------------------------------------- /Common/Annotations/GenerateFieldsAsPropertiesAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace KY.Generator 4 | { 5 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Assembly, Inherited = false)] 6 | public class GenerateFieldsAsPropertiesAttribute : Attribute 7 | { } 8 | } 9 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ChangeReturnType/ClientApp/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html' 6 | }) 7 | export class AppComponent { 8 | title = 'app'; 9 | } 10 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ChangeReturnType/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /Examples/Reflection/ReflectionFromCore/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ReflectionFromCore 4 | { 5 | class Program 6 | { 7 | static void Main(string[] args) 8 | { 9 | Console.WriteLine("Hello World!"); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Tests/UrlVersionedWebApiController/ClientApp/src/tsconfig.server.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "module": "commonjs" 5 | }, 6 | "angularCompilerOptions": { 7 | "entryModule": "app/app.server.module#AppServerModule" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Common.Generator/Settings/GlobalSettings.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace KY.Generator.Settings 4 | { 5 | public class GlobalSettings 6 | { 7 | public bool StatisticsEnabled { get; set; } = true; 8 | public Guid License { get; set; } = Guid.NewGuid(); 9 | } 10 | } -------------------------------------------------------------------------------- /EntityFramework/Fluent/FluentSetting.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator; 2 | 3 | public class FluentIgnore : IFluentLanguageElement 4 | { 5 | public string Property { get; } 6 | 7 | public FluentIgnore(string property) 8 | { 9 | this.Property = property; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ServiceFromAspNetCore/ClientApp/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html' 6 | }) 7 | export class AppComponent { 8 | title = 'app'; 9 | } 10 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ServiceFromAspNetCore/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ChangeReturnType/Assembly/ClientApp/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html' 6 | }) 7 | export class AppComponent { 8 | title = 'app'; 9 | } 10 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ChangeReturnType/Assembly/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ServiceFromAspNetCore/Service/ClientApp/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html' 6 | }) 7 | export class AppComponent { 8 | title = 'app'; 9 | } 10 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ServiceFromSignalR/Service/ClientApp/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html' 6 | }) 7 | export class AppComponent { 8 | title = 'app'; 9 | } 10 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/WithCustomHttpClient/Service/ClientApp/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html' 6 | }) 7 | export class AppComponent { 8 | title = 'app'; 9 | } 10 | -------------------------------------------------------------------------------- /Examples/Reflection/ReflectionX86/TypeToRead.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | namespace ReflectionX86 4 | { 5 | [Generate] 6 | public class TypeToRead 7 | { 8 | public string StringProperty { get; set; } 9 | public int NumberProperty { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Reflection.Tests/Results/inherit-interface-type.ts.result: -------------------------------------------------------------------------------- 1 | // tslint:disable 2 | 3 | import { IInheritFirst } from "./inherit-first.interface"; 4 | 5 | export class InheritInterfaceType implements IInheritFirst { 6 | public firstProperty: string; 7 | public firstInheritedProperty: string; 8 | } -------------------------------------------------------------------------------- /Common.Generator/Output/IOutputCache.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Output 2 | { 3 | public interface IOutputCache : IOutputCacheBase 4 | { 5 | IOutputCache If(bool condition); 6 | IOutputCache EndIf(); 7 | IOutputCache ExtraIndent(int indents = 1); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Common.Generator/Templates/Types/NullTemplate.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | 3 | namespace KY.Generator.Templates; 4 | 5 | [DebuggerDisplay("TypeTemplate: Null")] 6 | public class NullTemplate : TypeTemplate 7 | { 8 | public NullTemplate() 9 | : base(string.Empty) 10 | { } 11 | } -------------------------------------------------------------------------------- /Common.Generator/Writers/IGenericTypeWriter.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator.Output; 2 | using KY.Generator.Templates; 3 | 4 | namespace KY.Generator.Writers 5 | { 6 | public interface IGenericTypeWriter 7 | { 8 | void Write(GenericTypeTemplate template, IOutputCache output); 9 | } 10 | } -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ServiceFromAspNetCore/ClientApp/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "types": [] 6 | }, 7 | "exclude": [ 8 | "src/test.ts", 9 | "**/*.spec.ts" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ChangeReturnType/Assembly/ClientApp/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "types": [] 6 | }, 7 | "exclude": [ 8 | "src/test.ts", 9 | "**/*.spec.ts" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ServiceFromAspNetCore/Service/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ServiceFromSignalR/Service/ClientApp/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "types": [] 6 | }, 7 | "exclude": [ 8 | "src/test.ts", 9 | "**/*.spec.ts" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ServiceFromSignalR/Service/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/WithCustomHttpClient/Service/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /Examples/Reflection/ReflectionFromMultipleAssemblies/SecondAssembly/SecondAssembly.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | second-assembly 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Tests/AnnotationAsyncAssembly/Class1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using KY.Generator; 3 | 4 | namespace AnnotationAsyncAssembly 5 | { 6 | [Generate(OutputLanguage.TypeScript, "Output")] 7 | public class Class1 8 | { 9 | public string StringProperty { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Tests/SignalR/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.AspNetCore.SpaProxy": "Information", 7 | "Microsoft.Hosting.Lifetime": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Tests/WebApiFluent/ClientApp/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/'); 6 | } 7 | 8 | getMainHeading() { 9 | return element(by.css('app-root h1')).getText(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Tests/v10/CustomBuildOutputLocation/Output/class-1.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class Class1 { 5 | public constructor(init?: Partial) { 6 | Object.assign(this, init); 7 | } 8 | } 9 | 10 | // outputid:9eb9a315-74e4-453d-b86a-2eae6207d03f 11 | -------------------------------------------------------------------------------- /Common.Generator/Templates/Structural/ExportTemplate.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Templates 2 | { 3 | public class ExportTemplate : UsingTemplate 4 | { 5 | public ExportTemplate(string nameSpace, string type, string path) 6 | : base(nameSpace, type, path) 7 | { } 8 | } 9 | } -------------------------------------------------------------------------------- /EntityFramework.Generator/Configurations/EntityFrameworkCoreWriteConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.EntityFramework.Configurations 2 | { 3 | internal class EntityFrameworkCoreWriteConfiguration : EntityFrameworkWriteConfiguration 4 | { 5 | public override bool IsCore => true; 6 | } 7 | } -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ServiceFromAspNetCore/ClientApp/src/tsconfig.server.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "module": "commonjs" 5 | }, 6 | "angularCompilerOptions": { 7 | "entryModule": "app/app.server.module#AppServerModule" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ServiceFromAspNetCoreSignalRHub/ClientApp/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html' 6 | }) 7 | export class AppComponent { 8 | title = 'app'; 9 | } 10 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ServiceFromAspNetCoreSignalRHub/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ChangeReturnType/Assembly/ClientApp/src/tsconfig.server.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "module": "commonjs" 5 | }, 6 | "angularCompilerOptions": { 7 | "entryModule": "app/app.server.module#AppServerModule" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ServiceFromAspNetCore/Service/ClientApp/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "types": [] 6 | }, 7 | "exclude": [ 8 | "src/test.ts", 9 | "**/*.spec.ts" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/WithCustomHttpClient/Service/ClientApp/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "types": [] 6 | }, 7 | "exclude": [ 8 | "src/test.ts", 9 | "**/*.spec.ts" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /Examples/AspDotNet/WebApi.Attributes/Models/Value.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Examples.AspDotNet.Models 2 | { 3 | [GenerateAngularModel("..\\..\\Angular\\src\\app\\models")] 4 | public class Value 5 | { 6 | public int Id { get; set; } 7 | public string Text { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /Sqlite.Fluent/ISqliteFromDatabaseOrReadSyntax.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator; 2 | 3 | public interface ISqliteFromDatabaseOrReadSyntax : ISqliteFromDatabaseSyntax, ISqliteReadSyntax 4 | { 5 | ISqliteFromDatabaseOrReadSyntax UseTable(string tableName); 6 | ISqliteFromDatabaseOrReadSyntax UseAll(); 7 | } 8 | -------------------------------------------------------------------------------- /Tests/Sqlite/Models/Complex.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | namespace Sqlite.Models 4 | { 5 | [GenerateSqliteRepository("Output")] 6 | public class Complex 7 | { 8 | public string StringProperty { get; set; } 9 | 10 | public Simple Simple { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/'); 6 | } 7 | 8 | getMainHeading() { 9 | return element(by.css('app-root h1')).getText(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/src/app/rename/models/data.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class Data { 5 | public constructor(init?: Partial) { 6 | Object.assign(this, init); 7 | } 8 | } 9 | 10 | // outputid:627408ca-a818-4326-b843-415f5bbfb028 11 | -------------------------------------------------------------------------------- /Tests/v10/InheritanceAnnotationsNullableDisabled/Output/abstract.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export abstract class Abstract { 5 | public stringProperty?: string; 6 | public abstractProperty?: string; 7 | } 8 | 9 | // outputid:605e91d7-ee13-4f1d-9b92-845bb3ace852 10 | -------------------------------------------------------------------------------- /Tsql.Generator/Configurations/TsqlReadEntityKeyAction.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Tsql.Configurations 2 | { 3 | public class TsqlReadEntityKeyAction 4 | { 5 | public string Action { get; set; } 6 | public string Name { get; set; } 7 | public bool All { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /Common/Annotations/GeneratePropertiesAsFieldsAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace KY.Generator 4 | { 5 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Assembly, Inherited = false)] 6 | public class GeneratePropertiesAsFieldsAttribute : Attribute 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ServiceFromAspNetCoreSignalRHub/ClientApp/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "types": [] 6 | }, 7 | "exclude": [ 8 | "src/test.ts", 9 | "**/*.spec.ts" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ServiceFromAspNetCore/Service/ClientApp/src/tsconfig.server.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "module": "commonjs" 5 | }, 6 | "angularCompilerOptions": { 7 | "entryModule": "app/app.server.module#AppServerModule" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ServiceFromSignalR/Service/ClientApp/src/tsconfig.server.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "module": "commonjs" 5 | }, 6 | "angularCompilerOptions": { 7 | "entryModule": "app/app.server.module#AppServerModule" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/WithCustomHttpClient/Service/ClientApp/src/tsconfig.server.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "module": "commonjs" 5 | }, 6 | "angularCompilerOptions": { 7 | "entryModule": "app/app.server.module#AppServerModule" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Examples/AspDotNet/WebApi.Attributes.Core/Models/Value.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Examples.AspDotNet.Models 2 | { 3 | [GenerateAngularModel("..\\..\\Angular\\src\\app\\models")] 4 | public class Value 5 | { 6 | public int Id { get; set; } 7 | public string Text { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /Reflection.Fluent/IReflectionWriteSyntax.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator; 2 | 3 | public interface IReflectionWriteSyntax : IFluentSyntax 4 | { 5 | IReflectionWriteSyntax PropertiesToFields(); 6 | IReflectionWriteSyntax FieldsToProperties(); 7 | IReflectionWriteSyntax Models(string relativePath); 8 | } 9 | -------------------------------------------------------------------------------- /Reflection.Generator/Configurations/ReflectionReadConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Reflection.Configurations; 2 | 3 | public class ReflectionReadConfiguration 4 | { 5 | public string Name { get; set; } 6 | public string Namespace { get; set; } 7 | public bool OnlySubTypes { get; set; } 8 | } 9 | -------------------------------------------------------------------------------- /Common.Generator/Options/IOptionsFactory.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator; 2 | 3 | public interface IOptionsFactory 4 | { 5 | bool CanCreate(Type optionsType); 6 | object Create(Type optionsType, object key, object? parent, object global); 7 | object CreateGlobal(Type optionsType, object key, object? parent); 8 | } -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ServiceFromAspNetCoreSignalRHub/ClientApp/src/tsconfig.server.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "module": "commonjs" 5 | }, 6 | "angularCompilerOptions": { 7 | "entryModule": "app/app.server.module#AppServerModule" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Reflection.Tests/Data/BaseClassAndTwoInterfacesType.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Reflection.Tests 2 | { 3 | public class BaseClassAndTwoInterfacesType : OneInterfaceType, ISecond, IThird 4 | { 5 | public string SecondProperty { get; set; } 6 | public string ThirdProperty { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Tests/v10/InheritanceAnnotationsNullableDisabled/Output/Angular/abstract.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export abstract class Abstract { 5 | public stringProperty?: string; 6 | public abstractProperty?: string; 7 | } 8 | 9 | // outputid:605e91d7-ee13-4f1d-9b92-845bb3ace852 10 | -------------------------------------------------------------------------------- /Angular.Generator/Configurations/AngularWriteModelConfiguration.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator.Configurations; 2 | using KY.Generator.TypeScript.Languages; 3 | 4 | namespace KY.Generator.Angular.Configurations 5 | { 6 | public class AngularWriteModelConfiguration : ModelWriteConfiguration 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Common.Generator/Licensing/License.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Licensing; 2 | 3 | public class License 4 | { 5 | public Guid Id { get; set; } 6 | public DateTime ValidUntil { get; set; } 7 | public List Messages { get; set; } = []; 8 | public List Features { get; set; } = []; 9 | } 10 | -------------------------------------------------------------------------------- /Common.Generator/Transfer/EntityKeyTransferObject.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Transfer 2 | { 3 | public class EntityKeyTransferObject 4 | { 5 | public string Name { get; set; } 6 | public TypeTransferObject Type { get; set; } 7 | public PropertyTransferObject Property { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /Reflection.Tests/Results/two-interfaces-type.ts.result: -------------------------------------------------------------------------------- 1 | // tslint:disable 2 | 3 | import { IFirst } from "./first.interface"; 4 | import { ISecond } from "./second.interface"; 5 | 6 | export class TwoInterfacesType implements IFirst, ISecond { 7 | public firstProperty: string; 8 | public secondProperty: string; 9 | } -------------------------------------------------------------------------------- /Tests/AnnotationsWithMultipleOutputs/ThirdType.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | namespace AnnotationsWithMultipleOutputs 4 | { 5 | [GenerateAngularModel("Output\\Third")] 6 | [GenerateNoHeader] 7 | public class ThirdType 8 | { 9 | public string StringProperty { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Tests/Formatting/Formatting/MyClass.cs: -------------------------------------------------------------------------------- 1 | namespace Formatting 2 | { 3 | public class MyClass 4 | { 5 | public string Property { get; } 6 | } 7 | 8 | public class MyClassWithInterface : Interface 9 | { } 10 | 11 | public class MyClassWithIInterface : IInterface 12 | { } 13 | } 14 | -------------------------------------------------------------------------------- /Tests/Formatting/Generator/Output/tab-test.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class TabTest { 5 | public property?: string; 6 | 7 | public constructor(init?: Partial) { 8 | Object.assign(this, init); 9 | } 10 | } 11 | 12 | // outputid:95ca21b8-f1ff-4cc7-b96e-63d5a90970c3 13 | -------------------------------------------------------------------------------- /Tests/SignalR/ClientApp/src/app/counter/counter.component.html: -------------------------------------------------------------------------------- 1 |

Counter

2 | 3 |

This is a simple example of an Angular component.

4 | 5 |

Current count: {{ currentCount }}

6 | 7 | 8 | -------------------------------------------------------------------------------- /Tests/UrlVersionedWebApiController/ClientApp/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/'); 6 | } 7 | 8 | getMainHeading() { 9 | return element(by.css('app-root h1')).getText(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } -------------------------------------------------------------------------------- /Tests/WebApiFluent/ClientApp/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } -------------------------------------------------------------------------------- /Tsql.Generator/Type/TsqlParameter.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Tsql.Type 2 | { 3 | public class TsqlParameter 4 | { 5 | public string Name { get; set; } 6 | public string Type { get; set; } 7 | public int Order { get; set; } 8 | public bool IsNullable { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /Common.Generator/Templates/Executing/ThisTemplate.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Templates; 2 | 3 | public class ThisTemplate : ChainedCodeFragment 4 | { 5 | public override string Separator => " "; 6 | 7 | public override object Clone() 8 | { 9 | return this.CloneTo(new ThisTemplate()); 10 | } 11 | } -------------------------------------------------------------------------------- /Common/Annotations/GenerateFixCasingWithMappingAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace KY.Generator 5 | { 6 | [AttributeUsage(AttributeTargets.Class, Inherited = false)] 7 | public class GenerateFixCasingWithMappingAttribute : Attribute 8 | { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Common/Annotations/GeneratePluginAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator; 2 | 3 | /// 4 | /// Notifies the generator to load the specified assembly with its dependencies and search for plugins. 5 | /// 6 | [AttributeUsage(AttributeTargets.Assembly)] 7 | public class GeneratePluginAttribute : Attribute 8 | { } 9 | -------------------------------------------------------------------------------- /Examples/Reflection/ReflectionFromCore/TypeToRead.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | namespace ReflectionFromCore 4 | { 5 | [GenerateAngularModel("Output")] 6 | public class TypeToRead 7 | { 8 | public string StringProperty { get; set; } 9 | public int NumberProperty { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Tests/Fluent/Fluent/TypeWithGenericAndNotGenericBaseInterface.cs: -------------------------------------------------------------------------------- 1 | namespace Types 2 | { 3 | public class TypeWithGenericAndNotGenericBaseInterface : IGenericInterfaceWithNonGenericBase 4 | { 5 | public string Property { get; set; } 6 | public string GenericProperty { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/src/app/counter/counter.component.html: -------------------------------------------------------------------------------- 1 |

Counter

2 | 3 |

This is a simple example of an Angular component.

4 | 5 |

Current count: {{ currentCount }}

6 | 7 | 8 | -------------------------------------------------------------------------------- /Tests/WebApiFluent/ClientApp/src/app/counter/counter.component.html: -------------------------------------------------------------------------------- 1 |

Counter

2 | 3 |

This is a simple example of an Angular component.

4 | 5 |

Current count: {{ currentCount }}

6 | 7 | 8 | -------------------------------------------------------------------------------- /TypeScript.Generator/Transfer/ExportIndexLine.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace KY.Generator.TypeScript.Transfer 4 | { 5 | public class ExportIndexLine : IIndexLine 6 | { 7 | public List Types { get; set; } = new(); 8 | public string Path { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /Common.Generator/Templates/Executing/BaseTemplate.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Templates; 2 | 3 | public class BaseTemplate : ChainedCodeFragment 4 | { 5 | public override string Separator => " "; 6 | 7 | public override object Clone() 8 | { 9 | return this.CloneTo(new BaseTemplate()); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Common.Generator/Templates/Executing/NotTemplate.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Templates; 2 | 3 | public class NotTemplate : ChainedCodeFragment 4 | { 5 | public override string Separator => " "; 6 | 7 | public override object Clone() 8 | { 9 | return this.CloneTo(new NotTemplate()); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Csharp.Generator/Templates/VerbatimStringTemplate.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator.Templates; 2 | 3 | namespace KY.Generator.Csharp.Templates 4 | { 5 | public class VerbatimStringTemplate : StringTemplate 6 | { 7 | public VerbatimStringTemplate(string value) 8 | : base(value) 9 | { } 10 | } 11 | } -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ChangeReturnType/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.AspNetCore.SpaProxy": "Information", 7 | "Microsoft.Hosting.Lifetime": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/FromModel/TypeToRead.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | namespace FromModel 4 | { 5 | [GenerateAngularModel("Output/Models")] 6 | internal class TypeToRead 7 | { 8 | public string StringProperty { get; set; } 9 | public int NumberProperty { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Tests/Generator/Resources/two-generates-in-array-array.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "generate": [ 4 | [ 5 | { 6 | "write": "1", 7 | "property1": "Test1" 8 | } 9 | ], 10 | [ 11 | { 12 | "write": "2", 13 | "property2": "Test2" 14 | } 15 | ] 16 | ] 17 | } -------------------------------------------------------------------------------- /Tests/SignalR/Models/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | namespace SignalR; 2 | 3 | public class WeatherForecast 4 | { 5 | public DateTime Date { get; set; } 6 | 7 | public int TemperatureC { get; set; } 8 | 9 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 10 | 11 | public string? Summary { get; set; } 12 | } -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/src/app/rename/models/rename-model.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class RenameModel { 5 | public constructor(init?: Partial) { 6 | Object.assign(this, init); 7 | } 8 | } 9 | 10 | // outputid:627408ca-a818-4326-b843-415f5bbfb028 11 | -------------------------------------------------------------------------------- /Common.Generator/Templates/Executing/AwaitTemplate.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Templates; 2 | 3 | public class AwaitTemplate : ChainedCodeFragment 4 | { 5 | public override string Separator => " "; 6 | 7 | public override object Clone() 8 | { 9 | return this.CloneTo(new AwaitTemplate()); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ServiceFromAspNetCore/ClientApp/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/'); 6 | } 7 | 8 | getMainHeading() { 9 | return element(by.css('app-root h1')).getText(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ChangeReturnType/Assembly/ClientApp/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/'); 6 | } 7 | 8 | getMainHeading() { 9 | return element(by.css('app-root h1')).getText(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ServiceFromAspNetCore/Service/ClientApp/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/'); 6 | } 7 | 8 | getMainHeading() { 9 | return element(by.css('app-root h1')).getText(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ServiceFromSignalR/Service/ClientApp/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/'); 6 | } 7 | 8 | getMainHeading() { 9 | return element(by.css('app-root h1')).getText(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/WithCustomHttpClient/Service/ClientApp/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/'); 6 | } 7 | 8 | getMainHeading() { 9 | return element(by.css('app-root h1')).getText(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Examples/Reflection/ReflectionFromStandard/TypeToRead.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | namespace ReflectionFromStandard 4 | { 5 | [GenerateAngularModel("Output")] 6 | public class TypeToRead 7 | { 8 | public string StringProperty { get; set; } 9 | public int NumberProperty { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Reflection.Tests/Results/base-class-and-one-interface-type.ts.result: -------------------------------------------------------------------------------- 1 | // tslint:disable 2 | 3 | import { OneInterfaceType } from "./one-interface-type"; 4 | import { ISecond } from "./second.interface"; 5 | 6 | export class BaseClassAndOneInterfaceType extends OneInterfaceType implements ISecond { 7 | public secondProperty: string; 8 | } -------------------------------------------------------------------------------- /Tests/UrlVersionedWebApiController/ClientApp/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } -------------------------------------------------------------------------------- /Tests/v10/InheritanceAnnotationsNullableDisabled/Output/Angular/index.ts: -------------------------------------------------------------------------------- 1 | 2 | export * from "./abstract"; 3 | export * from "./base"; 4 | export * from "./derive-with-new"; 5 | export * from "./derived-from-abstract"; 6 | export * from "./derived-from-virtual"; 7 | export * from "./derived"; 8 | export * from "./virtual"; 9 | 10 | -------------------------------------------------------------------------------- /Angular.Fluent/IAngularWriteSyntax.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator; 2 | 3 | public interface IAngularWriteSyntax : IAngularWriteBaseSyntax 4 | { 5 | /// 6 | /// Creates the code for a npm package 7 | /// 8 | IAngularWriteSyntax Package(Action action); 9 | } 10 | -------------------------------------------------------------------------------- /AspDotNet.Generator/Configurations/AspDotNetReadConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.AspDotNet.Configurations 2 | { 3 | public class AspDotNetReadConfiguration 4 | { 5 | public AspDotNetReadControllerConfiguration Controller { get; set; } 6 | public AspDotNetReadHubConfiguration Hub { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Common.Generator/Templates/Executing/TypeOfTemplate.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Templates 2 | { 3 | public class TypeOfTemplate : ICodeFragment 4 | { 5 | public TypeTemplate Type { get; } 6 | 7 | public TypeOfTemplate(TypeTemplate type) 8 | { 9 | this.Type = type; 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /Examples/Reflection/ReflectionFromExecutable/TypeToRead.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | namespace ReflectionFromExecutable 4 | { 5 | [GenerateAngularModel("Output")] 6 | public class TypeToRead 7 | { 8 | public string StringProperty { get; set; } 9 | public int NumberProperty { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Examples/Reflection/ReflectionFromNet5/TypeToRead.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | namespace ReflectionFromNet5 4 | { 5 | [Generate(OutputLanguage.TypeScript, "Output")] 6 | public class TypeToRead 7 | { 8 | public string StringProperty { get; set; } 9 | public int NumberProperty { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Json.Tests/Resources/Simple.cs.result: -------------------------------------------------------------------------------- 1 | // ReSharper disable All 2 | 3 | namespace KY.Generator.Examples.Json 4 | { 5 | public partial class Simple 6 | { 7 | public string StringProperty { get; set; } 8 | public int NumberProperty { get; set; } 9 | public bool BooleanProperty { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /OData.Tests/Resources/address.ts.result: -------------------------------------------------------------------------------- 1 | // tslint:disable 2 | 3 | export class Address { 4 | public id: number; 5 | public zipCode: number; 6 | public city: string; 7 | public street: string; 8 | 9 | public constructor(init: Partial
= undefined) { 10 | Object.assign(this, init); 11 | } 12 | } -------------------------------------------------------------------------------- /Tests/UrlVersionedWebApiController/ClientApp/src/app/counter/counter.component.html: -------------------------------------------------------------------------------- 1 |

Counter

2 | 3 |

This is a simple example of an Angular component.

4 | 5 |

Current count: {{ currentCount }}

6 | 7 | 8 | -------------------------------------------------------------------------------- /Common.Generator/Templates/Executing/NullValueTemplate.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Templates; 2 | 3 | public class NullValueTemplate : ChainedCodeFragment 4 | { 5 | public override string Separator => " "; 6 | 7 | public override object Clone() 8 | { 9 | return this.CloneTo(new NullValueTemplate()); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Common.Generator/Templates/Executing/ReturnTemplate.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Templates 2 | { 3 | public class ReturnTemplate : ICodeFragment 4 | { 5 | public ICodeFragment Code { get; } 6 | 7 | public ReturnTemplate(ICodeFragment code) 8 | { 9 | this.Code = code; 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ServiceFromAspNetCoreSignalRHub/ClientApp/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/'); 6 | } 7 | 8 | getMainHeading() { 9 | return element(by.css('app-root h1')).getText(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Examples/Reflection/ReflectionFromIndex/Index.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | namespace ReflectionFromIndex 4 | { 5 | [GenerateIndex(OutputLanguage.TypeScript, "Output")] 6 | internal class Index 7 | { 8 | public TypeToRead type1; 9 | public AnotherType type2; 10 | public IgnoredType type3; 11 | } 12 | } -------------------------------------------------------------------------------- /Json.Tests/Resources/complex.json: -------------------------------------------------------------------------------- 1 | { 2 | "stringArrayProperty": [ "One", "Two", "Three" ], 3 | "numberArrayProperty": [ 1, 2, 3 ], 4 | "objectArrayProperty": [ 5 | { "text": "One" }, 6 | { "text": "Two" } 7 | ], 8 | "mixedArrayProperty": [ 1, "Two", 3 ], 9 | "objectProperty": { 10 | "property": "works" 11 | } 12 | } -------------------------------------------------------------------------------- /Reflection.Tests/Resources/reflection.generator.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "generate": [ 4 | { 5 | "read": "reflection", 6 | "assembly": "KY.Generator.Test.dll", 7 | "namespace": "KY.Generator.Test", 8 | "name": "TestClass" 9 | }, 10 | { 11 | "write": "reflection" 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /Tests/AnnotationAsync/Output/angular-async.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class AngularAsync { 5 | public property: string; 6 | 7 | public constructor(init?: Partial) { 8 | Object.assign(this, init); 9 | } 10 | } 11 | 12 | // outputid:84eb1514-1fc9-499f-924d-4a93a076f40a 13 | -------------------------------------------------------------------------------- /Tests/Fluent/Fluent.Generator/Output/Models/sub-type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class SubType { 5 | public property?: string; 6 | 7 | public constructor(init?: Partial) { 8 | Object.assign(this, init); 9 | } 10 | } 11 | 12 | // outputid:f32fd57a-e5ce-4ae5-97bc-bbca02f65904 13 | -------------------------------------------------------------------------------- /Tests/Generator/Resources/two-reads-one-generate.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "generate": [ 4 | { 5 | "Read": "1", 6 | "Property1": "Test1" 7 | }, 8 | { 9 | "Read": "2", 10 | "Property2": "Test2" 11 | }, 12 | { 13 | "Write": "1", 14 | "Property1": "Test3" 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /AspDotNet.Generator/Configurations/AspDotNetWriteEntityControllerActionAttributeValueConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.AspDotNet.Configurations 2 | { 3 | public class AspDotNetWriteEntityControllerActionAttributeValueConfiguration 4 | { 5 | public string Key { get; set; } 6 | public object Value { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Common.Generator/Writers/AwaitWriter.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator.Output; 2 | using KY.Generator.Templates; 3 | 4 | namespace KY.Generator.Writers; 5 | 6 | public class AwaitWriter : ITemplateWriter 7 | { 8 | public virtual void Write(ICodeFragment fragment, IOutputCache output) 9 | { 10 | output.Add("await"); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ChangeReturnType/ClientApp/src/app/counter/counter.component.html: -------------------------------------------------------------------------------- 1 |

Counter

2 | 3 |

This is a simple example of an Angular component.

4 | 5 |

Current count: {{ currentCount }}

6 | 7 | 8 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ServiceFromAspNetCore/ClientApp/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ChangeReturnType/Assembly/ClientApp/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ServiceFromSignalR/Service/ClientApp/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } -------------------------------------------------------------------------------- /Examples/Angular/Fluent/WithCustomHttpClient/Service/ClientApp/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } -------------------------------------------------------------------------------- /Tests/Derive/Output/derived-from-class-prefer-interface.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | import { BaseClass } from "./base-class"; 5 | 6 | export interface DerivedFromClassPreferInterface extends BaseClass { 7 | stringProperty?: string | undefined; 8 | } 9 | 10 | // outputid:e818f5ca-e427-4c1c-baf2-38476bfa9665 11 | -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /Csharp.Generator/Languages/LanguageExtension.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator.Languages; 2 | 3 | namespace KY.Generator.Csharp.Languages 4 | { 5 | public static class LanguageExtension 6 | { 7 | public static bool IsCsharp(this ILanguage language) 8 | { 9 | return language is CsharpLanguage; 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ServiceFromAspNetCore/ClientApp/src/app/counter/counter.component.html: -------------------------------------------------------------------------------- 1 |

Counter

2 | 3 |

This is a simple example of an Angular component.

4 | 5 |

Current count: {{ currentCount }}

6 | 7 | 8 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ChangeReturnType/Assembly/ClientApp/src/app/counter/counter.component.html: -------------------------------------------------------------------------------- 1 |

Counter

2 | 3 |

This is a simple example of an Angular component.

4 | 5 |

Current count: {{ currentCount }}

6 | 7 | 8 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/NpmPackage/NpmPackage.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ServiceFromAspNetCore/Service/ClientApp/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ServiceFromSignalR/Service/ClientApp/src/app/counter/counter.component.html: -------------------------------------------------------------------------------- 1 |

Counter

2 | 3 |

This is a simple example of an Angular component.

4 | 5 |

Current count: {{ currentCount }}

6 | 7 | 8 | -------------------------------------------------------------------------------- /Examples/Angular/Fluent/WithCustomHttpClient/Service/ClientApp/src/app/counter/counter.component.html: -------------------------------------------------------------------------------- 1 |

Counter

2 | 3 |

This is a simple example of an Angular component.

4 | 5 |

Current count: {{ currentCount }}

6 | 7 | 8 | -------------------------------------------------------------------------------- /Examples/Reflection/ReflectionFromAttributes/TypeToRead.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | namespace ReflectionFromAttributes 4 | { 5 | [Generate(OutputLanguage.TypeScript, "Output")] 6 | public class TypeToRead 7 | { 8 | public string StringProperty { get; set; } 9 | public int NumberProperty { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Sqlite.Generator/Transfer/SqliteFieldTransferObject.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator.Transfer; 2 | 3 | namespace KY.Generator.Sqlite.Transfer 4 | { 5 | public class SqliteFieldTransferObject : FieldTransferObject 6 | { 7 | public SqliteFieldTransferObject(FieldTransferObject field) 8 | : base(field) 9 | { } 10 | } 11 | } -------------------------------------------------------------------------------- /Tests/Sqlite/Models/Simple.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | namespace Sqlite.Models 4 | { 5 | [GenerateSqliteRepository("Output")] 6 | public class Simple 7 | { 8 | public string StringProperty { get; set; } 9 | 10 | [GenerateAsNotNull] 11 | public string NullableStringProperty { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Tests/Sqlite/Models/SimpleWithPrimary.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | namespace Sqlite.Models 4 | { 5 | [GenerateSqliteRepository("Output")] 6 | public class SimpleWithPrimary 7 | { 8 | [GenerateAsPrimaryKey] 9 | public int Id { get; set; } 10 | 11 | public string StringProperty { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Common.Generator/Helpers/Code.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator.Templates; 2 | 3 | namespace KY.Generator 4 | { 5 | public struct Code 6 | { 7 | public static Code Instance { get; } = default; 8 | 9 | public MultilineCodeFragment Multiline() 10 | { 11 | return new MultilineCodeFragment(); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ModelFromAssembly/Index.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | namespace ModelFromAssembly 4 | { 5 | [GenerateAngularModel("Output"), GenerateOnlySubTypes] 6 | internal class Index 7 | { 8 | public TypeToRead type1; 9 | public AnotherType type2; 10 | public IgnoredType type3; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ServiceFromAspNetCoreSignalRHub/ClientApp/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } -------------------------------------------------------------------------------- /Examples/Angular/Fluent/ServiceFromAspNetCore/Service/ClientApp/src/app/counter/counter.component.html: -------------------------------------------------------------------------------- 1 |

Counter

2 | 3 |

This is a simple example of an Angular component.

4 | 5 |

Current count: {{ currentCount }}

6 | 7 | 8 | -------------------------------------------------------------------------------- /Examples/Json/JsonWithReader/Source/complex.json: -------------------------------------------------------------------------------- 1 | { 2 | "stringArrayProperty": [ "One", "Two", "Three" ], 3 | "numberArrayProperty": [ 1, 2, 3 ], 4 | "objectArrayProperty": [ 5 | { "text": "One" }, 6 | { "text": "Two" } 7 | ], 8 | "mixedArrayProperty": [ 1, "Two", 3 ], 9 | "objectProperty": { 10 | "property": "works" 11 | } 12 | } -------------------------------------------------------------------------------- /Tests/AnnotationsWithMultipleOutputs/Output/First/sub-type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class SubType { 5 | public stringProperty?: string; 6 | 7 | public constructor(init?: Partial) { 8 | Object.assign(this, init); 9 | } 10 | } 11 | 12 | // outputid:352b1947-a770-4737-be18-608a78c130ad 13 | -------------------------------------------------------------------------------- /Tests/AnnotationsWithMultipleOutputs/Output/Second/sub-type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class SubType { 5 | public stringProperty?: string; 6 | 7 | public constructor(init?: Partial) { 8 | Object.assign(this, init); 9 | } 10 | } 11 | 12 | // outputid:352b1947-a770-4737-be18-608a78c130ad 13 | -------------------------------------------------------------------------------- /Tests/Formatting/Generator/Output/two-whitespace-test.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class TwoWhitespaceTest { 5 | public property?: string; 6 | 7 | public constructor(init?: Partial) { 8 | Object.assign(this, init); 9 | } 10 | } 11 | 12 | // outputid:95ca21b8-f1ff-4cc7-b96e-63d5a90970c3 13 | -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/src/app/post/models/post-model.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class PostModel { 5 | public value?: string; 6 | 7 | public constructor(init?: Partial) { 8 | Object.assign(this, init); 9 | } 10 | } 11 | 12 | // outputid:627408ca-a818-4326-b843-415f5bbfb028 13 | -------------------------------------------------------------------------------- /Tests/WebApiController/Models/SelfReferencingModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace WebApiController.Models 4 | { 5 | public class SelfReferencingModel 6 | { 7 | public string Name { get; set; } 8 | public List Children { get; } = new List(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Common.Generator/Templates/Executing/NullConditionalTemplate.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Templates; 2 | 3 | public class NullConditionalTemplate : ChainedCodeFragment 4 | { 5 | public override string Separator => ""; 6 | 7 | public override object Clone() 8 | { 9 | return this.CloneTo(new NullConditionalTemplate()); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Common.Generator/Templates/Executing/ParenthesisTemplate.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Templates 2 | { 3 | public class ParenthesisTemplate : ICodeFragment 4 | { 5 | public ICodeFragment Code { get; } 6 | 7 | public ParenthesisTemplate(ICodeFragment code) 8 | { 9 | this.Code = code; 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ServiceFromAspNetCoreSignalRHub/ClientApp/src/app/counter/counter.component.html: -------------------------------------------------------------------------------- 1 |

Counter

2 | 3 |

This is a simple example of an Angular component.

4 | 5 |

Current count: {{ currentCount }}

6 | 7 | 8 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/Strict/ClientApp/src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { RouterModule, Routes } from '@angular/router'; 3 | 4 | const routes: Routes = []; 5 | 6 | @NgModule({ 7 | imports: [RouterModule.forRoot(routes)], 8 | exports: [RouterModule] 9 | }) 10 | export class AppRoutingModule { } 11 | -------------------------------------------------------------------------------- /Json.Tests/Resources/SimpleWithoutReader.cs.result: -------------------------------------------------------------------------------- 1 | // ReSharper disable All 2 | 3 | namespace KY.Generator.Examples.Json 4 | { 5 | public partial class SimpleWithoutReader 6 | { 7 | public string StringProperty { get; set; } 8 | public int NumberProperty { get; set; } 9 | public bool BooleanProperty { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /Tests/AnnotationsWithMultipleOutputs/Output/Third/third-type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class ThirdType { 5 | public stringProperty?: string; 6 | 7 | public constructor(init?: Partial) { 8 | Object.assign(this, init); 9 | } 10 | } 11 | 12 | // outputid:352b1947-a770-4737-be18-608a78c130ad 13 | -------------------------------------------------------------------------------- /Tests/Caseing.Generator/Output/case-me.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class CaseMe { 5 | public stringProperty?: string; 6 | public s1: string; 7 | 8 | public constructor(init?: Partial) { 9 | Object.assign(this, init); 10 | } 11 | } 12 | 13 | // outputid:f7601c4b-055c-4bd5-a087-b514d1dde023 14 | -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/src/app/versioned-api/versioned-api.component.html: -------------------------------------------------------------------------------- 1 |
Loading...
2 |
Works
3 |
{{models | json}}
4 |
5 | 6 | 7 | 8 |
9 | -------------------------------------------------------------------------------- /Watchdog/Helpers/InstanceHelper.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | 3 | namespace KY.Generator.Watchdog.Helpers 4 | { 5 | public static class InstanceHelper 6 | { 7 | public static bool IsRunning() 8 | { 9 | return Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName).Length > 1; 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /Common.Generator/Writers/NotWriter.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator.Output; 2 | using KY.Generator.Templates; 3 | 4 | namespace KY.Generator.Writers 5 | { 6 | public class NotWriter : ITemplateWriter 7 | { 8 | public virtual void Write(ICodeFragment fragment, IOutputCache output) 9 | { 10 | output.Add("!"); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Examples/AspDotNet/WebApi/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Http; 2 | 3 | namespace KY.Generator.Examples.AspDotNet 4 | { 5 | public class WebApiApplication : System.Web.HttpApplication 6 | { 7 | protected void Application_Start() 8 | { 9 | GlobalConfiguration.Configure(WebApiConfig.Register); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Tests/Net8/Output/generic-sub-type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class GenericSubType { 5 | public single: TOne; 6 | public single2: string; 7 | public enumerable: TOne[]; 8 | public list: TTwo[]; 9 | public stringList: string[]; 10 | } 11 | 12 | // outputid:8d02ce37-8013-4a57-a40d-4a10c8c65de2 13 | -------------------------------------------------------------------------------- /Tests/Net9/Output/generic-sub-type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class GenericSubType { 5 | public single: TOne; 6 | public single2: string; 7 | public enumerable: TOne[]; 8 | public list: TTwo[]; 9 | public stringList: string[]; 10 | } 11 | 12 | // outputid:9c33e37c-3a6c-404f-8fab-dae790c04a8c 13 | -------------------------------------------------------------------------------- /Tests/v10/TypesAnnotationsNullableEnabled/Output/generic-sub-type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export interface GenericSubType { 5 | single: TOne; 6 | single2: string; 7 | enumerable: TOne[]; 8 | list: TTwo[]; 9 | stringList: string[]; 10 | } 11 | 12 | // outputid:f13dd313-1bd6-4a8e-9b3f-d6266d3a25ff 13 | -------------------------------------------------------------------------------- /TypeScript.Generator/Languages/LanguageExtension.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator.Languages; 2 | 3 | namespace KY.Generator.TypeScript.Languages 4 | { 5 | public static class LanguageExtension 6 | { 7 | public static bool IsTypeScript(this ILanguage language) 8 | { 9 | return language is TypeScriptLanguage; 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /Common.Fluent/Syntax/IFluentInternalSyntax.cs: -------------------------------------------------------------------------------- 1 | using KY.Core.Dependency; 2 | using KY.Generator.Command; 3 | 4 | namespace KY.Generator; 5 | 6 | public interface IFluentInternalSyntax 7 | { 8 | IDependencyResolver Resolver { get; } 9 | Task Run(); 10 | void FollowUp(); 11 | List Syntaxes { get; } 12 | } 13 | -------------------------------------------------------------------------------- /Common.Generator/Writers/NullWriter.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator.Output; 2 | using KY.Generator.Templates; 3 | 4 | namespace KY.Generator.Writers 5 | { 6 | public class NullWriter : ITemplateWriter 7 | { 8 | public virtual void Write(ICodeFragment fragment, IOutputCache output) 9 | { 10 | output.Add("null"); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Common.Generator/Writers/ThisWriter.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator.Output; 2 | using KY.Generator.Templates; 3 | 4 | namespace KY.Generator.Writers 5 | { 6 | public class ThisWriter : ITemplateWriter 7 | { 8 | public virtual void Write(ICodeFragment fragment, IOutputCache output) 9 | { 10 | output.Add("this"); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Common.Generator/Writers/VoidWriter.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator.Output; 2 | using KY.Generator.Templates; 3 | 4 | namespace KY.Generator.Writers 5 | { 6 | public class VoidWriter : ITemplateWriter 7 | { 8 | public virtual void Write(ICodeFragment fragment, IOutputCache output) 9 | { 10 | output.Add("void"); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Csharp.Generator/Templates/CsharpTemplate.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator.Templates; 2 | 3 | namespace KY.Generator.Csharp.Templates 4 | { 5 | public class CsharpTemplate : ICodeFragment 6 | { 7 | public string Code { get; set; } 8 | 9 | public CsharpTemplate(string code) 10 | { 11 | this.Code = code; 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /Json.Tests/Resources/formatNames.json: -------------------------------------------------------------------------------- 1 | { 2 | "alllower": "1", 3 | "ALLUPPER": "1", 4 | "camelCase": 1, 5 | "PascalCase": 1, 6 | "Title Case": 1, 7 | "snake_case": 1, 8 | "UPPER_SNAKE_CASE": 1, 9 | "Darwin_Case": 1, 10 | "kebab-case": 1, 11 | "alllowerobject": { 12 | "prop1": 1 13 | }, 14 | "ALLUPPEROBJECT": { 15 | "prop1": 1 16 | } 17 | } -------------------------------------------------------------------------------- /OData.Tests/Resources/user.ts.result: -------------------------------------------------------------------------------- 1 | // tslint:disable 2 | 3 | import { Address } from "./address"; 4 | 5 | export class User { 6 | public id: number; 7 | public name: string; 8 | public email: string; 9 | public address: Address; 10 | 11 | public constructor(init: Partial = undefined) { 12 | Object.assign(this, init); 13 | } 14 | } -------------------------------------------------------------------------------- /Tests/Derive/Output/derived-from-abstract-class-prefer-interface.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | import { AbstractType } from "./abstract-type"; 5 | 6 | export interface DerivedFromAbstractClassPreferInterface extends AbstractType { 7 | stringProperty?: string | undefined; 8 | } 9 | 10 | // outputid:e818f5ca-e427-4c1c-baf2-38476bfa9665 11 | -------------------------------------------------------------------------------- /Tests/Fluent/Fluent.Generator/Output/Models/edge-case-1-sub-type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class EdgeCase1SubType { 5 | public property?: string; 6 | 7 | public constructor(init?: Partial) { 8 | Object.assign(this, init); 9 | } 10 | } 11 | 12 | // outputid:f32fd57a-e5ce-4ae5-97bc-bbca02f65904 13 | -------------------------------------------------------------------------------- /Tests/Net5/Output/generic-sub-type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class GenericSubType { 5 | public single?: TOne; 6 | public single2?: string; 7 | public enumerable?: TOne[]; 8 | public list?: TTwo[]; 9 | public stringList?: string[]; 10 | } 11 | 12 | // outputid:f489d528-1077-4d58-83a4-45c2926a2206 13 | -------------------------------------------------------------------------------- /Tests/Net6/Output/generic-sub-type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class GenericSubType { 5 | public single?: TOne; 6 | public single2?: string; 7 | public enumerable?: TOne[]; 8 | public list?: TTwo[]; 9 | public stringList?: string[]; 10 | } 11 | 12 | // outputid:0aacfb49-66dd-4b19-94db-18e7cc1628c0 13 | -------------------------------------------------------------------------------- /Tests/Net7/Output/generic-sub-type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class GenericSubType { 5 | public single?: TOne; 6 | public single2?: string; 7 | public enumerable?: TOne[]; 8 | public list?: TTwo[]; 9 | public stringList?: string[]; 10 | } 11 | 12 | // outputid:6efc183e-a677-4cf2-bd36-b22c0bb466ce 13 | -------------------------------------------------------------------------------- /Tests/v10/TypesAnnotationsNullableDisabled/Output/generic-sub-type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export interface GenericSubType { 5 | single?: TOne; 6 | single2?: string; 7 | enumerable?: TOne[]; 8 | list?: TTwo[]; 9 | stringList?: string[]; 10 | } 11 | 12 | // outputid:88210355-ddb5-4bf6-a426-81493e839d4e 13 | -------------------------------------------------------------------------------- /TypeScript.Generator/Templates/ConstructorTemplate.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator.Templates; 2 | 3 | namespace KY.Generator.TypeScript.Templates 4 | { 5 | public class ConstructorTemplate : MethodTemplate 6 | { 7 | public ConstructorTemplate(ClassTemplate classTemplate) 8 | : base(classTemplate, "constructor", null) 9 | { } 10 | } 11 | } -------------------------------------------------------------------------------- /Common.Generator/Configurations/IModelConfiguration.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace KY.Generator.Configurations 4 | { 5 | public interface IModelConfiguration 6 | { 7 | string Name { get; set; } 8 | string Namespace { get; } 9 | string RelativePath { get; } 10 | List Usings { get; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Common.Generator/Templates/Extensions/CommentTemplateExtension.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Templates.Extensions 2 | { 3 | public static class CommentTemplateExtension 4 | { 5 | public static bool IsEmpty(this CommentTemplate comment) 6 | { 7 | return comment == null || string.IsNullOrEmpty(comment.Description); 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ServiceFromAspNetCore/ClientApp/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /Examples/AspDotNet/WebApi.Attributes/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Http; 2 | 3 | namespace KY.Generator.Examples.AspDotNet 4 | { 5 | public class WebApiApplication : System.Web.HttpApplication 6 | { 7 | protected void Application_Start() 8 | { 9 | GlobalConfiguration.Configure(WebApiConfig.Register); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Tests/AnnotationsWithMultipleOutputs/FirstType.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | namespace AnnotationsWithMultipleOutputs 4 | { 5 | [GenerateAngularModel("Output\\First")] 6 | [GenerateNoHeader] 7 | public class FirstType 8 | { 9 | public string StringProperty { get; set; } 10 | public SubType SubTypeProperty { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Tests/Derive/Output/derive-from-interface-prefer-interface.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | import { IBaseInterface } from "./base-interface.interface"; 5 | 6 | export interface DeriveFromInterfacePreferInterface extends IBaseInterface { 7 | stringProperty?: string | undefined; 8 | } 9 | 10 | // outputid:e818f5ca-e427-4c1c-baf2-38476bfa9665 11 | -------------------------------------------------------------------------------- /Tests/SignalR/ClientApp/src/app/counter/counter.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-counter-component', 5 | templateUrl: './counter.component.html' 6 | }) 7 | export class CounterComponent { 8 | public currentCount = 0; 9 | 10 | public incrementCounter() { 11 | this.currentCount++; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Common.Generator/Command/IGeneratorCommand.cs: -------------------------------------------------------------------------------- 1 | namespace KY.Generator.Command; 2 | 3 | public interface IGeneratorCommand 4 | { 5 | GeneratorCommandParameters Parameters { get; } 6 | List OriginalParameters { get; set; } 7 | 8 | bool Parse(); 9 | void Prepare(); 10 | void FollowUp(); 11 | Task Run(); 12 | } 13 | -------------------------------------------------------------------------------- /Common.Generator/Writers/BlankLineWriter.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator.Output; 2 | using KY.Generator.Templates; 3 | 4 | namespace KY.Generator.Writers 5 | { 6 | public class BlankLineWriter : ITemplateWriter 7 | { 8 | public virtual void Write(ICodeFragment fragment, IOutputCache output) 9 | { 10 | output.BreakLine(); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Common.Generator/Writers/NullValueWriter.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator.Output; 2 | using KY.Generator.Templates; 3 | 4 | namespace KY.Generator.Writers 5 | { 6 | public class NullValueWriter : ITemplateWriter 7 | { 8 | public virtual void Write(ICodeFragment fragment, IOutputCache output) 9 | { 10 | output.Add("null"); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Tests/AnnotationsWithMultipleOutputs/SecondType.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator; 2 | 3 | namespace AnnotationsWithMultipleOutputs 4 | { 5 | [GenerateAngularModel("Output\\Second")] 6 | [GenerateNoHeader] 7 | public class SecondType 8 | { 9 | public string StringProperty { get; set; } 10 | public SubType SubTypeProperty { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Tests/Derive/Output/base-class.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class BaseClass { 5 | public newStringProperty?: string; 6 | public virtualStringProperty?: string; 7 | 8 | public constructor(init?: Partial) { 9 | Object.assign(this, init); 10 | } 11 | } 12 | 13 | // outputid:e818f5ca-e427-4c1c-baf2-38476bfa9665 14 | -------------------------------------------------------------------------------- /Tests/Fluent/Fluent.Generator/Output/Models/type-with-ignored-base.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class TypeWithIgnoredBase { 5 | public property?: string; 6 | 7 | public constructor(init?: Partial) { 8 | Object.assign(this, init); 9 | } 10 | } 11 | 12 | // outputid:f32fd57a-e5ce-4ae5-97bc-bbca02f65904 13 | -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/src/app/convert-to-interface/models/convert-me-optional.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export interface ConvertMeOptional { 5 | stringProperty?: string; 6 | intProperty?: number; 7 | doubleProperty?: number; 8 | dateTimeProperty?: Date; 9 | } 10 | 11 | // outputid:627408ca-a818-4326-b843-415f5bbfb028 12 | -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/src/app/date/models/date-model.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class DateModel { 5 | public id?: string; 6 | public date?: Date; 7 | 8 | public constructor(init?: Partial) { 9 | Object.assign(this, init); 10 | } 11 | } 12 | 13 | // outputid:627408ca-a818-4326-b843-415f5bbfb028 14 | -------------------------------------------------------------------------------- /Tests/WebApiFluent/ClientApp/src/app/counter/counter.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-counter-component', 5 | templateUrl: './counter.component.html' 6 | }) 7 | export class CounterComponent { 8 | public currentCount = 0; 9 | 10 | public incrementCounter() { 11 | this.currentCount++; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /TypeScript.Generator/Writers/TypeScriptNamespaceWriter.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator.Writers; 2 | 3 | namespace KY.Generator.TypeScript.Writers 4 | { 5 | public class TypeScriptNamespaceWriter : NamespaceWriter 6 | { 7 | public TypeScriptNamespaceWriter() 8 | { 9 | this.NamespaceKeyword = "export namespace"; 10 | } 11 | 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Examples/Angular/Annotation/ServiceFromAspNetCoreSignalRHub/ClientApp/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /Tests/Caseing.Generator/Output/keep-my-case.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class KeepMyCase { 5 | public StringProperty?: string; 6 | public Number_Property?: number; 7 | 8 | public constructor(init?: Partial) { 9 | Object.assign(this, init); 10 | } 11 | } 12 | 13 | // outputid:f7601c4b-055c-4bd5-a087-b514d1dde023 14 | -------------------------------------------------------------------------------- /Tests/Fluent/Fluent.Generator/Output/Models/generic-interface-with-non-generic-base.interface.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | import { IInterface } from "./interface.interface"; 5 | 6 | export interface IGenericInterfaceWithNonGenericBase extends IInterface { 7 | genericProperty?: T; 8 | } 9 | 10 | // outputid:f32fd57a-e5ce-4ae5-97bc-bbca02f65904 11 | -------------------------------------------------------------------------------- /Tests/SignalR/ClientApp/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | 3 | /* Provide sufficient contrast against white background */ 4 | a { 5 | color: #0366d6; 6 | } 7 | 8 | code { 9 | color: #e01a76; 10 | } 11 | 12 | .btn-primary { 13 | color: #fff; 14 | background-color: #1b6ec2; 15 | border-color: #1861ac; 16 | } 17 | -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/src/app/counter/counter.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-counter-component', 5 | templateUrl: './counter.component.html' 6 | }) 7 | export class CounterComponent { 8 | public currentCount = 0; 9 | 10 | public incrementCounter() { 11 | this.currentCount++; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/src/app/edge-cases/models/date-model.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class DateModel { 5 | public id?: string; 6 | public date?: Date; 7 | 8 | public constructor(init?: Partial) { 9 | Object.assign(this, init); 10 | } 11 | } 12 | 13 | // outputid:627408ca-a818-4326-b843-415f5bbfb028 14 | -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/src/app/edge-cases/models/exclusive-generic-complex-result.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class ExclusiveGenericComplexResult { 5 | public constructor(init?: Partial) { 6 | Object.assign(this, init); 7 | } 8 | } 9 | 10 | // outputid:627408ca-a818-4326-b843-415f5bbfb028 11 | -------------------------------------------------------------------------------- /Tests/WebApiFluent/ClientApp/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "types": [ 6 | "jasmine", 7 | "node" 8 | ] 9 | }, 10 | "files": [ 11 | "test.ts", 12 | "polyfills.ts" 13 | ], 14 | "include": [ 15 | "**/*.spec.ts", 16 | "**/*.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /TypeScript.Generator/Transfer/TypeScriptIndexFile.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using KY.Generator.Transfer; 3 | 4 | namespace KY.Generator.TypeScript.Transfer 5 | { 6 | public class TypeScriptIndexFile : ITransferObject 7 | { 8 | public string RelativePath { get; set; } 9 | public List Lines { get; } = new(); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /Common.Generator/Writers/NullConditionalWriter.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator.Output; 2 | using KY.Generator.Templates; 3 | 4 | namespace KY.Generator.Writers 5 | { 6 | public class NullConditionalWriter : ITemplateWriter 7 | { 8 | public virtual void Write(ICodeFragment fragment, IOutputCache output) 9 | { 10 | output.Add("?"); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Common/Annotations/GenerateIgnoreAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace KY.Generator 4 | { 5 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method, Inherited = false)] 6 | public class GenerateIgnoreAttribute : Attribute 7 | { } 8 | } 9 | -------------------------------------------------------------------------------- /Json.Generator/Language/JsonLanguage.cs: -------------------------------------------------------------------------------- 1 | using KY.Generator.Languages; 2 | 3 | namespace KY.Generator.Json.Language 4 | { 5 | public class JsonLanguage : EmptyLanguage 6 | { 7 | public static JsonLanguage Instance { get; } = new JsonLanguage(); 8 | 9 | public override string Name => "Json"; 10 | 11 | private JsonLanguage() 12 | { } 13 | } 14 | } -------------------------------------------------------------------------------- /Tests/SignalR/ClientApp/src/app/nav-menu/nav-menu.component.css: -------------------------------------------------------------------------------- 1 | a.navbar-brand { 2 | white-space: normal; 3 | text-align: center; 4 | word-break: break-all; 5 | } 6 | 7 | html { 8 | font-size: 14px; 9 | } 10 | @media (min-width: 768px) { 11 | html { 12 | font-size: 16px; 13 | } 14 | } 15 | 16 | .box-shadow { 17 | box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); 18 | } 19 | -------------------------------------------------------------------------------- /Tests/WebApiController/ClientApp/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "types": [ 6 | "jasmine", 7 | "node" 8 | ] 9 | }, 10 | "files": [ 11 | "test.ts", 12 | "polyfills.ts" 13 | ], 14 | "include": [ 15 | "**/*.spec.ts", 16 | "**/*.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /Tests/WebApiFluent/ClientApp/e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po'; 2 | 3 | describe('App', () => { 4 | let page: AppPage; 5 | 6 | beforeEach(() => { 7 | page = new AppPage(); 8 | }); 9 | 10 | it('should display welcome message', () => { 11 | page.navigateTo(); 12 | expect(page.getMainHeading()).toEqual('Hello, world!'); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /Tests/WebApiFluent/ClientApp/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | 3 | /* Provide sufficient contrast against white background */ 4 | a { 5 | color: #0366d6; 6 | } 7 | 8 | code { 9 | color: #e01a76; 10 | } 11 | 12 | .btn-primary { 13 | color: #fff; 14 | background-color: #1b6ec2; 15 | border-color: #1861ac; 16 | } 17 | -------------------------------------------------------------------------------- /Tests/WebApiFluent/WeatherForecast.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace WebApiFluent 4 | { 5 | public class WeatherForecast 6 | { 7 | public DateTime Date { get; set; } 8 | 9 | public int TemperatureC { get; set; } 10 | 11 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); 12 | 13 | public string Summary { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /Tests/v10/InheritanceAnnotationsNullableDisabled/Output/base.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // tslint:disable 3 | 4 | export class Base { 5 | public stringField?: string; 6 | public stringProperty?: string; 7 | 8 | public constructor(init?: Partial) { 9 | Object.assign(this, init); 10 | } 11 | } 12 | 13 | // outputid:605e91d7-ee13-4f1d-9b92-845bb3ace852 14 | --------------------------------------------------------------------------------