Skip to content
Anton Smirnov edited this page Jul 29, 2019 · 18 revisions

WCF-Generator.exe - конфигурируемый через файл настроек генератор кода, выполняющий следующие виды генерации:

Добавление новой генерилки

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