Esempio n. 1
0
        static void Main(string[] args)
        {
            //The context holds the active data for the console application.
            sSettings = new ConsoleSettings(args);

            sClient    = new MicroservicePersistenceWrapper <Guid, MondayMorningBlues>("TestClient", sSettings, ClientConfig);
            sServer    = new MicroservicePersistenceWrapper <Guid, MondayMorningBlues>("TestServer", sSettings, ServerConfig, ServerInit);
            sApiServer = new ApiPersistenceConnector <Guid, MondayMorningBlues>(ApiConfig);

            //Attach the client events.
            sClient.StatusChanged    += StatusChanged;
            sServer.StatusChanged    += StatusChanged;
            sApiServer.StatusChanged += StatusChanged;

            //Show the main console menu.
            sMenuMain.Value.Show(args, shortcut: sSettings.Shortcut);

            //Detach the client events to allow the application to close.
            sClient.StatusChanged    -= StatusChanged;
            sServer.StatusChanged    -= StatusChanged;
            sApiServer.StatusChanged -= StatusChanged;
        }
 static void ApiConfig(ApiPersistenceConnector <Guid, MondayMorningBlues> wrapper)
 {
 }