本文整理汇总了C#中CoreLib.RawMarketData.Clone方法的典型用法代码示例。如果您正苦于以下问题:C# RawMarketData.Clone方法的具体用法?C# RawMarketData.Clone怎么用?C# RawMarketData.Clone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CoreLib.RawMarketData
的用法示例。
在下文中一共展示了RawMarketData.Clone方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CloneTest
public void CloneTest()
{
RawMarketData origin = new RawMarketData(KospiFutureUtil.Ins().KFI.Code, Detail.ProductType.KospiFuture);
origin.BidCount1 = 10;
RawMarketData target = origin.Clone() as RawMarketData;
origin.BidCount1 = 20;
Assert.AreNotEqual(origin.BidCount1, target.BidCount1);
Assert.AreNotEqual(origin, target);
}
示例2: POrder
public POrder(
TradingDirection longShort,
String code,
long reqCount,
double reqPrice,
Account account,
RawMarketData rmdClone,
MarketType market,
Boolean bWeakLongBlock)
{
this.LongShort = longShort;
this.Code = code;
this.ReqCount = reqCount;
this.ReqPrice = reqPrice;
this.TargetAccount = account;
this.RMDClone = rmdClone.Clone() as RawMarketData; // 밖에서도 열심히 했겠지만 최종적으로 Clone을 저장하도록 한다.
this.Market = market;
this.IsWeakLongBlock = bWeakLongBlock;
this.InitReqPrice = reqPrice;
this.ContractedCount = 0;
this.CanceledCount = 0;
this.OrderNumber = -1;
this.AvgContractPrice = 0;
this.IsAllocatedYetRequestOrFree = true;
this.CreatedTime = DateTime.Now;
this.NoErrorOrderIn = false;
this.Comment = "";
this.ShortCutTargetOfContractCallBack = null;
this.EarlyUpdatedLongBlockCount = 0;
_bGotLastPacket = false;
// dependency가 있음(SetMarketType, SetcodeNoTail, SetLongBlock)
Boolean bSuccess1 = SetMarketType();
Boolean bSuccess2 = SetCodeNoTail(bSuccess1);
ConvertOverPriceToInRMDPriceIfNotZero();
SetLongBlock(bSuccess2);
POrderManager.Ins().Add(this);
ValidateInput();
}