本文整理汇总了C#中Controller.Start方法的典型用法代码示例。如果您正苦于以下问题:C# Controller.Start方法的具体用法?C# Controller.Start怎么用?C# Controller.Start使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Controller
的用法示例。
在下文中一共展示了Controller.Start方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
public static void Main(string[] args)
{
/*var argsList = args.ToList();
if (argsList.Contains("--seed"))
{
if (!AppEnvDebug)
throw new Exception("Running DB seeds is a debug only feature");
var seedToRun = argsList.ElementAt(argsList.IndexOf("--seed") + 1);
//AppDatabase.SeedsRunner.RunSeed(seedToRun);
//AccountDatabase.SeedsRunner.RunSeed(seedToRun);
return;
}*/
if (AppEnvDebug)
{
// Allow self-signed SSL certs in debug mode
ServicePointManager.ServerCertificateValidationCallback +=
(sender, certificate, chain, sslPolicyErrors) => true;
}
AppModel.Init();
_controller = new Controller();
_controller.Start();
}
示例2: Start
public static void Start(string name)
{
var controller = new Controller
{
Configuration = @"config.xml",
CcTrayPassword = GetKey("CcTrayPassword", "**Fish22"),
CcTrayUsername = GetKey("CcTrayUsername", "owainp"),
HttpTimeout = Convert.ToInt32(GetKey("HttpTimeout", "20")),
PollTime = Convert.ToInt32(GetKey("PollTime", "10")),
CcTrayUrl = GetKey("CcTrayUrl", "http://build.london.ttldev.local:8153/go/cctray.xml")
};
controller.Start();
}
示例3: test
public void test()
{
var controller = new Controller();
var stopperMock = MockRepository.GenerateMock<IStopper>();
stopperMock.Expect(x => x.Stop).Return(false).Repeat.Once();
stopperMock.Expect(x => x.Stop).Return(true).Repeat.Once();
controller.Container.Kernel.AddComponentInstance<IStopper>(stopperMock);
controller.CcTrayUrl = "http://localhost/Cctray.xml";
controller.CcTrayUsername = "username";
controller.CcTrayPassword = "password";
controller.HttpTimeout = 30;
controller.PollTime = 1;
controller.Configuration = @"TestData/Config/RealUsers.xml";
controller.Start();
stopperMock.VerifyAllExpectations();
}
示例4: Playground
public void Playground()
{
ClientSetting clientSetting = new ClientSetting
{
Enabled = true,
Name = "local api",
Ping = new PingSetting
{
Interval = 5000
}
};
Controller controller = new Controller(clientSetting, null, null, null);
controller.Start();
Thread.Sleep(Timeout.Infinite);
}