Ejemplo n.º 1
0
		public void Unsubscribe(int requestId)
		{
			MsgUnsubscribe msgUnsubscribe = new MsgUnsubscribe();
			msgUnsubscribe.Data.RequestId = requestId;
			this.SendMessage(msgUnsubscribe);
		}
Ejemplo n.º 2
0
		protected Message CreateMessage(int type)
		{
			Message message;
			switch (type)
			{
				case 1100:
					message = new MsgCommand();
					break;
				case 1101:
					message = new MsgReport();
					break;
				case 1102:
					message = new MsgOrderCancelReject();
					break;
				case 2001:
					message = new MsgBrokerInfo();
					break;
				case 1:
					message = new MsgLogon();
					break;
				case 2:
					message = new MsgLogonStatus();
					break;
				case 3:
					message = new MsgHeartbeat();
					break;
				case 10:
					message = new MsgSubscribe();
					break;
				case 11:
					message = new MsgUnsubscribe();
					break;
				case 12:
					message = new MsgProviderError();
					break;
				case 13:
					message = new MsgSubscriptionStatus();
					break;
				case 1000:
					message = new MsgTick();
					break;
				case 1001:
					message = new MsgLevel2();
					break;
				default:
					message = new MsgUnknown(type);
					break;
			}
			return message;
		}