Пример #1
0
        public void TypesRegisterInContainer()
        {
            // arrange
            var sut = new AppHost();

            // act
            var result = sut.Container.Resolve<IRepository<File>>();

            // assert
            Assert.NotNull(result);
            Assert.IsType<FileRepository>(result);
        }
Пример #2
0
        /// <summary>
        /// The main.
        /// </summary>
        /// <param name="args">
        /// The args.
        /// </param>
        internal static void Main(string[] args)
        {
            string url = UrlForTheServer(args);
            using (var appHost = new AppHost())
            {
                appHost.Init();
                appHost.Start(url);

                Console.WriteLine("AppHost Created at {0}, listening on {1}", DateTime.Now, url);
                Console.ReadKey();
            }
        }