Res.Client.ResPublishEngine.Dispose C# (CSharp) 메소드

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void
        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }

Same methods

ResPublishEngine::Dispose ( bool disposing ) : void

Usage Example

예제 #1
0
파일: Program.cs 프로젝트: heartysoft/res
        static void Main(string[] args)
        {
            string endpoint = null;

            if(args.Length > 0)
                if (args[0] == "-e")
                    endpoint = args[1];

            if (endpoint == null)
                endpoint = ConfigurationManager.AppSettings["res"];

            if(endpoint == null)
                throw new ArgumentException("Usage: res.dira.exe -e endpoint, or use an app setting named res with the endpoint as the value");

            Console.WriteLine("Hello...shall we try out the res server?");

            Console.WriteLine("Starting client engine for {0}...", endpoint);
            var engine = new ResPublishEngine(endpoint);

            GlobalHack.SetEngine(engine);

            Console.WriteLine("Client engine started.");

            var cmdr = new CmdR("input>", new[] {"exit"});
            cmdr.AutoRegisterCommands();

            cmdr.Run(args);

            engine.Dispose();
            Console.WriteLine("Bye bye.");
        }