У меня есть очень большие файлы app.config с множеством привязок, и их очень сложно обрабатывать в нескольких средах.
Мой вопрос: есть ли способ определить «глобальные переменные» в файле app.config. Затем использовать эти «переменные» в привязке?
Ниже представлено то, что мне нужно.
Это возможно/поддерживается в app.config?
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<key name="SomeEndPointAddress" value="http://localhost/service.svc">
<key name="OtherEndPointAddress" value="http://localhost/OtherService.svc">
<system.serviceModel>
<endpoint
name="SomeEndPoint"
address= SomeEndPointAddress
binding="basicHttpBinding"
contract="Microsoft.ServiceModel.Samples.ICalculator" />
....
<endpoint
name="OtherEndPoint"
address= OtherEndPointAddress
binding="basicHttpBinding"
contract="Microsoft.ServiceModel.Samples.ICalculator" />
</client>
<bindings>
<basicHttpBinding/>
</bindings>
</system.serviceModel>
</configuration>