Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/nuget/Ginger/GingerCore/System.…
Browse files Browse the repository at this point in the history
…IO.Packaging-8.0.1
  • Loading branch information
Maheshkale447 authored Oct 10, 2024
2 parents dceae3e + e64cec8 commit c2ac5fc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Ginger/Ginger/Run/RunnerNameValidationRule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ public override ValidationResult Validate(object value, CultureInfo cultureInfo)
: new ValidationResult(true, null);
}

private bool IsRunnerNameValid(object value)
private static bool IsRunnerNameValid(object value)
{
return value == null || string.IsNullOrEmpty(value.ToString()) || string.IsNullOrWhiteSpace(value.ToString());
return string.IsNullOrWhiteSpace(value?.ToString());
}
}
}
12 changes: 4 additions & 8 deletions Ginger/GingerCoreCommon/Repository/BusinessFlowLib/Activity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -524,10 +524,8 @@ public ObservableList<IAct> Acts
{
get
{
if (mActs == null)
{
mActs = [];
}
mActs ??= [];

if (mActs.LazyLoad)
{
mActs.LoadLazyInfo();
Expand Down Expand Up @@ -557,10 +555,8 @@ public ObservableList<VariableBase> Variables
{
get
{
if (mVariables == null)
{
mVariables = [];
}
mVariables ??= [];

if (mVariables.LazyLoad)
{
mVariables.LoadLazyInfo();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ public void RunSetStart(string execResultsFolder, long maxFolderSize, DateTime c
((ExecutionLogger)mExecutionLogger).SetRunsetFolder(execResultsFolder, maxFolderSize, currentExecutionDateTime, offline);
if (!offline)
{
ExecutionProgressReporterListener.AddExecutionDetailsToLog(ExecutionProgressReporterListener.eExecutionPhase.Start, GingerDicser.GetTermResValue(eTermResKey.RunSet), WorkSpace.Instance.RunsetExecutor.RunSetConfig.Name, null);
ExecutionProgressReporterListener.AddExecutionDetailsToLog(ExecutionProgressReporterListener.eExecutionPhase.Start, GingerDicser.GetTermResValue(eTermResKey.RunSet), string.Format("{0} (ID:{1})", WorkSpace.Instance.RunsetExecutor.RunSetConfig.Name, WorkSpace.Instance.RunsetExecutor.RunSetConfig.Guid) , null);
}
}

Expand Down Expand Up @@ -457,7 +457,7 @@ private static string folderNameNormalazing(string folderName)
public override void ActionStart(uint eventTime, Act action)
{
SetActionFolder(action);
ExecutionProgressReporterListener.AddExecutionDetailsToLog(ExecutionProgressReporterListener.eExecutionPhase.Start, "Action", string.Format("{0} (ID:{1}, ParentID:{2})", action.Description, action.Guid, action.ExecutionParentGuid), null);
ExecutionProgressReporterListener.AddExecutionDetailsToLog(ExecutionProgressReporterListener.eExecutionPhase.Start, "Action", string.Format("{0} (ID:{1}, ParentID:{2}, ParentActivityID: {3})", action.Description, action.Guid, action.ExecutionParentGuid, mCurrentActivity?.Guid), null);
}
// remove
public void SetActionFolder(Act action)
Expand Down Expand Up @@ -593,7 +593,7 @@ public override void ActionEnd(uint eventTime, Act action, bool offlineMode = fa

if (!offlineMode)
{
ExecutionProgressReporterListener.AddExecutionDetailsToLog(ExecutionProgressReporterListener.eExecutionPhase.End, "Action", string.Format("{0} (ID:{1}, ParentID:{2})", action.Description, action.Guid, action.ExecutionParentGuid), AR);
ExecutionProgressReporterListener.AddExecutionDetailsToLog(ExecutionProgressReporterListener.eExecutionPhase.End, "Action", string.Format("{0} (ID:{1}, ParentID:{2}, ParentActivityID: {3})", action.Description, action.Guid, action.ExecutionParentGuid, mCurrentActivity?.Guid), AR);
}
}
catch (Exception ex)
Expand Down
4 changes: 2 additions & 2 deletions Ginger/GingerCoreNET/log4netLib/GingerLog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ public static void ToLog(eLogLevel logLevel, string messageToLog, Exception exce
break;
}
}
catch (Exception ex)
catch
{
//failed to write to log
throw (ex);
throw;
}
}

Expand Down

0 comments on commit c2ac5fc

Please sign in to comment.