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 Encoding ConnectionEncoding
|
---|
38 | {
|
---|
39 | get;
|
---|
40 | set;
|
---|
41 | }
|
---|
42 |
|
---|
43 | public override void Close()
|
---|
44 | {
|
---|
45 | this.SessionConnection.Close();
|
---|
46 | }
|
---|
47 |
|
---|
48 | private BMXNetSessionConnection _sessionConnection = null;
|
---|
49 |
|
---|
50 | public BMXNetSessionConnection SessionConnection
|
---|
51 | {
|
---|
52 | get { return _sessionConnection; }
|
---|
53 | set { _sessionConnection = value; }
|
---|
54 | }
|
---|
55 |
|
---|
56 | protected override string SendReceiveString(string sendString, string multi)
|
---|
57 | {
|
---|
58 | return this.DecodeReceiveString(this.SessionConnection.TransmitRPC("CIABMX", this.EncodeSendString(sendString, multi)));
|
---|
59 | }
|
---|
60 |
|
---|
61 | public override string GetLoginFacility(String aDuz)
|
---|
62 | {
|
---|
63 | return this.SessionConnection.GetLoginFacility(aDuz);
|
---|
64 | }
|
---|
65 |
|
---|
66 | public override bool IsConnected
|
---|
67 | {
|
---|
68 | get
|
---|
69 | {
|
---|
70 | return this.SessionConnection.IsConnected;
|
---|
71 | }
|
---|
72 | }
|
---|
73 | }
|
---|
74 | }
|
---|