| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- //----------------------------------------------------------------
- //Module Name: $safeprojectname$
- //Purpose:
- //CopyRight: Muchinfo
- //History:
- //----------------------------------------------------------------
- //DateTime 2016/10/24 16:28:09
- //Author
- //Description Create
- //----------------------------------------------------------------
- using Muchinfo.MTPClient.Data.Enums;
- using Muchinfo.MTPClient.Infrastructure.LinkProxy;
- namespace Muchinfo.MTPClient.Infrastructure.Utilities
- {
- public class QuoteProxyHelper
- {
- /// <summary>
- /// 行情订阅
- /// </summary>
- /// <param name="quoteScr"></param>
- public static void QuoteSubscribe(GoodsFromScr quoteScr)
- {
- switch (quoteScr)
- {
- case GoodsFromScr.All:
- if (LinkManager.Instance.GuestQuoteTcpLinkProxy != null)
- {
- LinkManager.Instance.GuestQuoteTcpLinkProxy.Subscribe();
- }
- if (LinkManager.Instance.QuoteTcpLinkProxy != null)
- {
- LinkManager.Instance.QuoteTcpLinkProxy.Subscribe();
- }
- break;
- case GoodsFromScr.Trade:
- if (LinkManager.Instance.QuoteTcpLinkProxy != null)
- {
- LinkManager.Instance.QuoteTcpLinkProxy.Subscribe();
- }
- break;
- case GoodsFromScr.Brown:
- if (LinkManager.Instance.GuestQuoteTcpLinkProxy != null)
- {
- LinkManager.Instance.GuestQuoteTcpLinkProxy.Subscribe();
- }
- break;
- default:
- break;
- }
- }
- /// <summary>
- /// 行情清盘
- /// </summary>
-
- public static void QuoteClear(GoodsFromScr quoteScr)
- {
- switch (quoteScr)
- {
- case GoodsFromScr.All:
- if (LinkManager.Instance.GuestQuoteTcpLinkProxy != null)
- {
- LinkManager.Instance.GuestQuoteTcpLinkProxy.ClearQuote();
- }
- if (LinkManager.Instance.QuoteTcpLinkProxy != null)
- {
- LinkManager.Instance.QuoteTcpLinkProxy.ClearQuote();
- }
- break;
- case GoodsFromScr.Trade:
- if (LinkManager.Instance.QuoteTcpLinkProxy != null)
- {
- LinkManager.Instance.QuoteTcpLinkProxy.ClearQuote();
- }
- break;
- case GoodsFromScr.Brown:
- if (LinkManager.Instance.GuestQuoteTcpLinkProxy != null)
- {
- LinkManager.Instance.GuestQuoteTcpLinkProxy.ClearQuote();
- }
- break;
- default:
- break;
- }
- }
- /// <summary>
- /// 取商品盘面
- /// </summary>
- /// <param name="quoteScr"></param>
- public static void QueryDayQuote(GoodsFromScr quoteScr)
- {
- switch (quoteScr)
- {
- case GoodsFromScr.All:
- if (LinkManager.Instance.GuestQuoteTcpLinkProxy != null)
- {
- LinkManager.Instance.GuestQuoteTcpLinkProxy.QueryDayQuote();
- }
- if (LinkManager.Instance.QuoteTcpLinkProxy != null)
- {
- LinkManager.Instance.QuoteTcpLinkProxy.QueryDayQuote();
- }
- break;
- case GoodsFromScr.Trade:
- if (LinkManager.Instance.QuoteTcpLinkProxy != null)
- {
- LinkManager.Instance.QuoteTcpLinkProxy.QueryDayQuote();
- }
- break;
- case GoodsFromScr.Brown:
- if (LinkManager.Instance.GuestQuoteTcpLinkProxy != null)
- {
- LinkManager.Instance.GuestQuoteTcpLinkProxy.QueryDayQuote();
- }
- break;
- default:
- break;
- }
- }
- }
- }
|