public MissingAttribute(SCC.Base faultingCrm, Exception innerException) : base(String.Format( "CRM {0} failed to access a required attribute.", faultingCrm.Type), innerException) { }
void DetermineCrmAndCreate() { SCC.Base lastCrm = crmInstance; try { XmlNode crm = configurationFile.SelectSingleNode( "/SafemateConfiguration/CrmEngine"); String type = crm.Attributes["type"].Value; account = configurationFile.SelectSingleNode( "/SafemateConfiguration/Account").Attributes["name"].Value; SCLP.LogProxy.Log(SCLP.LogLevel.Info, String.Format( "The CRM interface \"{0}\" has been selected and is being activated.", type)); if (crmInstance.Type != type) { crmInstance.Shutdown(); crmInstance = SCC.Factory.CreateCrmOfType(type, crm, account); lastCrm = crmInstance; } } catch { SCLP.LogProxy.Log(SCLP.LogLevel.Error, "CRM Interface failed to activate. Will try with new details later."); crmInstance = lastCrm; } SCB.Backup.CrmInstance = crmInstance; }
public GeneralFault(SCC.Base faultingCrm, Exception innerException) : base(String.Format( "General failure reports by {0} CRM.", faultingCrm.Type), innerException) { }
public Configuration(EventLog eventLogInstance) { SCLP.LogProxy.Log(SCLP.LogLevel.Info, "Safemate Backup Service v__MM_VERSION__"); SCLP.LogProxy.Log(SCLP.LogLevel.Info, "Initializing " + this.ToString()); safemateRootPath = Path.GetDirectoryName( Assembly.GetExecutingAssembly().Location); safemateConfigurationPath = safemateRootPath + @"\Safemate.Configuration.xml"; configurationFile = new XmlDocument(); configurationInfo = new FileInfo(safemateConfigurationPath); failedCopyOperations = new Dictionary <String, CopyOperationErrorBlock>(); menumateTargetDetails = new String[3]; configurationWriteTime = FCX.Helper.GetCurrentWriteTime( configurationInfo); resumeFailedOperationMonitor = new Timer(28800000); resumeFailedOperationMonitor.AutoReset = true; resumeFailedOperationMonitor.Elapsed += ResumeFailedOperationMonitorHandler; SCC.Base.UpdateInterval = 1; crmInstance = new SCC.Base(); SCLP.LogProxy.EventLogInstance = eventLogInstance; SCLP.LogProxy.Log(SCLP.LogLevel.Info, "Safemate v__MM_VERSION__"); SCLP.LogProxy.Log(SCLP.LogLevel.Info, String.Format( "Safemate binary located at {0}\n" + " Safemate configuration file located at {1}\n" + " Hooking Filemate.Core.EventHub handlers...", safemateRootPath, safemateConfigurationPath)); FCSH.EventHub.AddHandler(FCSH.EhHandlerType.Failure, CopyOperationFailureEventHandler); FCSH.EventHub.AddHandler( FCSH.EhHandlerType.BackupInitiation, CopyOperationOnTransferEventHandler); FCSH.EventHub.AddHandler( FCSH.EhHandlerType.BackupCompletion, CopyOperationOnTransferCompletionEventHandler); FCSH.EventHub.AddHandler( FCSH.EhHandlerType.CopyOperationCreation, CopyOperationCreationEventHandler); SCLP.LogProxy.Log(SCLP.LogLevel.Info, "Filemate handlers hooked."); crmCredentialCheckTimer = new Timer(14400000); crmCredentialCheckTimer.AutoReset = true; crmCredentialCheckTimer.Elapsed += new ElapsedEventHandler(CrmCredentialPullHandler); InitializeConfigurationMonitoring(); }
public CannotLogin(SCC.Base faultingCrm, Exception innerException) : base(String.Format("Login rejected by {0} CRM", faultingCrm.Type), innerException) { }
public CannotLogin(SCC.Base faultingCrm) : base(String.Format("Login rejected by {0} CRM", faultingCrm.Type)) { }
public MissingAttribute(SCC.Base faultingCrm) : base(String.Format( "CRM {0} failed to access a required attribute.", faultingCrm.Type)) { }