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

C# IConnector类代码示例

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

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



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

示例1: StringSearcherControl

 public StringSearcherControl(IConnector connector)
 {
     InitializeComponent();
     this.connector = connector;
     comboBox1.SelectedIndex = 2;
     comboBox2.SelectedIndex = 0;
 }
开发者ID:JerreS,项目名称:StringSearcherPlugin,代码行数:7,代码来源:StringSearcherControl.cs


示例2: MatLabConnector

		/// <summary>
		/// Создать <see cref="MatLabConnector"/>.
		/// </summary>
		/// <param name="realConnector">Подключение, через которое будут отправляться заявки и получатся маркет-данные.</param>
		/// <param name="ownTrader">Контролировать время жизни подключения <paramref name="realConnector"/>.</param>
		public MatLabConnector(IConnector realConnector, bool ownTrader)
		{
			if (realConnector == null)
				throw new ArgumentNullException("realConnector");

			RealConnector = realConnector;

			RealConnector.Connected += RealTraderOnConnected;
			RealConnector.ConnectionError += RealTraderOnConnectionError;
			RealConnector.Disconnected += RealTraderOnDisconnected;
			RealConnector.Error += RealTraderOnError;
			RealConnector.MarketTimeChanged += RealTraderOnMarketTimeChanged;
			RealConnector.NewSecurities += RealTraderOnNewSecurities;
			RealConnector.SecuritiesChanged += RealTraderOnSecuritiesChanged;
			RealConnector.NewPortfolios += RealTraderOnNewPortfolios;
			RealConnector.PortfoliosChanged += RealTraderOnPortfoliosChanged;
			RealConnector.NewPositions += RealTraderOnNewPositions;
			RealConnector.PositionsChanged += RealTraderOnPositionsChanged;
			RealConnector.NewTrades += RealTraderOnNewTrades;
			RealConnector.NewMyTrades += RealTraderOnNewMyTrades;
			RealConnector.NewMarketDepths += RealTraderOnNewMarketDepths;
			RealConnector.MarketDepthsChanged += RealTraderOnMarketDepthsChanged;
			RealConnector.NewOrders += RealTraderOnNewOrders;
			RealConnector.OrdersChanged += RealTraderOnOrdersChanged;
			RealConnector.OrdersRegisterFailed += RealTraderOnOrdersRegisterFailed;
			RealConnector.OrdersCancelFailed += RealTraderOnOrdersCancelFailed;
			RealConnector.NewStopOrders += RealTraderOnNewStopOrders;
			RealConnector.StopOrdersChanged += RealTraderOnStopOrdersChanged;
			RealConnector.StopOrdersRegisterFailed += RealTraderOnStopOrdersRegisterFailed;
			RealConnector.StopOrdersCancelFailed += RealTraderOnStopOrdersCancelFailed;
			RealConnector.NewOrderLogItems += RealTraderOnNewOrderLogItems;

			_ownTrader = ownTrader;
		}
开发者ID:reddream,项目名称:StockSharp,代码行数:39,代码来源:MatLabConnector.cs


示例3: MessageClient

        internal MessageClient(IConnector connector)
        {
            Contract.Requires(connector != null);

            this.Connector = connector;
            this.Connector.Connected += (sender, e) => OnConnected();
            this.Connector.ConnectFailed += (sender, e) => OnConnectFailed(e.Exception);
            this.Connector.Disconnected += (sender, e) => OnDisconnected();
        }
开发者ID:sunoru,项目名称:PBO,代码行数:9,代码来源:MessageClient.cs


示例4: ConnectStart

		public virtual void ConnectStart (IConnector start)	{
			if (StartConnector == start) {
				return;
			}

			DisconnectStart ();
			StartConnector = start;
			ConnectFigure (StartConnector);
			OnConnectionChanged();
		}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:10,代码来源:LineConnection.cs


示例5: LivenessMonitor

        public LivenessMonitor(IConnector connector, int livenessTimeout = 60000, int receiveTimeout = 10000)
        {
            IsUp = true;
            this.connector = connector;
            connector.MessageReceived += connector_MessageReceived;
            ReceiveTimeout = receiveTimeout;

            timer = new System.Timers.Timer(livenessTimeout);
            timer.Elapsed += timer_Elapsed;
        }
开发者ID:renber,项目名称:AvisNet,代码行数:10,代码来源:LivenessMonitor.cs


示例6: ProcessAttachEndPoint

        public static void ProcessAttachEndPoint(IBlockWeb containerWeb, IConnector connector, XmlElement endpointElement, string blockId)
        {
            string endpointKey = null;

            if (endpointElement.Name == "valueEndPoint")
            {
                if (!TemplateProcessor.ProcessTemplateFile(endpointElement, containerWeb, blockId, connector))
                {
                    object value = ObjectReader.ReadObject(endpointElement);
                    endpointKey = connector.AttachEndPoint(value);
                }
            }
            else if (endpointElement.Name == "serviceEndPoint")
            {
                if (!TemplateProcessor.ProcessTemplateFile(endpointElement, containerWeb, blockId, connector))
                {
                    string endpointBlockId = endpointElement.GetAttribute("blockId");
                    string endpointService = endpointElement.GetAttribute("service");

                    if (!endpointElement.HasAttribute("blockId")) endpointBlockId = blockId;

                    endpointKey = connector.AttachEndPoint(endpointBlockId, endpointService);
                }
            }
            else if (endpointElement.Name == "connectorEndPoint")
            {
                if (!TemplateProcessor.ProcessTemplateFile(endpointElement, containerWeb, blockId, connector))
                {
                    string endpointBlockId = endpointElement.GetAttribute("blockId");
                    string endPointConnectorKey = endpointElement.GetAttribute("connectorKey");

                    if (!endpointElement.HasAttribute("blockId")) endpointBlockId = blockId;

                    endpointKey = connector.AttachConnectorEndPoint(endpointBlockId, endPointConnectorKey);
                }
            }
            else
            {
                throw new InvalidOperationException();
            }

            //now process fixed args
            XmlElement fixedArgsElement = endpointElement.SelectSingleNode("fixedArgs") as XmlElement;

            if (fixedArgsElement != null && endpointKey != null)
            {
                List<Connector.EndPoint> fixedArgs = EndPointExtractor.ExtractArguments(fixedArgsElement, containerWeb);

                foreach (Connector.EndPoint endPoint in fixedArgs)
                {
                    connector.AddFixedArg(endpointKey, endPoint);
                }
            }
        }
开发者ID:mm-binary,项目名称:DARF,代码行数:54,代码来源:EndPointExtractor.cs


示例7: MarketTimer

		/// <summary>
		/// Создать <see cref="MarketTimer"/>.
		/// </summary>
		/// <param name="connector">Подключение к торговой системе, из которого будет использоваться событие <see cref="IConnector.MarketTimeChanged"/>.</param>
		/// <param name="activated">Обработчик таймера.</param>
		public MarketTimer(IConnector connector, Action activated)
		{
			if (connector == null)
				throw new ArgumentNullException("connector");

			if (activated == null)
				throw new ArgumentNullException("activated");

			_connector = connector;
			_activated = activated;
		}
开发者ID:knoppixmeister,项目名称:StockSharp,代码行数:16,代码来源:MarketTimer.cs


示例8: RougeSpyGameScene

        public RougeSpyGameScene(SceneHandler handler, string name, IConnector connector, GraphicsDeviceManager graphicsDeviceManager)
            : base(handler, name, connector, graphicsDeviceManager)
        {
            //movement system
            MainSystem.UpdateComplexSystem.AddSubSystem(new InputUpdateSystem(MainSystem));
            MainSystem.UpdateComplexSystem.AddSubSystem(new CalculateMovementUpdateSystem(MainSystem));
            MainSystem.UpdateComplexSystem.AddSubSystem(new HitBoxCollisionUpdateSystem(MainSystem));
            MainSystem.UpdateComplexSystem.AddSubSystem(new ApplyMovementUpdateSystem(MainSystem));
            MainSystem.UpdateComplexSystem.AddSubSystem(new HitBoxUpdateSystem(MainSystem));

            //render system
            MainSystem.RenderComplexSystem.AddSubSystem(new Texture2DRenderSystem(MainSystem));
            MainSystem.RenderComplexSystem.AddSubSystem(new HitBoxRenderSystem(MainSystem, 2));

            //Player
            PlayerID = MainSystem.CreateEntityID();
            MainSystem.GetUpdateSystem<InputUpdateSystem>().CreateInputNode(PlayerID, new GamePadInput());
            MainSystem.GetUpdateSystem<CalculateMovementUpdateSystem>().CreateMovementNode(PlayerID);
            MainSystem.GetUpdateSystem<ApplyMovementUpdateSystem>().CreateMovementNode(PlayerID);
            MainSystem.GetComponent<Motion2DComponent>(PlayerID).Acceleration = 0.2f;
            MainSystem.GetComponent<Motion2DComponent>(PlayerID).Decceleration = 0.3f;
            MainSystem.GetComponent<Motion2DComponent>(PlayerID).MaxSpeed = 10.0f;
            Texture2D texture = AssetLoader.Instance.Load<Texture2D>("Player_Alpha_64_43");
            MainSystem.GetRenderSystem<Texture2DRenderSystem>().CreateTexture2DRenderNode(PlayerID, texture);
            MainSystem.GetComponent<Position2DComponent>(PlayerID).Position = new Vector2(200);
            MainSystem.GetComponent<Position2DComponent>(PlayerID).Origin = new Vector2(texture.Width / 2, texture.Height / 2);

            List<Vector2> points = new List<Vector2>();
            points.Add(Vector2.Zero);
            points.Add(new Vector2(texture.Width - 24, 0));
            points.Add(new Vector2(texture.Width - 24, texture.Height));
            points.Add(new Vector2(0, texture.Height));
            MainSystem.GetUpdateSystem<HitBoxUpdateSystem>().CreateHitBoxNode(PlayerID, points);
            MainSystem.GetComponent<HitBox2DComponent>(PlayerID).Offset = new Vector2(12, 0);
            MainSystem.GetUpdateSystem<HitBoxCollisionUpdateSystem>().CreateHitBoxCollisionUpadateNode(PlayerID, points, new PositionCorrectionHitBoxIntersectionReaction(MainSystem, PlayerID));
            MainSystem.GetRenderSystem<HitBoxRenderSystem>().CreateHitBoxRenderNode(PlayerID, points);

            string[][] blueprint = new string[3][];
            blueprint[0] = new string[] { "w", "w", "w" };
            blueprint[1] = new string[] { "w", " ", "w" };
            blueprint[2] = new string[] { "w", "w", "w" };

            List<Vector2> hitBoxOutline = new List<Vector2>();
            hitBoxOutline.Add(new Vector2(0, 0));
            hitBoxOutline.Add(new Vector2(64, 0));
            hitBoxOutline.Add(new Vector2(64, 64));
            hitBoxOutline.Add(new Vector2(0, 64));

            List<TileBluePrint> tileBluePrints = new List<TileBluePrint>();
            tileBluePrints.Add(new TileBluePrint("w", AssetLoader.Instance.Load<Texture2D>("WoodenTileA"), hitBoxOutline));
            TileMapBluePrint tileMapBluePrint = new TileMapBluePrint(blueprint, tileBluePrints, new Vector2(64,64));
            TileMapLoader.Load(tileMapBluePrint, MainSystem);            
        }
开发者ID:Norskan,项目名称:Playground,代码行数:53,代码来源:TestGroundGameScene.cs


示例9: _ConnectAsyncCallback

        private void _ConnectAsyncCallback(IConnector connector, object callbackState)
        {
            if (!(callbackState is object[])) throw new ArgumentException();

            object[] states = (object[])callbackState;
            ConnectAsyncCallback callback = states[0] as ConnectAsyncCallback;
            object state = states[2];

            Daemon = new Daemon(_factory);
            Core = new Core(_factory);
            callback(connector, state);
        }
开发者ID:fuzeman,项目名称:DelugeRPC.NET,代码行数:12,代码来源:DelugeRPC.cs


示例10: GetSourceFieldForConnection

        /// <summary>
        /// Gets the source field for connection.
        /// </summary>
        /// <param name="connector">The connector.</param>
        /// <returns>SourceField.</returns>
        public SourceField GetSourceFieldForConnection(IConnector connector)
        {
            var fields = new List<SourceField>();
            CollectAllFields(fields, null);

            var field = fields.FirstOrDefault(con => con.ConnectorOut.Id == connector.Id);
            if (field != null)
            {
                field.DataType = connector.DataType;
            }
            return field;
        }
开发者ID:mparsin,项目名称:Elements,代码行数:17,代码来源:SourceFieldList.cs


示例11: AttachConnector

 public void AttachConnector(IConnector connector)
 {
     if(connector == null)
         return;
     //only attach'm if not already present and not the parent
     if(!attachedConnectors.Contains(connector) && connector!=attachedTo)
     {
         connector.DetachFromParent();
         attachedConnectors.Add(connector);
         //make sure the attached connector is centered at this connector
         connector.Point = this.point;
         connector.AttachedTo = this;
     }
 }
开发者ID:Tom-Hoinacki,项目名称:OO-CASE-Tool,代码行数:14,代码来源:ConnectorBase.cs


示例12: Scene

        public Scene(SceneHandler handler, string name, IConnector connector, GraphicsDeviceManager graphicsDeviceManager, List<Scene> children)
        {
            Handler = handler;
            Name = name;
            Connector = connector;

            GraphicsDeviceManager = graphicsDeviceManager;

            if (connector != null)
            {
                Connector.Next = this;
            }

            Children = children;
        }
开发者ID:Norskan,项目名称:Playground,代码行数:15,代码来源:Scene.cs


示例13: FrmDatabaseImportProcess

        public FrmDatabaseImportProcess(List<DataImportTable> tableList, DataBase newBase, Connector.SgbdType sgbdType, IConnector conn)
        {
            InitializeComponent();
            Cursor.Current = Cursors.WaitCursor;
            _sgbdType = sgbdType;
            _db = newBase;
            _tableList = tableList;
            _conn = conn;
            foreach (DataImportTable table in tableList)
                table.Count = conn.GetCount(table.Name);
            _columnsCount = tableList.Sum(t => t.Columns.Count);

            launch();
            Cursor.Current = Cursors.Default;
        }
开发者ID:TMA-AQ,项目名称:AlgoQuest,代码行数:15,代码来源:FrmDatabaseImportProcess.cs


示例14: DDTConnection

        public DDTConnection(IConnector mFrom, IConnector mTo, IModel model, ConnectionType type)
            : base(model)
        {
            this.From = new Connector(mFrom.Point, model);
                this.From.Name = "From";
                this.From.Parent = this;

                From.AttachTo(mFrom);

                this.To = new Connector(mTo.Point, model); ;
                this.To.Name = "To";
                this.To.Parent = this;

                To.AttachTo(mTo);

            this.connectionType = type;
        }
开发者ID:Tom-Hoinacki,项目名称:OO-CASE-Tool,代码行数:17,代码来源:DDTConnection.cs


示例15: getConnectorIndex

 public static int getConnectorIndex(IConnector cnct)
 {
     if(cnct.Equals(((IDDTObject)cnct.Parent).connectorA))
        {
       return 1;
        }
        else if(cnct.Equals(((IDDTObject)cnct.Parent).connectorB))
        {
       return 2;
        }
        else if(cnct.Equals(((IDDTObject)cnct.Parent).connectorC))
        {
       return 3;
        }
        else if(cnct.Equals(((IDDTObject)cnct.Parent).connectorD))
        {
        return 4;
        }
        else
     return 0;
 }
开发者ID:Tom-Hoinacki,项目名称:OO-CASE-Tool,代码行数:21,代码来源:DDTConnectionTool.cs


示例16: Attach

        public void Attach(IConnector connector, IBlockWeb context)
        {
            string epKey = null;

            if (value != null)
            {
                epKey = connector.AttachEndPoint(value);
            }
            else if (serviceName != null)
            {
                epKey = connector.AttachEndPoint(blockId, serviceName);
            }
            else
            {
                epKey = connector.AttachConnectorEndPoint(blockId, connectorKey);
            }

            foreach (EndPointDescriptor ep in FixedArgs)
            {
                connector.AddFixedArg(epKey, ep.GetEndPoint(context));
            }
        }
开发者ID:mm-binary,项目名称:DARF,代码行数:22,代码来源:AttachEndPointNode.cs


示例17: ProcessNode

        public static object ProcessNode(XmlElement element, IBlockWeb blockWeb, string blockId, IConnector connector)
        {
            switch (element.Name)
            {
                case "blockWeb":
                    {
                        string id = null;
                        if (element.HasAttribute("id"))
                        {
                            id = element.GetAttribute("id");
                        }

                        BlockWeb newWeb = null;

                        if ( blockId != null )
                        {
                            newWeb = (BlockWeb) blockWeb[blockId].ProcessRequest("ProcessMetaService", BlockMetaServiceType.GetInnerWeb,
                                null, null);
                        }
                        else
                        {
                            newWeb = new BlockWeb(id, DefaultBroker);
                        }

                        TemplateProcessor.ProcessTemplateFile(element, newWeb, blockId, connector);
                        ProcessNodeChildren(element, newWeb, blockId, connector);

                        return newWeb;
                    }
                case "actions":
                    {
                        TemplateProcessor.ProcessTemplateFile(element, blockWeb, blockId, connector);

                        ProcessNodeChildren(element, blockWeb, blockId, connector);

                        break;
                    }
                case "blocks":
                    {
                        TemplateProcessor.ProcessTemplateFile(element, blockWeb, blockId, connector);

                        ProcessNodeChildren(element, blockWeb, blockId, connector);

                        break;
                    }
                case "block":
                    {
                        BlockHandle cid = ObjectReader.ReadBlockHandle(element);
                        string id = null;

                        if (element.HasAttribute("id"))
                        {
                            id = element.GetAttribute("id");
                        }
                        else
                        {
                            id = "ctl_" + (Guid.NewGuid().ToString());
                        }

                        blockWeb.AddBlock(cid, id);

                        TemplateProcessor.ProcessTemplateFile(element, blockWeb, id, connector);

                        ProcessNodeChildren(element, blockWeb, id, connector);

                        //(blockWeb[id] as IContainedBlock).OnAfterLoad();

                        break;
                    }
                case "attachEndPoint":
                    {
                        EndPointExtractor.ProcessAttachEndPointsAction(element, blockWeb, blockId);

                        break;
                    }
                case "processRequest":
                    {
                        ActionProcessor.ProcessProcessRequest(element, blockWeb, blockId);

                        break;
                    }
                case "setProperty":
                    {
                        ActionProcessor.ProcessSetProperty(element, blockWeb, blockId);

                        break;
                    }
                case "setVariable":
                    {
                        ActionProcessor.ProcessSetVariable(element, blockWeb, blockId);

                        break;
                    }
                case "serviceEndPoint":
                case "valueEndPoint":
                case "connectorEndPoint":
                    {
                        EndPointExtractor.ProcessAttachEndPoint(blockWeb, connector, element, blockId);

                        break;
//.........这里部分代码省略.........
开发者ID:mm-binary,项目名称:DARF,代码行数:101,代码来源:NodeProcessor.cs


示例18: ProcessNodeChildren

 public static void ProcessNodeChildren(XmlElement element, IBlockWeb blockWeb, string blockId, IConnector connector)
 {
     foreach (XmlNode actionNode in element.ChildNodes)
     {
         if (actionNode is XmlElement)
         {
             NodeProcessor.ProcessNode(actionNode as XmlElement, blockWeb, blockId, connector);
         }
     }
 }
开发者ID:mm-binary,项目名称:DARF,代码行数:10,代码来源:NodeProcessor.cs


示例19: AddConnection

 public void AddConnection(IConnector from, IConnector to)
 {
     Connection con = new Connection(from.Point, to.Point);
     this.AddConnection(con);
 }
开发者ID:Tom-Hoinacki,项目名称:OO-CASE-Tool,代码行数:5,代码来源:Model.cs


示例20: CreateCandleManager

		private CandleManager CreateCandleManager(IConnector connector, TimeSpan candlesKeepTime)
		{
			return new CandleManager(connector) { Container = { CandlesKeepTime = candlesKeepTime } };

			//var candleManager = new StorageCandleManager(connector) { Container = { CandlesKeepTime = TimeSpan.FromDays(1) } };

			//foreach (var type in AppConfig.Instance.CandleSources)
			//{
			//	var source = type.CreateInstance<object>();

			//	source.DoIf<object, ICandleManagerSource>(s => candleManager.Sources.Add(s));
			//	source.DoIf<object, ICandleBuilderSource>(s => candleManager.Sources.OfType<ICandleBuilder>().ForEach(b => b.Sources.Add(s)));
			//}

			//candleManager.StorageRegistry = ConfigManager.GetService<IStorageRegistry>();

			//return candleManager;
		}
开发者ID:jsonbao,项目名称:StockSharp,代码行数:18,代码来源:StrategyService.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# IConsole类代码示例发布时间:2022-05-24
下一篇:
C# IConnectionString类代码示例发布时间: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