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


C# ConnectionManager类代码示例

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


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

示例1: ConnectionItem

            public ConnectionItem(ConnectionManager connectionManager)
            {
                ArgumentVerifier.CheckObjectArgument(connectionManager, "connectionManager");

                this.name = connectionManager.Name;
                this.connectionManager = connectionManager;
            }
开发者ID:japj,项目名称:sqlsrvintegrationsrv,代码行数:7,代码来源:DelimitedFileReaderComponentUI.cs

示例2: newConnectionRequest

 private void newConnectionRequest(ConnectionManager.ConnectionInformation connection)
 {
     ConnectionHandeler handeler = new ConnectionHandeler(connection);
     handeler.Disconnection += serverDisconnected;
     AddConnection(handeler);
     handeler.Start();
 }
开发者ID:rodero95,项目名称:butterfly-dev,代码行数:7,代码来源:LicenseRequester.cs

示例3: Initialize

        public void Initialize(ConnectionManager connectionManager, IServiceProvider serviceProvider)
        {
            this._connectionManager = connectionManager;
            this._serviceProvider = serviceProvider;

            ConfigureControlsFromConnectionManager();
        }
开发者ID:nkuebler000,项目名称:SSIS_SSH_Components,代码行数:7,代码来源:SSHConnectionManagerUIForm.cs

示例4: CreateBatcher

 /// <summary>
 /// Create an instance of <see cref="IBatcher"/> according to the configuration 
 /// and the capabilities of the driver
 /// </summary>
 /// <remarks>
 /// By default, .Net doesn't have any batching capabilities, drivers that does have
 /// batching support need to override this method and return their own batcher.
 /// </remarks>
 public override IBatcher CreateBatcher(ConnectionManager connectionManager)
 {
     if (connectionManager.Factory.IsBatchUpdateEnabled)
         return new OracleDataClientBatchingBatcher(connectionManager);
     else
         return new NonBatchingBatcher(connectionManager);
 }
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:15,代码来源:OracleDataClientDriver.cs

示例5: ConnectionRun

 public ConnectionRun(RunData runData)
     : base(runData)
 {
     var connectionManager = new ConnectionManager(Resolver);
     _context = connectionManager.GetConnectionContext<StressConnection>();
     _transportConnection = (ITransportConnection)_context.Connection;
 }
开发者ID:Choulla-Naresh8264,项目名称:SignalR,代码行数:7,代码来源:ConnectionRun.cs

示例6: ConnectionManagerTester

        /// <summary>
        /// Constructor. Inicializa instancias de la clase ConnectionManagerTester
        /// </summary>
        public ConnectionManagerTester()
        {
            /*
             * Primero se crea el CommandManager. Este gestiona los comandos de
             * sistema como alive, busy, ready, etc. Ahorra trabajo.
             * Adicionalmente se suscriben los eventos (apuntador a funcion)
             * para manejar las notificaciones de la clase
            */
            commandManager = new CommandManager();
            commandManager.Started += new CommandManagerStatusChangedEventHandler(commandManager_Started);
            commandManager.Stopped += new CommandManagerStatusChangedEventHandler(commandManager_Stopped);
            commandManager.CommandReceived += new CommandReceivedEventHandler(commandManager_CommandReceived);
            commandManager.ResponseReceived += new ResponseReceivedEventHandler(commandManager_ResponseReceived);

            /*
             * Ahora se inicializa el ConnectionManager. Bajo el esquema actual
             * todas las aplicaciones son servidores y es el blackboard el que
             * se conecta a ellas (asi solo es necesario configurar una
             * aplicacion). Se le indica nombre del modulo, puerto de conexion
             * y el gestor de comandos. El modulo y puerto deben ser
             * configurados en el blackboard
            */
            connectionManager = new ConnectionManager("TESTER", 2000, 2000, IPAddress.Loopback, commandManager);
            connectionManager.Started += new ConnectionManagerStatusChangedEventHandler(connectionManager_Started);
            connectionManager.Stopped += new ConnectionManagerStatusChangedEventHandler(connectionManager_Stopped);
            connectionManager.ClientDisconnected += new TcpClientDisconnectedEventHandler(connectionManager_ClientDisconnected);
            connectionManager.ClientConnected += new TcpClientConnectedEventHandler(connectionManager_ClientConnected);

            // Configuro el reloj
            sw = new System.Diagnostics.Stopwatch();
        }
开发者ID:BioRoboticsUNAM,项目名称:Robotics,代码行数:34,代码来源:ConnectionManagerTester.cs

示例7: SQLServerWrapper

        public SQLServerWrapper(ConnectionManager cm, object txn)
        {
            this.cm = cm;
            this.txn = txn;

            this.StartSession();
        }
开发者ID:BartekR,项目名称:ssis-winscptask,代码行数:7,代码来源:SQLServerWrapper.cs

示例8: RouterActor

        public RouterActor(bool useDefault = true)
        {
            ConnectionMode connectionMode = ConnectionMode.ConnectionModeRemoteConnectionless;
            IConnectionManager connectionManager = new ConnectionManager();
            FalconConnection falconConnection = default(FalconConnection);
                            if (useDefault)
                                falconConnection = connectionManager.GetDefaultConnection();
                            else
                                falconConnection = connectionManager.GetConnection("", 1);

            _connection = ConnectionObjectFactory.CreateUnlicensedConnectionObject(null);
            _auto = new AutoDisposeConnectionObject(_connection);
            _connection.Mode = connectionMode;

            if (falconConnection.guidEdi == Guid.Empty)
                throw new Exception("Operation was aborted");
                        DeviceOpenError err = _connection.Open2("{" + falconConnection.guidEdi.ToString() + "}",
                                    falconConnection.Parameters);
            if (err != DeviceOpenError.DeviceOpenErrorNoError)
            {
                throw new InvalidOperationException(string.Format("Could not open connection: {0}", err.ToString()));
            }

            beginConfirmedGroupDataChannel();
        }
开发者ID:danielwerthen,项目名称:Funcis-Sharp,代码行数:25,代码来源:RouterActor.cs

示例9: RunClientAsync

        private static async Task RunClientAsync(Uri address, CancellationToken token)
        {
            ClientEventSource eventSource = ClientEventSource.Instance;

            NetNamedPipeBinding binding = new NetNamedPipeBinding(NetNamedPipeSecurityMode.None);
            binding.OpenTimeout = TimeSpan.FromSeconds(1.0d);
            binding.SendTimeout = TimeSpan.FromSeconds(1.0d);
            binding.ReceiveTimeout = TimeSpan.FromSeconds(1.0d);
            binding.CloseTimeout = TimeSpan.FromSeconds(1.0d);

            CalculatorChannelFactory factory = new CalculatorChannelFactory(binding, new EndpointAddress(address), eventSource);
            await factory.OpenAsync();

            ConnectionManager<ICalculatorClientAsync> connectionManager = new ConnectionManager<ICalculatorClientAsync>(factory);

            using (ProxyInvoker<ICalculatorClientAsync> proxy = new ProxyInvoker<ICalculatorClientAsync>(connectionManager))
            {
                Random random = new Random();

                while (!token.IsCancellationRequested)
                {
                    try
                    {
                        await proxy.InvokeAsync(c => InvokeRandomAsync(random, c));
                    }
                    catch (Exception)
                    {
                    }

                    await Task.Delay(TimeSpan.FromMilliseconds(250.0d));
                }
            }

            await factory.CloseAsync();
        }
开发者ID:knightfall,项目名称:writeasync,代码行数:35,代码来源:Program.cs

示例10: connect

    public void connect(string args)
    {
        string[] javascriptArgs = JsonHelper.Deserialize<string[]>(args);
        string macAddress = javascriptArgs[0];
        connectionCallbackId = javascriptArgs[1];

        connectionManager = new ConnectionManager();
        connectionManager.Initialize(); // TODO can't we put this in the constructor?
        connectionManager.ByteReceived += connectionManager_ByteReceived;

        connectionManager.ConnectionSuccess += connectionManager_ConnectionSuccess;
        connectionManager.ConnectionFailure += connectionManager_ConnectionFailure;

        try
        {
            HostName deviceHostName = new HostName(macAddress);
            connectionManager.Connect(deviceHostName);
        }
        catch (Exception ex)
        {
            Debug.WriteLine(ex);
            connectionManager_ConnectionFailure("Invalid Hostname");
        }

    }
开发者ID:RP-Z,项目名称:BluetoothSerial,代码行数:25,代码来源:BluetoothSerial.cs

示例11: ContactRepository

        public ContactRepository(ConnectionManager connectionManager)
        {
            connMgr = connectionManager;

            //Create the Contact table if it doesn't exist
            connMgr.Database.CreateEntityTable<Contact>();
        }
开发者ID:nicolehaugen79,项目名称:BusinessContactManager,代码行数:7,代码来源:ContactRepository.cs

示例12: AddDestAdapter

        public override IDTSComponentMetaData100 AddDestAdapter(IDTSPipeline100 pipeline, ConnectionManager destConnMgr, out IDTSDesigntimeComponent100 destDesignTimeComp)
        {
            if (String.IsNullOrEmpty(quotedTableName))
            {
                throw new ArgumentException("Destination table name is empty");
            }
            IDTSComponentMetaData100 destComp = pipeline.ComponentMetaDataCollection.New();
            destComp.ComponentClassID = OLEDB_DEST_GUID;
            destComp.ValidateExternalMetadata = true;
            destDesignTimeComp = destComp.Instantiate();
            destDesignTimeComp.ProvideComponentProperties();
            destComp.Name = "OleDB Destination - Sql Server";
            destDesignTimeComp.SetComponentProperty("AccessMode", 0);
            destDesignTimeComp.SetComponentProperty("OpenRowset", quotedTableName);

            // set connection
            destComp.RuntimeConnectionCollection[0].ConnectionManager = DtsConvert.GetExtendedInterface(destConnMgr);
            destComp.RuntimeConnectionCollection[0].ConnectionManagerID = destConnMgr.ID;

            // get metadata
            destDesignTimeComp.AcquireConnections(null);
            destDesignTimeComp.ReinitializeMetaData();
            destDesignTimeComp.ReleaseConnections();

            extCols = destComp.InputCollection[0].ExternalMetadataColumnCollection;

            return destComp;
        }
开发者ID:japj,项目名称:sqlsrvintegrationsrv,代码行数:28,代码来源:SQL.cs

示例13: WinSCPWrapper

        public WinSCPWrapper(ConnectionManager cm, object txn)
        {
            this.cm = cm;
            this.txn = txn;

            this.StartSession();
        }
开发者ID:BartekR,项目名称:ssis-winscptask,代码行数:7,代码来源:WinSCPWrapper.cs

示例14: SetupListener

        internal static void SetupListener(int Port)
        {
            SessionManagement.Init();
			manager = new ConnectionManager(Port, 5, new HeartbeatParser(), false);

			manager.connectionEvent += manager_connectionEvent;
        }
开发者ID:BjkGkh,项目名称:R106,代码行数:7,代码来源:Socket.cs

示例15:

        void IDtsConnectionManagerUI.Initialize(ConnectionManager connectionManager, IServiceProvider serviceProvider)
        {
            Debug.Assert((connectionManager != null) && (serviceProvider != null));

            this._serviceProvider = serviceProvider;
            this._connectionManager = connectionManager;
        }
开发者ID:japj,项目名称:sqlsrvintegrationsrv,代码行数:7,代码来源:CredentialConnectionManagerUI.cs


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