-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Anton Smirnov edited this page Jul 29, 2019
·
18 revisions
WCF-Generator.exe - конфигурируемый через файл настроек генератор кода, выполняющий следующие виды генерации:
- WCF (Service references) - генерация клиента для WCF-сервиса
- Repository - генерация репозиториев DO объектов и объектов RowMapper
- Serialize
- Decorator class - генерация классов декораторов
- Mapping extensions - генераци маппинга моделей
WCF-Generator.exe запускается с одним параметром - путь к файлу конфигурации (app.config). Путь может быть относительным. Пример запуска через bat-файл:
..\..\Submodule.YumaPos.WcfGenerator\WCF-Generator.exe ..\..\WCF-Generator.exe.config
Каждый тип генерации настраивается через свою секцию в кофигурации
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
...
<configSections>
<!-- Cofiguration of generation wcf client-->
<section name="wcfClientGenerator"
type="WCFGenerator.WcfClientGeneration.Configuration.WcfClientGenerator, WCF-Generator"
allowLocation="false"
allowDefinition="Everywhere" />
<!-- Cofiguration of generation repositories-->
<section name="repositoryGenerator"
type="WCFGenerator.RepositoriesGeneration.Configuration.RepositoryGenerator, WCF-Generator"
allowLocation="false"
allowDefinition="Everywhere" />
<!-- Cofiguration of generation serialize-->
<section name="serialize"
type="WCFGenerator.SerializeGeneration.Configuration.SerializeConfiguration, WCF-Generator" />
<!-- Cofiguration of generation decorators-->
<section name="decoratorGenerator" type="WCFGenerator.DecoratorGeneration.Configuration.DecoratorGenerator, WCF-Generator" />
</configSections>
...
</configuration>
Общая для всех генераторов настройка - путь к решению, относительный (относительно расположения файла конфигурации) и можно указывать полный путь
<appSettings>
<add key="SolutionPath" value="YumaPos.Server.WCF.sln" />
</appSettings>
Developers: Denis Evseev, Anton Smirnov, Anton Suhorukov