Example #1
0
        static void Main(string[] args)
        {
            AdhesiveFramework.Start();
            var host = WcfServiceHostFactory.CreateServiceHost <FuckService>();

            host.Open();
            Console.WriteLine("FuckService started...");
            Console.ReadLine();
            host.Close();
            AdhesiveFramework.End();
        }
Example #2
0
        static void Main(string[] args)
        {
            AdhesiveFramework.Start();
            var host = WcfServiceHostFactory.CreateServiceHost <WcfConfigService>();

            host.Open();
            Console.WriteLine("Adhesive.DistributedService.Config.ConsoleHost started...");
            Console.ReadLine();
            host.Close();
            AdhesiveFramework.End();
        }
Example #3
0
 protected override void OnStart(string[] args)
 {
     try
     {
         AdhesiveFramework.Start();
         host = WcfServiceHostFactory.CreateServiceHost <WcfConfigService>();
         host.Open();
     }
     catch (Exception ex)
     {
         LocalLoggingService.Error("Windows服务启动的时候出错,信息为 {0}", ex.ToString());
         Environment.Exit(0);
     }
 }
        private void InitializeDropDownListItems(DropDownList listControl)
        {
            listControl.Items.Clear();
            if (IsNullable)
            {
                listControl.Items.Add(new ListItem(string.Empty));
            }
            var typeOfEnum = WcfServiceHostFactory.GetType(EnumType, true);
            var descs      = GetDescriptions(typeOfEnum);
            var en         = descs.GetEnumerator();

            while (en.MoveNext())
            {
                listControl.Items.Add(new ListItem(en.Current.Value, (en.Current.Key).ToString()));
            }
        }
Example #5
0
        static void Main(string[] args)
        {
            WcfLogServer.Start();
            try
            {
                using (var host = WcfServiceHostFactory.CreateServiceHost <WcfLogService>())
                {
                    host.Open();
                    Console.WriteLine("Log service started");
                    Console.ReadLine();
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            Console.ReadLine();

            WcfLogServer.End();
        }
Example #6
0
        static void Main(string[] args)
        {
            ConfigUpdateManager.InitHeart();

            try
            {
                using (var host = WcfServiceHostFactory.CreateServiceHost <WcfConfigService>())
                {
                    host.Open();
                    Console.WriteLine("Config service started");
                    Console.ReadLine();
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

            Console.ReadLine();
        }
Example #7
0
 private static void StartService()
 {
     host = WcfServiceHostFactory.CreateServiceHost <Service>();
     host.Open();
 }