Skip to content

Commit

Permalink
Update documentation compliance
Browse files Browse the repository at this point in the history
Update suppression method per @Tom-Kingstone comment
  • Loading branch information
Fraser Greenroyd committed Feb 16, 2024
1 parent 5af7e08 commit ac987ba
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
12 changes: 9 additions & 3 deletions BHoM_Engine/Compute/SuppressRecording.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,15 @@ public static partial class Compute
[Input("suppressNotes", "Determine whether to suppress BHoM Events of type NOTE from the log. Set to true to suppress these events.")]
public static void StartSuppressRecordingEvents(bool suppressErrors = false, bool suppressWarnings = false, bool suppressNotes = false)
{
m_SuppressError = suppressErrors;
m_SuppressWarning = suppressWarnings;
m_SuppressNote = suppressNotes;
//Only change the state of each suppresion flag if it is set to true - this will prevent the scenario where MethodA suppresses everything, then calls MethodB which suppresses only Warnings and the false flags would turn on errors/notes which MethodA wouldn't want - this will ensure that the suppresions are set until the StopSuppressRecordingEvents is called
if(suppressErrors)
m_SuppressError = suppressErrors;

if(suppressWarnings)
m_SuppressWarning = suppressWarnings;

if(suppressNotes)
m_SuppressNote = suppressNotes;
}

/***************************************************/
Expand Down
1 change: 1 addition & 0 deletions BHoM_Engine/Convert/ToText.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ public static string ToText(this MethodBase method, bool includePath = false, st
[Description("Provides a human-friendly text representation of a type.")]
[Input("type", "type to convert to text.")]
[Input("includePath", "If true, the path/namespace will be provided.")]
[Input("replaceGeneric", "If true, generic types will be replaced.")]
[Input("genericStart", "Start symbol used for the beginning of the generic parameters, if any. Usually, '<'.")]
[Input("genericSeparator", "Symbol used to separate the generic parameters. Usually, ','.")]
[Input("genericEnd", "Start symbol used for the end of the generic parameters, if any. Usually, '>'.")]
Expand Down
7 changes: 1 addition & 6 deletions BHoM_Engine/Query/Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,4 @@ public static List<Event> EventsSinceBookmark()

private static DateTime m_LastBookmark = DateTime.UtcNow; //Default to the current UTC time on load
}
}





}

0 comments on commit ac987ba

Please sign in to comment.