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
{
///
/// 行情订阅
///
///
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;
}
}
///
/// 行情清盘
///
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;
}
}
///
/// 取商品盘面
///
///
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;
}
}
}
}