Exemplo n.º 1
0
 public override void Uninstall(DiscoDataContext context, bool uninstallData, ScheduledTaskStatus status)
 {
     if (uninstallData)
     {
         Internal.Helpers.UninstallData(context, Manifest, status);
     }
 }
Exemplo n.º 2
0
        public override void Install(DiscoDataContext database, ScheduledTaskStatus status)
        {
            var configStore = new ConfigurationStore(database);

            if (configStore.EmailConfiguration == null)
            {
                var defaultConfig = new ConfigurationModel
                {
                    CurrentVersion         = 1,
                    SmtpServerAddress      = "",
                    SmtpServerPort         = null,
                    EnableSsl              = false,
                    SmtpSenderAddress      = "",
                    AuthenticationRequried = false,
                    SmtpUsername           = "",
                    SmtpPassword           = "",
                    MessageConfig          = ConfigurationExtensions.CreateDefaultMessages()
                };

                configStore.EmailConfiguration = new JavaScriptSerializer().Serialize(defaultConfig);
                database.SaveChanges();
                status.SetFinishedMessage("Installed initial configuration");
            }
        }
Exemplo n.º 3
0
        public static void UninstallData(DiscoDataContext Database, PluginManifest Manifest, ScheduledTaskStatus Status)
        {
            Status.UpdateStatus("Removing Configuration");

            var config = new ConfigurationStore(Database);

            config.CustomerEntityId = null;
            config.CustomerUsername = null;
            Database.SaveChanges();

            // Storage Location will be cleared by the framework if requested by the user
        }
Exemplo n.º 4
0
 public static void UninstallData(DiscoDataContext database, PluginManifest manifest, ScheduledTaskStatus status)
 {
     status.UpdateStatus("Removing Plugin Configuration");
     new ConfigurationStore(database)
     {
         EmailConfiguration = null
     };
     database.SaveChanges();
 }
Exemplo n.º 5
0
 public override void Uninstall(DiscoDataContext Database, bool UninstallData, ScheduledTaskStatus Status)
 {
     if (UninstallData)
     {
         Internal.Helpers.UninstallData(Database, this.Manifest, Status);
     }
 }
 public ExecuteSequenceJobResult(ScheduledTaskStatus runStatus, string runError = null)
 {
     this.RunStatus = runStatus;
     this.RunError  = runError;
 }