개정판 26ec6226
issue #00000 copy&Paste 수정
Change-Id: I05c6141221f180d7f53d8f19929ed32d56977085
IIpc/WcfServer.cs | ||
---|---|---|
12 | 12 |
{ |
13 | 13 |
public sealed class WcfServer : IIpcServer |
14 | 14 |
{ |
15 |
[ServiceBehavior(IncludeExceptionDetailInFaults = true,InstanceContextMode = InstanceContextMode.Single)]
|
|
15 |
[ServiceBehavior(IncludeExceptionDetailInFaults = false,InstanceContextMode = InstanceContextMode.Single)]
|
|
16 | 16 |
private class _Server : IIpcClient |
17 | 17 |
{ |
18 | 18 |
private readonly WcfServer server; |
... | ... | |
134 | 134 |
this.host.Open(); |
135 | 135 |
} |
136 | 136 |
|
137 |
public bool IsDispose |
|
138 |
{ |
|
139 |
get { return (this.host == null ? true : false); } |
|
140 |
} |
|
141 |
|
|
142 |
public bool IsOpen |
|
143 |
{ |
|
144 |
get { return (this.host?.State == CommunicationState.Opened ? true : false); } |
|
145 |
} |
|
146 |
|
|
137 | 147 |
public void Stop() |
138 | 148 |
{ |
139 |
this.host.Close(); |
|
149 |
try |
|
150 |
{ |
|
151 |
System.Diagnostics.Debug.WriteLine($"IIpc.WcfServer {this.host.BaseAddresses?.First()} Stop"); |
|
152 |
this.host.Close(new TimeSpan(1)); |
|
153 |
|
|
154 |
System.Diagnostics.Debug.WriteLine($"IIpc.WcfServer {this.host.BaseAddresses?.First()} Stoped"); |
|
155 |
|
|
156 |
} |
|
157 |
catch (Exception ex) |
|
158 |
{ |
|
159 |
System.Diagnostics.Debug.WriteLine(ex.ToString()); |
|
160 |
} |
|
140 | 161 |
} |
141 | 162 |
|
142 | 163 |
void IDisposable.Dispose() |
... | ... | |
144 | 165 |
this.Stop(); |
145 | 166 |
|
146 | 167 |
(this.host as IDisposable).Dispose(); |
168 |
|
|
169 |
System.Diagnostics.Debug.WriteLine($"IIpc.WcfServer {this.host.BaseAddresses?.First()} Dispose"); |
|
147 | 170 |
} |
148 | 171 |
} |
149 | 172 |
} |
내보내기 Unified diff