コード例 #1
0
        private void Configure(IServer server, IQueue preQueue, IQueue postQueue)
        {
            m_server    = server;
            m_preQueue  = preQueue;
            m_postQueue = postQueue;

            if (m_preQueue != null)
            {
                ConnectorFactory.Connect(m_preQueue.Output, m_server.Input);
                m_entryPort = m_preQueue.Input;
            }
            else
            {
                m_entryPort = m_server.Input;
            }

            if (m_postQueue != null)
            {
                ConnectorFactory.Connect(m_server.Output, m_postQueue.Input);
                m_exitPort = m_postQueue.Output;
            }
            else
            {
                m_exitPort = m_server.Output;
            }

            // AddPort(m_entryPort);  <-- Done in port's ctor.// TODO: These ports maybe ought to be known as "Input" or "Entry", and "Output" or "Exit" instead of what they are known as.
            // AddPort(m_exitPort); <-- Done in port's ctor.

            m_server.PlaceInService();
        }
コード例 #2
0
 public ObjectModelImplementation(ObjectModel receiver)
 {
     m_receiver  = receiver;
     m_connector = ConnectorFactory.GetServerConnector <IProvider>("provider", this);
     m_connector.ConnectionOpened += m_connector_ConnectionOpened;
     m_connector.ConnectionClosed += m_connector_ConnectionClosed;
 }
コード例 #3
0
 /// <summary>
 /// Set the Web Automation Description from the enum
 /// </summary>
 /// <param name="siteSettings"></param>
 public override void Initialize(SiteSettings siteSettings)
 {
     base.Initialize(siteSettings);
     amznPlayerType = AmazonPlayerType.Browser;
     Properties.Resources.ResourceManager = new SingleAssemblyComponentResourceManager(typeof(Resources));
     _connector = ConnectorFactory.GetInformationConnector(webAutomationType, this);
 }
コード例 #4
0
ファイル: Capture.cs プロジェクト: spouse71/kco_rest_dotnet
            /// <summary>
            /// Run the example code.
            /// </summary>
            public static void Main()
            {
                const string MerchantId   = "0";
                const string SharedSecret = "sharedSecret";
                string       orderId      = "12345";
                string       captureId    = "34567";

                IConnector connector = ConnectorFactory.Create(MerchantId, SharedSecret, Client.EuTestBaseUrl);

                Client   client  = new Client(connector);
                IOrder   order   = client.NewOrder(orderId);
                ICapture capture = client.NewCapture(order.Location, captureId);

                try
                {
                    capture.TriggerSendOut();
                }
                catch (ApiException ex)
                {
                    Console.WriteLine(ex.ErrorMessage.ErrorCode);
                    Console.WriteLine(ex.ErrorMessage.ErrorMessages);
                    Console.WriteLine(ex.ErrorMessage.CorrelationId);
                }
                catch (WebException ex)
                {
                    Console.WriteLine(ex.Message);
                }
            }
コード例 #5
0
        public async static Task <object> ExecuteScalarCommand(DbCommand <T> command)
        {
            IConnector     connector    = ConnectorFactory.CreateConnector();
            IErrorHandling errorHandler = ErrorHandlerFactory.CreateErrorHandler();

            object          scalarResult = null;
            MySqlConnection connection   = connector.CreateConnection();

            try
            {
                await connector.OpenConnection(connection);

                scalarResult = await CommandExecutor <T> .TryExecutingScalarRead(connection, command);

                return(scalarResult);
            }

            catch (MySqlException exception)
            {
                errorHandler.HandleException(exception);
                return(scalarResult);
            }
            finally
            {
                await connector.CloseConnection(connection);
            }
        }
コード例 #6
0
        private PortManagementFacade Setup(out IInputPort in0, out IInputPort in1, out IOutputPort out0, out IOutputPort out1, out InputPortManager facadeIn0, out InputPortManager facadeIn1, out OutputPortManager facadeOut0, out OutputPortManager facadeOut1, out SimpleOutputPort entryPoint0, out SimpleOutputPort entryPoint1)
        {
            ManagementFacadeBlock mfb = new ManagementFacadeBlock();

            out0 = new SimpleOutputPort(null, "Out0", Guid.NewGuid(), mfb, null, null);
            out1 = new SimpleOutputPort(null, "Out1", Guid.NewGuid(), mfb, null, null);
            in0  = new SimpleInputPort(null, "In0", Guid.NewGuid(), mfb, null);
            in1  = new SimpleInputPort(null, "In1", Guid.NewGuid(), mfb, null);

            int i0 = 0;

            entryPoint0 = new SimpleOutputPort(null, "", Guid.NewGuid(), null, delegate(IOutputPort iop, object selector) { return(string.Format("Src0 ({0})", i0++)); }, null);
            ConnectorFactory.Connect(entryPoint0, in0);

            int i1 = 0;

            entryPoint1 = new SimpleOutputPort(null, "", Guid.NewGuid(), null, delegate(IOutputPort iop, object selector) { return(string.Format("Src1 ({0})", i1++)); }, null);
            ConnectorFactory.Connect(entryPoint1, in1);

            out0.PortDataPresented += new PortDataEvent(delegate(object data, IPort where) { Console.WriteLine(string.Format("{0} presented at {1}.", data.ToString(), where.Name)); });
            out1.PortDataPresented += new PortDataEvent(delegate(object data, IPort where) { Console.WriteLine(string.Format("{0} presented at {1}.", data.ToString(), where.Name)); });

            PortManagementFacade pmf = new PortManagementFacade(mfb);

            facadeIn0  = pmf.ManagerFor(in0);
            facadeIn1  = pmf.ManagerFor(in1);
            facadeOut0 = pmf.ManagerFor(out0);
            facadeOut1 = pmf.ManagerFor(out1);

            return(pmf);
        }
コード例 #7
0
        private PostProcessPaymentResult NewRegisterKlarnaOrder(PostProcessPaymentEvaluationContext context)
        {
            var retVal = new PostProcessPaymentResult();

            var connector = ConnectorFactory.Create(
                AppKey,
                AppSecret,
                Client.TestBaseUrl);

            Client    client    = new Client(connector);
            var       order     = client.NewOrder(context.OuterId);
            OrderData orderData = order.Fetch();

            if (orderData.Status != "CAPTURED")
            {
                var capture = client.NewCapture(order.Location);

                CaptureData captureData = new CaptureData()
                {
                    CapturedAmount = orderData.OrderAmount,
                    Description    = "All order items is shipped",
                    OrderLines     = orderData.OrderLines
                };

                capture.Create(captureData);
                orderData = order.Fetch();
            }

            retVal.IsSuccess        = orderData.Status == "CAPTURED";
            retVal.NewPaymentStatus = retVal.IsSuccess ? PaymentStatus.Paid : PaymentStatus.Pending;
            retVal.OrderId          = context.Order.Id;

            return(retVal);
        }
コード例 #8
0
            /// <summary>
            /// Run the example code.
            /// </summary>
            public static void Main()
            {
                const string MerchantId   = "0";
                const string SharedSecret = "sharedSecret";
                string       orderID      = "12345";

                IConnector connector = ConnectorFactory.Create(MerchantId, SharedSecret, Client.EuTestBaseUrl);

                Client         client = new Client(connector);
                ICheckoutOrder order  = client.NewCheckoutOrder(orderID);

                try
                {
                    CheckoutOrderData orderData = order.Fetch();
                }
                catch (ApiException ex)
                {
                    Console.WriteLine(ex.ErrorMessage.ErrorCode);
                    Console.WriteLine(ex.ErrorMessage.ErrorMessages);
                    Console.WriteLine(ex.ErrorMessage.CorrelationId);
                }
                catch (WebException ex)
                {
                    Console.WriteLine(ex.Message);
                }
            }
コード例 #9
0
        public async static Task <List <T> > ExecuteSelectCommand(DbCommand <T> command, T entity = default(T))
        {
            IConnector     connector    = ConnectorFactory.CreateConnector();
            IErrorHandling errorHandler = ErrorHandlerFactory.CreateErrorHandler();

            List <T> clinics = new List <T>();

            MySqlConnection connection = connector.CreateConnection();

            try
            {
                await connector.OpenConnection(connection);

                var reader = await CommandExecutor <T> .TryExecutingSelectQueryDataReader(connection, command, entity);

                while (await reader.ReadAsync())
                {
                    clinics.Add(ReadOneObject(reader));
                }
                return(clinics);
            }

            catch (MySqlException exception)
            {
                errorHandler.HandleException(exception);
                return(clinics);
            }
            finally
            {
                await connector.CloseConnection(connection);
            }
        }
コード例 #10
0
ファイル: TestServers.cs プロジェクト: stuarthillary/Sage-1
        public void TestBufferedServer()
        {
            m_noAdmitCount = 0;
            m_admitCount   = 0;

            m_model = new Model();
            ((Model)m_model).RandomServer = new Randoms.RandomServer(54321, 100);

            ItemSource factory = CreatePatientGenerator("Patient_", 25, 5.0, 3.0);

            NormalDistribution dist    = new NormalDistribution(m_model, "SvcDistribution", Guid.NewGuid(), 15.0, 3.0);
            IPeriodicity       per     = new Periodicity(dist, Periodicity.Units.Minutes);
            IResourceManager   rscPool = new SelfManagingResource(m_model, "RscMgr", Guid.NewGuid(), 5.0, 5.0, false, true, true);

            BufferedServer bs = new BufferedServer(m_model, "RscSvr", Guid.NewGuid(), per, new IResourceRequest[] { new SimpleResourceRequest(1.0, rscPool) }, true, false);

            bs.PlaceInService();
            ConnectorFactory.Connect(factory.Output, bs.Input);

            factory.Output.PortDataPresented += new PortDataEvent(FactoryOutput_PortDataPresented);
            bs.PreQueue.LevelChangedEvent    += new QueueLevelChangeEvent(Queue_LevelChangedEvent);
            bs.ServiceBeginning += new ServiceEvent(Server_ServiceBeginning);
            bs.ServiceCompleted += new ServiceEvent(Server_ServiceCompleted);

            m_model.Start();
        }
コード例 #11
0
ファイル: TestServers.cs プロジェクト: stuarthillary/Sage-1
        public void TestResourceServer()
        {
            m_noAdmitCount = 0;
            m_admitCount   = 0;

            m_model = new Model();
            ((Model)m_model).RandomServer = new Randoms.RandomServer(54321, 100);

            ItemSource factory = CreatePatientGenerator("Patient_", 25, 5.0, 3.0);
            Queue      queue   = new Queue(m_model, "TestQueue", Guid.NewGuid());

            ConnectorFactory.Connect(factory.Output, queue.Input);

            NormalDistribution dist    = new NormalDistribution(m_model, "SvcDistribution", Guid.NewGuid(), 15.0, 3.0);
            IPeriodicity       per     = new Periodicity(dist, Periodicity.Units.Minutes);
            ResourceManager    rscPool = new ResourceManager(m_model, "RscMgr", Guid.NewGuid());

            for (int i = 0; i < 3; i++)
            {
                rscPool.Add(new Resource(m_model, "rsc_" + i, Guid.NewGuid(), 1.0, 1.0, true, true, true));
            }
            ResourceServer rs = new ResourceServer(m_model, "RscSvr", Guid.NewGuid(), per, new IResourceRequest[] { new SimpleResourceRequest(1.0, rscPool) });

            rs.PlaceInService();
            ConnectorFactory.Connect(queue.Output, rs.Input);

            factory.Output.PortDataPresented += new PortDataEvent(FactoryOutput_PortDataPresented);
            queue.LevelChangedEvent          += new QueueLevelChangeEvent(Queue_LevelChangedEvent);
            rs.ServiceBeginning += new ServiceEvent(Server_ServiceBeginning);
            rs.ServiceCompleted += new ServiceEvent(Server_ServiceCompleted);

            m_model.Start();
        }
コード例 #12
0
ファイル: Order.cs プロジェクト: spouse71/kco_rest_dotnet
            /// <summary>
            /// Run the example code.
            /// </summary>
            public static void Main()
            {
                const string MerchantId   = "0";
                const string SharedSecret = "sharedSecret";
                string       orderId      = "12345";

                IConnector connector = ConnectorFactory.Create(MerchantId, SharedSecret, Client.EuTestBaseUrl);

                Client client = new Client(connector);
                IOrder order  = client.NewOrder(orderId);

                UpdateMerchantReferences updateMerchantReferences = new UpdateMerchantReferences()
                {
                    MerchantReference1 = "15632423",
                    MerchantReference2 = "special order"
                };

                try
                {
                    order.UpdateMerchantReferences(updateMerchantReferences);
                }
                catch (ApiException ex)
                {
                    Console.WriteLine(ex.ErrorMessage.ErrorCode);
                    Console.WriteLine(ex.ErrorMessage.ErrorMessages);
                    Console.WriteLine(ex.ErrorMessage.CorrelationId);
                }
                catch (WebException ex)
                {
                    Console.WriteLine(ex.Message);
                }
            }
コード例 #13
0
ファイル: Program.cs プロジェクト: KingKnecht/AplayTest
        public static void Main()
        {
            var undoServiceFactory = new UndoServiceFactory();
            var undoService        = undoServiceFactory.Create();
            var clientStateService = new ClientIdLookup();
            var undoManagerCache   = new UndoManagerCache(undoService);

            var projectManagerService = new ProjectManagerService();


            var connectionFactory = new ConnectionFactory(undoService);
            var connectorFactory  = new ConnectorFactory(undoService, connectionFactory);

            connectionFactory.ConnectorFactory = connectorFactory; //Make sure to inject the connectorFactory.

            var blockSymbolFactory = new BlockSymbolFactory(undoService, connectorFactory);
            var sheetFactory       = new SheetFactory(undoService, connectionFactory, blockSymbolFactory, connectorFactory);

            connectionFactory.SheetFactory  = sheetFactory;
            blockSymbolFactory.SheetFactory = sheetFactory;
            connectorFactory.SheetFactory   = sheetFactory;

            var projectManager = new ProjectManagerFactory(projectManagerService, undoService, undoManagerCache,
                                                           connectorFactory, connectionFactory, blockSymbolFactory, sheetFactory);

            var server = new APlayServer(Int32.Parse(Properties.Settings.Default.ServerPort), projectManager,
                                         clientStateService);
        }
コード例 #14
0
        public void Transport_ConnectorFactory_CreateAdvanced()
        {
            RequestFactory requests  = new RequestFactory();
            IConnector     connector = ConnectorFactory.Create(requests, "id", "secret", UserAgent.WithDefaultFields(), Client.EuTestBaseUrl);

            Assert.NotNull(connector);
            Assert.AreEqual(connector.UserAgent.ToString(), UserAgent.WithDefaultFields().ToString());
        }
コード例 #15
0
        public void SetUp()
        {
            this.httpWebRequest = (HttpWebRequest)WebRequest.Create(this.baseUrl);
            this.requestMock    = MockRepository.GenerateStub <IRequestFactory>();

            this.connector = ConnectorFactory.Create(this.requestMock, this.merchantId, this.secret, this.userAgent, this.baseUrl);
            this.capture   = new Klarna.Rest.OrderManagement.Capture(this.connector, this.orderUrl, "1002");
        }
コード例 #16
0
        public PostMessageResponse Post(PostMessageRequest request)
        {
            this.ValidatePostMessageRequest(request);
            IConnector facebookConnector = ConnectorFactory.Create(ConnectorType.Facebook);

            facebookConnector.Post <PostMessageRequest, PostMessageResponse>(string.Empty, request);
            return(new PostMessageResponse());
        }
コード例 #17
0
        public void SetUp()
        {
            this.httpWebRequest = (HttpWebRequest)WebRequest.Create(this.baseUrl);
            this.requestMock    = MockRepository.GenerateStub <IRequestFactory>();

            this.connector     = ConnectorFactory.Create(this.requestMock, this.merchantId, this.secret, this.userAgent, this.baseUrl);
            this.checkoutOrder = new Klarna.Rest.Checkout.CheckoutOrder(this.connector, null);
        }
コード例 #18
0
 public void SetUp()
 {
     this.requestMock = MockRepository.GenerateStub <IRequestFactory>();
     this.merchantId  = "merchantId";
     this.secret      = "secret";
     this.userAgent   = UserAgent.WithDefaultFields();
     this.baseUrl     = new Uri("https://dummytesturi.test");
     this.connector   = ConnectorFactory.Create(this.requestMock, this.merchantId, this.secret, this.userAgent, this.baseUrl);
 }
コード例 #19
0
ファイル: TestServers.cs プロジェクト: stuarthillary/Sage-1
        public void TestResourceServerComplexDemands()
        {
            m_noAdmitCount = 0;
            m_admitCount   = 0;

            m_model = new Model();
            ((Model)m_model).RandomServer = new Randoms.RandomServer(54321, 100);

            ItemSource factory = CreatePatientGenerator("Patient_", 50, 5.0, 3.0);
            Queue      queue   = new Queue(m_model, "TestQueue", Guid.NewGuid());

            ConnectorFactory.Connect(factory.Output, queue.Input);

            NormalDistribution   dist    = new NormalDistribution(m_model, "SvcDistribution", Guid.NewGuid(), 240.0, 45.0);
            IPeriodicity         per     = new Periodicity(dist, Periodicity.Units.Minutes);
            SelfManagingResource nursing = new SelfManagingResource(m_model, "Nursing", Guid.NewGuid(), 7.0, 7.0, false, false, true);
            SelfManagingResource clerks  = new SelfManagingResource(m_model, "Clerks", Guid.NewGuid(), 6.0, 6.0, false, false, true);
            SelfManagingResource doctors = new SelfManagingResource(m_model, "Doctors", Guid.NewGuid(), 2.0, 2.0, false, false, true);

            MultiResourceTracker mrt = new MultiResourceTracker(m_model);

            mrt.Filter = ResourceEventRecordFilters.AcquireAndReleaseOnly;
            //mrt.Filter = ResourceTracker.Filters.AllEvents;
            mrt.AddTargets(nursing, clerks, doctors);

            IResourceRequest[] demands = new IResourceRequest[] {
                new SimpleResourceRequest(.20, nursing),
                new SimpleResourceRequest(.15, clerks),
                new SimpleResourceRequest(.05, doctors)
            };

            ResourceServer rs = new ResourceServer(m_model, "RscSvr", Guid.NewGuid(), per, demands);

            rs.PlaceInService();
            ConnectorFactory.Connect(queue.Output, rs.Input);

            factory.Output.PortDataPresented += new PortDataEvent(FactoryOutput_PortDataPresented);
            queue.LevelChangedEvent          += new QueueLevelChangeEvent(Queue_LevelChangedEvent);
            rs.ServiceBeginning += new ServiceEvent(Server_ServiceBeginning);
            rs.ServiceCompleted += new ServiceEvent(Server_ServiceCompleted);

            m_model.Start();

//          string dataFileName = Highpoint.Sage.Utility.DirectoryOperations.GetAppDataDir() + @"Data.csv";
//			System.IO.TextWriter tw = new System.IO.StreamWriter(dataFileName);
//			foreach ( ResourceEventRecord rer in mrt ) {
//				tw.WriteLine(rer.When.ToLongTimeString()+","
//					+rer.Resource.Name+","
//					+rer.Action.ToString()+","
//					+rer.Available	);
//			}
//			tw.Close();
//			System.Diagnostics.Process.Start("excel.exe","\""+dataFileName+"\"");

            Console.WriteLine(new CSVDumper(mrt, new CompoundComparer(ResourceEventRecord.ByAction(false), ResourceEventRecord.ByTime(false))).ToString());
        }
コード例 #20
0
        /// <summary>
        /// Inicia una transacción de base de datos.
        /// </summary>
        public void BeginTransaction()
        {
            if (Transaction == null)
            {
                Open();
                Transaction = ConnectorFactory.GetTransaction(Connection);
            }

            Command.Transaction = Transaction;
        }
コード例 #21
0
ファイル: ServiceFactory.cs プロジェクト: jpsietsma/WACDB
        private WACControlConnector GetConnector(Control _control)
        {
            // Get ConnectorFactory for this session, create one if not there
            ConnectorFactory cFac = GetConnectorFactory(_control.Page.Session);

            WACControlConnector cCon;

            cCon = GetConnector(_control, cFac);
            //cCon.Connect(_control, cFac);
            return(cCon);
        }
コード例 #22
0
        private async Task Connect()
        {
            ConnectorFactory connectorFactory = new ConnectorFactory();

            connectorFactory.Encrypt = true;
            Connector connector = connectorFactory.Create();

            using Transporter transporter = await connector.Execute(cancellationTokenSource.Token);

            await transporter.Write(this, cancellationTokenSource.Token);
        }
コード例 #23
0
ファイル: ServiceFactory.cs プロジェクト: jpsietsma/WACDB
 private void RegisterConnectorComponents(ServiceRequest _request)
 {
     try
     {
         Control          _control = _request.Requestor;
         ConnectorFactory _factory = GetConnectorFactory(_control.Page.Session);
         _factory.RegisterClassTypes();
     }
     catch (Exception ex)
     {
         WACAlert.Show(ex.Message, 0);
     }
 }
コード例 #24
0
        public IServerConnector Create(ConnectorFactory networkFactory)
        {
            switch (networkFactory)
            {
            case ConnectorFactory.TransmissionControlProtocol:
                return(this.container.Resolve <IServerConnector>("normal"));

            case ConnectorFactory.SecureLitleProtocol:
                return(this.container.Resolve <IServerConnector>());

            default: throw new NotImplementedException();
            }
        }
コード例 #25
0
ファイル: Request.cs プロジェクト: vadyaravadim/SeltUploader
        internal static IOrganizationService ConnectionCrm()
        {
            ConnectorFactory connector  = new ConnectorFactory();
            ConnectionData   connection = new ConnectionData
            {
                Login    = AppSettings.CrmLogin,
                Password = AppSettings.CrmPassword,
                Url      = AppSettings.CrmUrlAuth
            };
            IOrganizationService orgSvc = connector.Create(connection, ConnectorFactory.Developer.Metrium);

            return(orgSvc);
        }
コード例 #26
0
        public Client GetClient(IMarket market)
        {
            if (PaymentMethodDto != null)
            {
                var connectionConfiguration = GetCheckoutConfiguration(market);
                var connector = ConnectorFactory.Create(connectionConfiguration.Username, connectionConfiguration.Password, new Uri(connectionConfiguration.ApiUrl));
                connector.UserAgent.AddField("Platform", "EPiServer", typeof(EPiServer.Core.IContent).Assembly.GetName().Version.ToString(), new string[0]);
                connector.UserAgent.AddField("Module", "Klarna.Checkout", typeof(Klarna.Checkout.KlarnaCheckoutService).Assembly.GetName().Version.ToString(), new string[0]);

                _client = new Client(connector);
            }
            return(_client);
        }
コード例 #27
0
        private async Task Connect()
        {
            ConnectorFactory connectorFactory = new ConnectorFactory();

            connectorFactory.Uri = new Uri(webSockets ? "ws://localhost:5001/" : "tcp://127.0.0.1:7000");
            for (int i = 0; i < Connections; i++)
            {
                DataPacket  dataPacket  = dataPackets[0][i];
                Connector   connector   = connectorFactory.Create();
                Transporter transporter = await connector.Execute(cancellationTokenSource.Token);

                tasks.Add(transporter, Send(transporter, dataPacket));
            }
        }
コード例 #28
0
 /// <summary>
 /// Rellena los DbCommands (INSERT, UPDATE, DELETE) del Adaptador
 /// </summary>
 /// <param name="adapter">Adaptador a llenar</param>
 private void FillAdapterCommands(DbDataAdapter adapter)
 {
     using (DbDataAdapter auxAdapter = ConnectorFactory.GetDataAdapter(Server))
     {
         auxAdapter.SelectCommand = adapter.SelectCommand;
         using (DbCommandBuilder commandBuilder = ConnectorFactory.GetCommandBuilder(Server, auxAdapter))
         {
             adapter.DeleteCommand = commandBuilder.GetDeleteCommand(true);
             adapter.UpdateCommand = commandBuilder.GetUpdateCommand(true);
             adapter.InsertCommand = commandBuilder.GetInsertCommand(true);
             SetupTransactionAdapterCommands(adapter);
         }
     }
 }
コード例 #29
0
ファイル: ServiceFactory.cs プロジェクト: jpsietsma/WACDB
        private WACViewModel GetViewModelForControl(ServiceRequest _request)
        {
            // Get ConnectorFactory for this session, create one if not there
            ConnectorFactory cFac = GetConnectorFactory(_request.Requestor.Page.Session);
            // Get Connector for this control, create one if not there
            WACControlConnector cCon = GetConnector(_request);
            // Get ViewModel for this control, create one if not there
            WACViewModel vMod = cCon.ViewModel;

            if (vMod == null)
            {
                vMod = cCon.GetViewModel(_request.Requestor, cFac) as WACViewModel;
            }
            return(vMod);
        }
コード例 #30
0
ファイル: ServiceFactory.cs プロジェクト: jpsietsma/WACDB
        private void ConnectControl(Control _control)
        {
            WACControlConnector _connector;
            ConnectorFactory    _factory = GetConnectorFactory(_control.Page.Session);

            try
            {
                _connector = _factory.GetConnectorForControl(_control);
                _connector.Connect(_control, _factory);
            }
            catch (Exception ex)
            {
                WACAlert.Show(ex.Message + " In " + this.ToString() + ".ConnectControl", 0);
            }
        }
コード例 #31
0
 public ConnectorTransport(Uri addr, ConnectorFactory factory)
     : base(addr, factory)
 {
     this.factory = factory;
 }
コード例 #32
0
 public TransportFactory()
 {
     conFactory = new ConnectorFactory(writerStorage, this);
     acpFactory = new AcceptorFactory(writerStorage, this);
     startAsyncDispatchers();
 }