• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IdGenerator类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IdGenerator的典型用法代码示例。如果您正苦于以下问题:C# IdGenerator类的具体用法?C# IdGenerator怎么用?C# IdGenerator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IdGenerator类属于命名空间,在下文中一共展示了IdGenerator类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: SterlingMessageAdapter

		/// <summary>
		/// Initializes a new instance of the <see cref="SterlingMessageAdapter"/>.
		/// </summary>
		/// <param name="transactionIdGenerator">Transaction id generator.</param>
		public SterlingMessageAdapter(IdGenerator transactionIdGenerator)
			: base(transactionIdGenerator)
		{
			this.AddMarketDataSupport();
			this.AddTransactionalSupport();
			this.RemoveSupportedMessage(MessageTypes.SecurityLookup);
		}
开发者ID:RakotVT,项目名称:StockSharp,代码行数:11,代码来源:SterlingMessageAdapter.cs


示例2: RithmicMessageAdapter

		/// <summary>
		/// Initializes a new instance of the <see cref="RithmicMessageAdapter"/>.
		/// </summary>
		/// <param name="transactionIdGenerator">Transaction id generator.</param>
		public RithmicMessageAdapter(IdGenerator transactionIdGenerator)
			: base(transactionIdGenerator)
		{
			this.AddMarketDataSupport();
			this.AddTransactionalSupport();
			this.AddSupportedMessage(MessageTypes.ChangePassword);
		}
开发者ID:RakotVT,项目名称:StockSharp,代码行数:11,代码来源:RithmicMessageAdapter.cs


示例3: RssMarketDataMessageAdapter

		/// <summary>
		/// Создать <see cref="RssMarketDataMessageAdapter"/>.
		/// </summary>
		/// <param name="transactionIdGenerator">Генератор идентификаторов транзакций.</param>
		public RssMarketDataMessageAdapter(IdGenerator transactionIdGenerator)
			: base(transactionIdGenerator)
		{
			HeartbeatInterval = TimeSpan.FromMinutes(5);
			
			this.AddSupportedMessage(MessageTypes.MarketData);
		}
开发者ID:reddream,项目名称:StockSharp,代码行数:11,代码来源:RssMarketDataMessageAdapter.cs


示例4: SmartComMessageAdapter

		/// <summary>
		/// Создать <see cref="SmartComMessageAdapter"/>.
		/// </summary>
		/// <param name="transactionIdGenerator">Генератор идентификаторов транзакций.</param>
		public SmartComMessageAdapter(IdGenerator transactionIdGenerator)
			: base(transactionIdGenerator)
		{
			Version = SmartComVersions.V3;

			SecurityClassInfo.Add("OPT", RefTuple.Create(SecurityTypes.Option, ExchangeBoard.Forts.Code));
			SecurityClassInfo.Add("OPTM", RefTuple.Create(SecurityTypes.Option, ExchangeBoard.Forts.Code));
			SecurityClassInfo.Add("FUT", RefTuple.Create(SecurityTypes.Future, ExchangeBoard.Forts.Code));
			SecurityClassInfo.Add("FXMFD", RefTuple.Create(SecurityTypes.Currency, ExchangeBoard.Mfd.Code));
			SecurityClassInfo.Add("WFMFD", RefTuple.Create(SecurityTypes.Index, ExchangeBoard.Mfd.Code));
			SecurityClassInfo.Add("WIMFD", RefTuple.Create(SecurityTypes.Index, ExchangeBoard.Mfd.Code));
			SecurityClassInfo.Add("EQBR", RefTuple.Create(SecurityTypes.Stock, ExchangeBoard.MicexEqbr.Code));
			SecurityClassInfo.Add("TQBR", RefTuple.Create(SecurityTypes.Stock, ExchangeBoard.MicexTqbr.Code));
			SecurityClassInfo.Add("TQNE", RefTuple.Create(SecurityTypes.Stock, ExchangeBoard.MicexTqne.Code));
			SecurityClassInfo.Add("EQNE", RefTuple.Create(SecurityTypes.Stock, ExchangeBoard.MicexEqne.Code));
			SecurityClassInfo.Add("EQOB", RefTuple.Create(SecurityTypes.Bond, ExchangeBoard.MicexEqob.Code));
			SecurityClassInfo.Add("EQNB", RefTuple.Create(SecurityTypes.Bond, ExchangeBoard.MicexEqnb.Code));
			SecurityClassInfo.Add("EQDB", RefTuple.Create(SecurityTypes.Bond, ExchangeBoard.MicexEqdb.Code));
			SecurityClassInfo.Add("EQOS", RefTuple.Create(SecurityTypes.Bond, ExchangeBoard.MicexEqos.Code));
			SecurityClassInfo.Add("TQOB", RefTuple.Create(SecurityTypes.Bond, ExchangeBoard.MicexTqob.Code));
			SecurityClassInfo.Add("TQLV", RefTuple.Create(SecurityTypes.Stock, ExchangeBoard.MicexTqlv.Code));

			PortfolioBoardCodes = new Dictionary<string, string>
			{
			    { "EQ", ExchangeBoard.MicexEqbr.Code },
			    { "FOB", ExchangeBoard.MicexFbcb.Code },
			    { "RTS_FUT", ExchangeBoard.Forts.Code },
			};

			UpdatePlatform();

			this.AddMarketDataSupport();
			this.AddTransactionalSupport();
			this.RemoveSupportedMessage(MessageTypes.OrderStatus);
		}
开发者ID:AlexYurasov,项目名称:StockSharp,代码行数:39,代码来源:SmartComMessageAdapter.cs


示例5: GameScene

 public GameScene()
 {
     objects = new MyContainer<PivotObject>(100, 10);
     VisibleObjects = new MyContainer<PivotObject>(100, 2);
     ShadowObjects = new MyContainer<PivotObject>(100, 2);
     sceneGraph = new SceneGraph.SceneGraph(this);
     idgenertor = new IdGenerator(0);
 }
开发者ID:KatekovAnton,项目名称:ResourceCollector,代码行数:8,代码来源:GameScene.cs


示例6: CacheFixture

            public CacheFixture()
            {
                IdGenerator = new IdGenerator();
                ObjectGraph = new ObjectGraph();
                MaterializationHooks = Enumerable.Empty<IMaterializationHook>();

                Cache = new Cache(IdGenerator, ObjectGraph, MaterializationHooks);
            }
开发者ID:Tatooine,项目名称:FakeDb,代码行数:8,代码来源:CacheFacts.cs


示例7: ETradeMessageAdapter

		/// <summary>
		/// Initializes a new instance of the <see cref="ETradeMessageAdapter"/>.
		/// </summary>
		/// <param name="transactionIdGenerator">Transaction id generator.</param>
		public ETradeMessageAdapter(IdGenerator transactionIdGenerator)
			: base(transactionIdGenerator)
		{
			this.AddMarketDataSupport();
			this.AddTransactionalSupport();

			this.RemoveSupportedMessage(MessageTypes.PortfolioLookup);
		}
开发者ID:hbwjz,项目名称:StockSharp,代码行数:12,代码来源:ETradeMessageAdapter.cs


示例8: OandaMessageAdapter

		/// <summary>
		/// Создать <see cref="OandaMessageAdapter"/>.
		/// </summary>
		/// <param name="transactionIdGenerator">Генератор идентификаторов транзакций.</param>
		public OandaMessageAdapter(IdGenerator transactionIdGenerator)
			: base(transactionIdGenerator)
		{
			HeartbeatInterval = TimeSpan.FromSeconds(60);

			this.AddMarketDataSupport();
			this.AddTransactionalSupport();
		}
开发者ID:rudrp,项目名称:StockSharp,代码行数:12,代码来源:OandaMessageAdapter.cs


示例9: InteractiveBrokersMessageAdapter

		/// <summary>
		/// Initializes a new instance of the <see cref="InteractiveBrokersMessageAdapter"/>.
		/// </summary>
		/// <param name="transactionIdGenerator">Transaction id generator.</param>
		public InteractiveBrokersMessageAdapter(IdGenerator transactionIdGenerator)
			: base(transactionIdGenerator)
		{
			Address = DefaultAddress;
			ServerLogLevel = ServerLogLevels.Detail;

			this.AddMarketDataSupport();
			this.AddTransactionalSupport();
		}
开发者ID:hbwjz,项目名称:StockSharp,代码行数:13,代码来源:InteractiveBrokersMessageAdapter.cs


示例10: MessageAdapter

		/// <summary>
		/// Initialize <see cref="MessageAdapter"/>.
		/// </summary>
		/// <param name="transactionIdGenerator">Transaction id generator.</param>
		protected MessageAdapter(IdGenerator transactionIdGenerator)
		{
			if (transactionIdGenerator == null)
				throw new ArgumentNullException("transactionIdGenerator");

			Platform = Platforms.AnyCPU;

			TransactionIdGenerator = transactionIdGenerator;
			SecurityClassInfo = new Dictionary<string, RefPair<SecurityTypes, string>>();
		}
开发者ID:yadrewn,项目名称:StockSharpShared_Before2016_05_25,代码行数:14,代码来源:MessageAdapter.cs


示例11: BitStampMessageAdapter

		/// <summary>
		/// Создать <see cref="BitStampMessageAdapter"/>.
		/// </summary>
		/// <param name="transactionIdGenerator">Генератор идентификаторов транзакций.</param>
		public BitStampMessageAdapter(IdGenerator transactionIdGenerator)
			: base(transactionIdGenerator)
		{
			// https://www.bitstamp.net/api/
			// Do not make more than 600 request per 10 minutes or we will ban your IP address.
			HeartbeatInterval = TimeSpan.FromSeconds(1);

			this.AddMarketDataSupport();
			this.AddTransactionalSupport();
		}
开发者ID:osya,项目名称:StockSharp,代码行数:14,代码来源:BitStampMessageAdapter.cs


示例12: Constructor_Throws_OnTimestampWraparound

        public void Constructor_Throws_OnTimestampWraparound()
        {
            var mc = MaskConfig.Default;
            var ts = new MockTimeSource(mc.WraparoundDate(TESTEPOCH).AddMilliseconds(-1));  //Set clock to 1 ms before epoch
            var g = new IdGenerator(0, TESTEPOCH, MaskConfig.Default, ts);

            Assert.IsTrue(g.CreateId() > 0);   //Should succeed;
            ts.NextTick();
            g.CreateId();   //Should fail
        }
开发者ID:BuddyTV,项目名称:IdGen,代码行数:10,代码来源:IdGenTests.cs


示例13: LuaFixTransactionMessageAdapter

		/// <summary>
		/// Создать <see cref="LuaFixTransactionMessageAdapter"/>.
		/// </summary>
		/// <param name="transactionIdGenerator">Генератор идентификаторов транзакций.</param>
		public LuaFixTransactionMessageAdapter(IdGenerator transactionIdGenerator)
			: base(transactionIdGenerator)
		{
			this.RemoveMarketDataSupport();

			Login = "quik";
			Password = "quik".To<SecureString>();
			Address = QuikTrader.DefaultLuaAddress;
			TargetCompId = "StockSharpTS";
			SenderCompId = "quik";
			//ExchangeBoard = ExchangeBoard.Forts;
			RequestAllPortfolios = true;
		}
开发者ID:jsonbao,项目名称:StockSharp,代码行数:17,代码来源:LuaFixTransactionMessageAdapter.cs


示例14: UpdatesState

        public void UpdatesState()
        {
            toTest = new IdGenerator();
            StoreNewObject();
            toTest = new IdGenerator();
            StoreNewObject();

            toTest = new IdGenerator();
            using (var container = NewInstance())
            {
                Assert.AreEqual( 3,Increment(container));
            }
        }
开发者ID:masroore,项目名称:db4o-extras,代码行数:13,代码来源:TestAutoIncrementGenerator.cs


示例15: StoresState

        public void StoresState()
        {
            using (var container1 = NewInstance())
            {
                toTest.NextId(typeof(WithAutoIDs), container1);
                toTest.StoreState(container1);
            }

            toTest = new IdGenerator();
            using (var container2 = NewInstance())
            {
                Assert.AreEqual(Increment(container2), 2);
            }
        }
开发者ID:masroore,项目名称:db4o-extras,代码行数:14,代码来源:TestAutoIncrementGenerator.cs


示例16: AlfaDirectMessageAdapter

		/// <summary>
		/// Создать <see cref="AlfaDirectMessageAdapter"/>.
		/// </summary>
		/// <param name="transactionIdGenerator">Генератор идентификаторов транзакций.</param>
		public AlfaDirectMessageAdapter(IdGenerator transactionIdGenerator)
			: base(transactionIdGenerator)
		{
			Platform = Platforms.x86;

			this.AddMarketDataSupport();
			this.AddTransactionalSupport();

			SecurityClassInfo.Add("FORTS", RefTuple.Create(SecurityTypes.Stock, ExchangeBoard.Forts.Code));
			SecurityClassInfo.Add("INDEX", RefTuple.Create(SecurityTypes.Index, ExchangeBoard.Micex.Code));
			SecurityClassInfo.Add("INDEX2", RefTuple.Create(SecurityTypes.Index, "INDEX"));
			SecurityClassInfo.Add("MICEX_SHR_T", RefTuple.Create(SecurityTypes.Stock, ExchangeBoard.Micex.Code));
			SecurityClassInfo.Add("RTS_STANDARD", RefTuple.Create(SecurityTypes.Stock, ExchangeBoard.Forts.Code));
		}
开发者ID:RakotVT,项目名称:StockSharp,代码行数:18,代码来源:AlfaDirectMessageAdapter.cs


示例17: EmulationMessageAdapter

		/// <summary>
		/// Создать <see cref="EmulationMessageAdapter"/>.
		/// </summary>
		/// <param name="emulator">Эмулятор торгов.</param>
		/// <param name="transactionIdGenerator">Генератор идентификаторов транзакций.</param>
		public EmulationMessageAdapter(IMarketEmulator emulator, IdGenerator transactionIdGenerator)
			: base(transactionIdGenerator)
		{
			Emulator = emulator;

			this.AddTransactionalSupport();
			this.AddSupportedMessage(MessageTypes.Security);
			this.AddSupportedMessage(MessageTypes.Board);
			this.AddSupportedMessage(MessageTypes.Level1Change);
			this.AddSupportedMessage(MessageTypes.PortfolioChange);
			this.AddSupportedMessage(MessageTypes.PositionChange);
			this.AddSupportedMessage(ExtendedMessageTypes.CommissionRule);
			this.AddSupportedMessage(ExtendedMessageTypes.Clearing);
			this.AddSupportedMessage(ExtendedMessageTypes.Generator);
		}
开发者ID:reddream,项目名称:StockSharp,代码行数:20,代码来源:EmulationMessageAdapter.cs


示例18: LuaFixMarketDataMessageAdapter

		/// <summary>
		/// Создать <see cref="LuaFixMarketDataMessageAdapter"/>.
		/// </summary>
		/// <param name="transactionIdGenerator">Генератор идентификаторов транзакций.</param>
		public LuaFixMarketDataMessageAdapter(IdGenerator transactionIdGenerator)
			: base(transactionIdGenerator)
		{
			this.RemoveTransactionalSupport();

			Login = "quik";
			Password = "quik".To<SecureString>();
			Address = QuikTrader.DefaultLuaAddress;
			TargetCompId = "StockSharpMD";
			SenderCompId = "quik";
			//ExchangeBoard = ExchangeBoard.Forts;
			//Version = FixVersions.Fix44_Lua;
			RequestAllSecurities = true;
			//MarketData = FixMarketData.MarketData;
			//TimeZone = TimeHelper.Moscow;
		}
开发者ID:RakotVT,项目名称:StockSharp,代码行数:20,代码来源:LuaFixMarketDataMessageAdapter.cs


示例19: DisplayTree

        private void DisplayTree()
        {
            Console.Clear();

            var idGenerator = new IdGenerator(_bindController.MainMultiTree.ToList());
            _currentDoubleNode = _treeConstructor.GetFilledTree(_bindController, idGenerator);

            Console.WriteLine(_consoleTreeWriter.ConvertToString(_bindController.MainMultiTree, _bindController.MinorSingleTree));
            Console.WriteLine(_consoleTreeWriter.ConvertToString(_currentDoubleNode));

            _treeConverter.ConvertMultiTreeAsMulti(new MultiTree<StringId>(_currentDoubleNode.ToMultiNode())).ForEach(Console.WriteLine);

            Console.WriteLine();
            if (_messages.Any())
            {
                Console.WriteLine(_messages.Last());
            }
            Console.WriteLine();
        }
开发者ID:prototype9449,项目名称:Bound-Tree,代码行数:19,代码来源:ConsoleConnectionController.cs


示例20: SmartComMessageAdapter

		/// <summary>
		/// Создать <see cref="SmartComMessageAdapter"/>.
		/// </summary>
		/// <param name="transactionIdGenerator">Генератор идентификаторов транзакций.</param>
		public SmartComMessageAdapter(IdGenerator transactionIdGenerator)
			: base(transactionIdGenerator)
		{
			Version = SmartComVersions.V3;

			SecurityClassInfo.Add("OPT", RefTuple.Create(SecurityTypes.Option, ExchangeBoard.Forts.Code));
			SecurityClassInfo.Add("OPTM", RefTuple.Create(SecurityTypes.Option, ExchangeBoard.Forts.Code));
			SecurityClassInfo.Add("FUT", RefTuple.Create(SecurityTypes.Future, ExchangeBoard.Forts.Code));

			PortfolioBoardCodes = new Dictionary<string, string>
			{
			    { "EQ", ExchangeBoard.MicexEqbr.Code },
			    { "FOB", ExchangeBoard.MicexFbcb.Code },
			    { "RTS_FUT", ExchangeBoard.Forts.Code },
			};

			UpdatePlatform();

			this.AddMarketDataSupport();
			this.AddTransactionalSupport();
			this.RemoveSupportedMessage(MessageTypes.OrderStatus);
		}
开发者ID:reddream,项目名称:StockSharp,代码行数:26,代码来源:SmartComMessageAdapter.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IdList类代码示例发布时间:2022-05-24
下一篇:
C# Id类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap