Ejemplo n.º 1
0
        public static DataServer get()
        {
            if (instance == null)
            {
                instance = new DataServer();
            }

            return(instance);
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Wel...");

            ServiceHost   host;
            NetTcpBinding tcp = new NetTcpBinding();

            host = new ServiceHost(DataServer.get());
            host.AddServiceEndpoint(typeof(DataServerInterface), tcp, "net.tcp://0.0.0.0:8100/DataService");
            host.Open();

            Console.WriteLine("...come! System online.");
            Console.ReadLine();

            host.Close();
        }