개정판 0157b158
서비스 분산 컨버팅으로 수정
Change-Id: I72462e711e0c9e22880af7a2dc34b7215d3ce971
ConvertService/ServiceBase/Markus.Service.StationController/AppInit.cs | ||
---|---|---|
13 | 13 |
{ |
14 | 14 |
public partial class App : Application |
15 | 15 |
{ |
16 |
public static StationService.StationServiceClient StationClient;
|
|
16 |
public static List<StationService.StationServiceClient> StationClientList;
|
|
17 | 17 |
|
18 | 18 |
public App() |
19 | 19 |
{ |
... | ... | |
31 | 31 |
var config = ConfigHelper.AppConfig(configFileName); |
32 | 32 |
|
33 | 33 |
var serviceUri = config.GetValue("SERVICE", "ADDRESS", "http://Localhost:9101/StationService"); |
34 |
StationClientList = new List<StationServiceClient>(); |
|
35 |
|
|
36 |
foreach (var item in serviceUri.Split(',')) |
|
37 |
{ |
|
38 |
|
|
39 |
BasicHttpBinding myBinding = new BasicHttpBinding(); |
|
40 |
EndpointAddress myEndpoint = new EndpointAddress(UriHelper.UriCreate(item)); |
|
41 |
var StationClient = new StationService.StationServiceClient(myBinding, myEndpoint); |
|
42 |
|
|
43 |
StationClientList.Add(StationClient); |
|
44 |
} |
|
34 | 45 |
|
35 |
BasicHttpBinding myBinding = new BasicHttpBinding(); |
|
36 |
EndpointAddress myEndpoint = new EndpointAddress(UriHelper.UriCreate(serviceUri)); |
|
37 |
StationClient = new StationService.StationServiceClient(myBinding, myEndpoint); |
|
38 | 46 |
} |
39 | 47 |
catch (Exception ex) |
40 | 48 |
{ |
내보내기 Unified diff