1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Text;
|
---|
4 |
|
---|
5 | namespace IndianHealthService.BMXNet.Services
|
---|
6 | {
|
---|
7 | /// <summary>
|
---|
8 | /// To test the BMXNetBroker class, we can use one instance of BMXNetBroker
|
---|
9 | /// to be the authenicated transport and use the receiver to be the
|
---|
10 | /// encapsulated BMX interaction.
|
---|
11 | /// </summary>
|
---|
12 | internal class BMXNetSessionConnectionOverAnotherSessionConnection : BMXNetSessionConnection
|
---|
13 | {
|
---|
14 | public static BMXNetSessionConnectionOverAnotherSessionConnection OpenOn(BMXNetBroker aBroker,BMXNetSessionConnection aConnection)
|
---|
15 | {
|
---|
16 | BMXNetSessionConnectionOverAnotherSessionConnection answer = new BMXNetSessionConnectionOverAnotherSessionConnection(aBroker);
|
---|
17 | answer.SessionConnection = aConnection;
|
---|
18 | return answer;
|
---|
19 | }
|
---|
20 |
|
---|
21 | public BMXNetSessionConnectionOverAnotherSessionConnection(BMXNetBroker aBroker):base(aBroker) {
|
---|
22 |
|
---|
23 | }
|
---|
24 |
|
---|
25 | public override int ReceiveTimeout
|
---|
26 | {
|
---|
27 | get { return this.SessionConnection.ReceiveTimeout; }
|
---|
28 | set { this.SessionConnection.ReceiveTimeout = value; }
|
---|
29 | }
|
---|
30 |
|
---|
31 | public override int SendTimeout
|
---|
32 | {
|
---|
33 | get { return this.SessionConnection.SendTimeout; }
|
---|
34 | set { this.SessionConnection.SendTimeout = value; }
|
---|
35 | }
|
---|
36 |
|
---|
37 | public override void Close()
|
---|
38 | {
|
---|
39 | this.SessionConnection.Close();
|
---|
40 | }
|
---|
41 |
|
---|
42 | private BMXNetSessionConnection _sessionConnection = null;
|
---|
43 |
|
---|
44 | public BMXNetSessionConnection SessionConnection
|
---|
45 | {
|
---|
46 | get { return _sessionConnection; }
|
---|
47 | set { _sessionConnection = value; }
|
---|
48 | }
|
---|
49 |
|
---|
50 | protected override string SendReceiveString(string sendString, string multi)
|
---|
51 | {
|
---|
52 | return this.DecodeReceiveString(this.SessionConnection.TransmitRPC("CIABMX", this.EncodeSendString(sendString, multi)));
|
---|
53 | }
|
---|
54 |
|
---|
55 | public override string GetLoginFacility(String aDuz)
|
---|
56 | {
|
---|
57 | return this.SessionConnection.GetLoginFacility(aDuz);
|
---|
58 | }
|
---|
59 |
|
---|
60 | public override bool IsConnected
|
---|
61 | {
|
---|
62 | get
|
---|
63 | {
|
---|
64 | return this.SessionConnection.IsConnected;
|
---|
65 | }
|
---|
66 | }
|
---|
67 | }
|
---|
68 | }
|
---|