Example #1
0
 public static void ProcessRecord(ILogger logger, IUserInterface ui, HybridConfiguration hybridConfigurationObject, Func <IOnPremisesSession> createOnPremisesSessionFunc, Func <ITenantSession> createTenantSessionFunc, Action <Exception, ErrorCategory, object> writeErrorFunc, bool forceUpgrade, bool suppressOAuthWarning)
 {
     try
     {
         using (StandardWorkflow standardWorkflow = new StandardWorkflow(logger, ui, hybridConfigurationObject, createOnPremisesSessionFunc, createTenantSessionFunc))
         {
             standardWorkflow.TaskContext.Parameters.Set <bool>("_forceUpgrade", forceUpgrade);
             standardWorkflow.TaskContext.Parameters.Set <bool>("_suppressOAuthWarning", suppressOAuthWarning);
             Engine.Execute(standardWorkflow.TaskContext, standardWorkflow);
         }
     }
     catch (Exception ex)
     {
         LocalizedString localizedString = HybridStrings.ExceptionUpdateHybridConfigurationFailedWithLog(ex.ToString(), Environment.MachineName, logger.ToString());
         writeErrorFunc(new LocalizedException(localizedString), ErrorCategory.WriteError, null);
     }
 }