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


C# Manager.Start方法代码示例

本文整理汇总了C#中Manager.Start方法的典型用法代码示例。如果您正苦于以下问题:C# Manager.Start方法的具体用法?C# Manager.Start怎么用?C# Manager.Start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Manager的用法示例。


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

示例1: StartAndWait

        public void StartAndWait()
        {
            try
            {
                Manager = new Manager();

                StartSignalsListener();

                _log.Submit(LogLevel.Info, "Starting Services");

                Manager.Start();

                _log.Submit(LogLevel.Info, "Services started. Waiting for stop signal");

                StopResetEvent.WaitOne();

                Manager.Stop();
            }
            catch (Exception e)
            {
                _log.SubmitException(e);
            }

            Environment.Exit(0);
        }
开发者ID:abelsilva,项目名称:nugetory,代码行数:25,代码来源:UnixConsole.cs

示例2: Test

        public void Test()
        {
            System.Threading.AutoResetEvent evt = new System.Threading.AutoResetEvent(false);
            Packets.LicensePlatePacket p = null;
            int count = 0;

            Manager mnger = new Manager(new PacketSplitter());
            var parser = new Parsers.LicensePlateParser();
            parser.Handler += licensePlate =>
            {
                System.Diagnostics.Debug.WriteLine(licensePlate.LicensePlate.LicenseNumber);
                p = licensePlate;
                ++count;
                if (count > 1000)
                {
                    evt.Set();
                }
                
            };
            mnger.Parsers.Add(parser);

            mnger.Start();
            evt.WaitOne(10000);
            mnger.Stop();

            Assert.IsNotNull(p);
        }
开发者ID:vanan08,项目名称:damany,代码行数:27,代码来源:ManagerTest.cs

示例3: BeforeTestRun

 public static void BeforeTestRun()
 {
     MyManager = new Manager(false);
     MyManager.Settings.ExecutionDelay = 0;
     MyManager.Settings.Web.RecycleBrowser = true;
     MyManager.Start();            
 }
开发者ID:ageorgieva,项目名称:qa-academy,代码行数:7,代码来源:Hooks.cs

示例4: Main

        static void Main(string[] args)
        {
            string host = "127.0.0.1";
            bool help = false;
            int port = 8000;
            var p = new OptionSet {
               				{ "h|host=", v => host = v },
               				{ "p|port=", v => port = int.Parse(v) },
               				{ "?|help", v => help = v != null },
            };
            p.Parse(args);

            if (help)
            {
                p.WriteOptionDescriptions(Console.Out);
                // Syntax();
                return;
            }

            // set up manager
            var mgr = new Manager(new ManagerConfig { Port = port, Hostname = host });
            mgr.Start();

            Console.WriteLine("Worker(s) running, hit [enter] to exit");
            Console.ReadLine();

            mgr.Stop();
        }
开发者ID:possan,项目名称:mapreduce,代码行数:28,代码来源:Program.cs

示例5: Setup

        public Manager Setup(String _homePage)
        {
            // Initialize the settings
            Settings mySettings = new Settings();

            // Set the default browser + Silverlight
            mySettings.Web.DefaultBrowser = BrowserType.InternetExplorer;
            mySettings.Web.EnableSilverlight = true;
            mySettings.ExecutionDelay = 0;
            mySettings.AnnotateExecution = false;

            // Create the manager object
            Manager myManager = new Manager(mySettings);

            // Start the manager
            myManager.Start();

            // Launch a new browser instance. [This will launch an IE instance given the setting above]
            myManager.LaunchNewBrowser();

            // Navigate to a certain web page
            myManager.ActiveBrowser.NavigateTo(_homePage);

            return myManager;
        }
开发者ID:ekostadinov,项目名称:MyProjects,代码行数:25,代码来源:BaseTest.cs

示例6: InitizeBrowser

 private void InitizeBrowser()
 {
     Settings mySettings = new Settings();
     mySettings.DisableDialogMonitoring = true;
     mySettings.Web.DefaultBrowser = BrowserType.InternetExplorer;
     mySettings.Web.KillBrowserProcessOnClose = true;
     var manager = new Manager(mySettings);
     manager.Start();
     Manager.Current.LaunchNewBrowser();
 }
开发者ID:kennedykinyanjui,项目名称:Projects,代码行数:10,代码来源:BaseTest.cs

示例7: OneTimeSetUp

        public void OneTimeSetUp()
        {
            Logging.LogFactory.ForceConsoleMode = true;
            DataManager.DataInMemory = true;

            // start nugetory server
            Manager = new Manager();

            Manager.Start();
        }
开发者ID:abelsilva,项目名称:nugetory,代码行数:10,代码来源:SetUp.cs

示例8: Main

        static void Main(string[] args)
        {
            Console.WriteLine("Please enter the target folder (will be deleted if already exists)");
            var targetFolder = Console.ReadLine();

            var manager = new Manager(targetFolder);
            manager.Message += new MessageEventHandler(manager_Message);

            manager.Start();

            Console.WriteLine("Done. Press any key to exit.");
            Console.ReadKey(true);
            Console.Clear();
            Console.Write("Unloading...");
        }
开发者ID:Dustify,项目名称:MusicOLator,代码行数:15,代码来源:Program.cs

示例9: InitializeBrowser

 private void InitializeBrowser()
 {
     if (Manager.Current == null)
     {
         Settings mySettings = new Settings();
         mySettings.Web.KillBrowserProcessOnClose = true;
         mySettings.DisableDialogMonitoring = true;
         mySettings.UnexpectedDialogAction = UnexpectedDialogAction.HandleAndContinue;
         mySettings.Web.ExecutingBrowsers.Add(BrowserExecutionType.InternetExplorer);
         mySettings.Web.Browser = BrowserExecutionType.InternetExplorer;
         mySettings.Web.DefaultBrowser = BrowserType.InternetExplorer;
         var manager = new Manager(mySettings);
         manager.Start();
     }
     Manager.Current.LaunchNewBrowser();
 }
开发者ID:kennedykinyanjui,项目名称:Projects,代码行数:16,代码来源:BaseTest.cs

示例10: OpenInternalNetworkConnections

 public void OpenInternalNetworkConnections()
 {
     //HELPER VARIABLES
     bool success = false;
     while (success == false)
     {
         try
         {
             //START LISTENING TO NETWORK
             networkManger2 = new Manager<InternalClient>(_host_2, _port_2);
             networkManger2.Start();
             success = true;
             Console.WriteLine("Accpeting map connections from: {0}", _port_2);
         }
         catch (SocketException e)
         {
             if (e.ErrorCode == 10049)
             {
                 Trace.TraceError("The ip adress {0}:{1} is not an local ip adress", _host_1, _port_1);
                 Console.WriteLine("The ip adress {0}:{1} is not an local ip adress", _host_1, _port_1);
                 Thread.Sleep(60000);
             }
             else if (e.ErrorCode == 10048)
             {
                 Trace.TraceError("The port number is already in use: {0}:{1}", _host_1, _port_1);
                 Console.WriteLine("The port number is already in use: {0}:{1}", _host_1, _port_1);
                 Thread.Sleep(60000);
             }
             else
             {
                 throw;
             }
         }
         catch (FormatException)
         {
             Trace.TraceError("The ip adress {0}:{1} is invalid formatted", _host_1, _port_1);
             Console.WriteLine("The ip adress {0}:{1} is invalid formatted", _host_1, _port_1);
             Thread.Sleep(60000);
         }
         catch (Exception e)
         {
             Console.WriteLine(e);
             Trace.TraceError(e.Message);
             Thread.Sleep(60000);
         }
     }
 }
开发者ID:ELMASTERS,项目名称:SagaRevised,代码行数:47,代码来源:Managers.NetworkService.cs

示例11: showShareDialog

 private static int showShareDialog(string[] args)
 {
     if (args.Length < 2) {
     System.Console.Write ("ERROR: iFolder ID not specified\n");
     return -1;
        }
        Manager manager = new Manager();
        manager.Start();
        iFolderPropertiesDialog propsDialog;
        propsDialog = new iFolderPropertiesDialog (args [1], manager);
        propsDialog.CurrentPage = 1;
        propsDialog.Run ();
        propsDialog.Hide ();
        propsDialog.Destroy ();
        manager.Stop();
        return 0;
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:17,代码来源:nautilus-ifolder.cs

示例12: BaseWebAiiAutomater

        public BaseWebAiiAutomater(WebconfigsConfig config)
            : base(config)
        {
            if (_manager != null)
            {
                foreach (var broswer in _manager.Browsers)
                {
                    broswer.Close();

                }
                return;
            }

            var settings = new Settings(BrowserType.InternetExplorer, @"c:\log\") { ClientReadyTimeout = 60 * 1000 };

            _manager = new Manager(settings);
            _manager.Start();
        }
开发者ID:Roballen,项目名称:WebGrab,代码行数:18,代码来源:BaseWebAiiAutomater.cs

示例13: InitializeBrowser

        private void InitializeBrowser()
        {
            if (Manager.Current == null)
            {
                var mySettings = new Settings
                    {
                        Web = { KillBrowserProcessOnClose = true },
                        DisableDialogMonitoring = true,
                        UnexpectedDialogAction = UnexpectedDialogAction.HandleAndContinue
                    };

                mySettings.Web.ExecutingBrowsers.Add(BrowserExecutionType.InternetExplorer);
                mySettings.Web.Browser = BrowserExecutionType.InternetExplorer;
                mySettings.Web.DefaultBrowser = BrowserType.InternetExplorer;
                mySettings.ElementWaitTimeout = 10000;
                var manager = new Manager(mySettings);
                manager.Start();
            }

            Manager.Current.LaunchNewBrowser();
            Manager.Current.ActiveBrowser.Window.Maximize();
            Manager.Current.Settings.Web.RecycleBrowser = true;
        }
开发者ID:Team-Griffin-SQA-2015,项目名称:TelerikAcademyCustomTestFramework,代码行数:23,代码来源:BaseTest.cs

示例14: InitializeBrowser

        private void InitializeBrowser()
        {
            Settings mySettings = new Settings
            {
                Web =
                {
                    ////DefaultBrowser = BrowserType.Chrome,
                    DefaultBrowser = BrowserType.InternetExplorer,
                    ////DefaultBrowser = BrowserType.FireFox,
                    RecycleBrowser = true,
                },
                AnnotateExecution = true,
                CreateLogFile = true,
                ExecutionDelay = 100
            };

            Manager manager = new Manager(mySettings);
            manager.Start();
            Manager.Current.LaunchNewBrowser();
            Manager.Current.ActiveBrowser.Window.Maximize();
            ////manager.DialogMonitor.AddDialog(new ConfirmDialog(Manager.Current.ActiveBrowser, DialogButton.OK));
            ////manager.DialogMonitor.Start();
            Manager.Current.ActiveBrowser.ClearCache(BrowserCacheType.Cookies);
        }
开发者ID:plamenti,项目名称:Telerik2015,代码行数:24,代码来源:BaseTest.cs

示例15: OpenPublicNetworkConnections

 public void OpenPublicNetworkConnections()
 {
     //HELPER VARIABLES
     bool success = false;
     while (success == false)
     {
         try
         {
             //START LISTENING TO NETWORK
             networkManger = new Manager<LogonClient>(_host_1, _port_1);
             networkManger.Start();
             success = true;
             Console.WriteLine("Accpeting gateway connections from: {0}", _port_1);
         }
         catch (SocketException e)
         {
             if (e.ErrorCode == 10049)
             {
                 WriteWarning("The ip adress {0}:{1} is not an local ip adress", _host_1, _port_1);
                 Console.WriteLine("The ip adress {0}:{1} is not an local ip adress", _host_1, _port_1);
                 Thread.Sleep(60000);
             }
             else if (e.ErrorCode == 10048)
             {
                 WriteWarning("The port number is already in use: {0}:{1}", _host_1, _port_1);
                 Console.WriteLine("The port number is already in use: {0}:{1}", _host_1, _port_1);
                 Thread.Sleep(60000);
             }
             else
             {
                 Console.WriteLine(e);
                 WriteWarning("NetworkManager", e.Message);
                 Thread.Sleep(60000);
             }
         }
         catch (FormatException)
         {
             WriteWarning("NetworkManager", "The ip adress {0}:{1} is invalid formatted", _host_1, _port_1);
             Console.WriteLine("The ip adress {0}:{1} is invalid formatted", _host_1, _port_1);
             Thread.Sleep(60000);
         }
         catch (Exception e)
         {
             Console.WriteLine(e);
             WriteError("NetworkManager", e.Message);
             Thread.Sleep(60000);
         }
     }
 }
开发者ID:ELMASTERS,项目名称:SagaRevised,代码行数:49,代码来源:Managers.NetworkService.cs


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