当前位置: 首页>>代码示例>>C#>>正文


C# RawMarketData.Clone方法代码示例

本文整理汇总了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);
        }
开发者ID:HongSeokHwan,项目名称:legacy,代码行数:11,代码来源:RawMarketDataTest.cs

示例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();
        }
开发者ID:HongSeokHwan,项目名称:legacy,代码行数:50,代码来源:POrder.cs


注:本文中的CoreLib.RawMarketData.Clone方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。