Ejemplo n.º 1
0
        public static ActionResult RemoveData(Session session)
        {
            Log.Session = session;
            Log.Write("Entered RemoveConfig");

            try
            {
                DataFiles.Remove("Authentication.xml");
                DataFiles.Remove("MediaAccess.xml");
                DataFiles.Remove("Services.xml");
                DataFiles.Remove("Streaming.xml");
                DataFiles.Remove("StreamingProfiles.xml");
                DataFiles.RemoveDirectory("Cache");
                DataFiles.Remove(@"Logs/Service.log");
                DataFiles.Remove(@"Logs/ServiceConfigurator.log");
                DataFiles.RemoveDirectoryIfEmpty("Logs");
                DataFiles.RemoveDirectoryIfEmpty();
            }
            catch (Exception ex)
            {
                Log.Write("RemoveConfig: Exception during uninstallation: {0}", ex.Message);
            }

            return(ActionResult.Success);
        }
Ejemplo n.º 2
0
        public static ActionResult RemoveWebMediaPortalData(Session session)
        {
            Log.Session = session;
            Log.Write("Entered RemoveWebMediaPortalConfig");

            try
            {
                DataFiles.Remove("WebMediaPortal.xml");
                DataFiles.Remove("WebMediaPortalHosting.xml");
                DataFiles.Remove(@"Logs/WebMediaPortal.log");
                DataFiles.Remove(@"Logs/WebMediaPortalHosting.log");
                DataFiles.Remove(@"Logs/WebMediaPortalIIS.log");
                DataFiles.RemoveDirectoryIfEmpty("Logs");
                DataFiles.RemoveDirectoryIfEmpty();
            }
            catch (Exception ex)
            {
                Log.Write("RemoveWebMediaPortalConfig: Exception during uninstallation: {0}", ex.Message);
            }

            return(ActionResult.Success);
        }