Skip to content

Commit ac987ba

Browse files
author
Fraser Greenroyd
committed
Update documentation compliance
Update suppression method per @Tom-Kingstone comment
1 parent 5af7e08 commit ac987ba

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

BHoM_Engine/Compute/SuppressRecording.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,15 @@ public static partial class Compute
4040
[Input("suppressNotes", "Determine whether to suppress BHoM Events of type NOTE from the log. Set to true to suppress these events.")]
4141
public static void StartSuppressRecordingEvents(bool suppressErrors = false, bool suppressWarnings = false, bool suppressNotes = false)
4242
{
43-
m_SuppressError = suppressErrors;
44-
m_SuppressWarning = suppressWarnings;
45-
m_SuppressNote = suppressNotes;
43+
//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
44+
if(suppressErrors)
45+
m_SuppressError = suppressErrors;
46+
47+
if(suppressWarnings)
48+
m_SuppressWarning = suppressWarnings;
49+
50+
if(suppressNotes)
51+
m_SuppressNote = suppressNotes;
4652
}
4753

4854
/***************************************************/

BHoM_Engine/Convert/ToText.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ public static string ToText(this MethodBase method, bool includePath = false, st
161161
[Description("Provides a human-friendly text representation of a type.")]
162162
[Input("type", "type to convert to text.")]
163163
[Input("includePath", "If true, the path/namespace will be provided.")]
164+
[Input("replaceGeneric", "If true, generic types will be replaced.")]
164165
[Input("genericStart", "Start symbol used for the beginning of the generic parameters, if any. Usually, '<'.")]
165166
[Input("genericSeparator", "Symbol used to separate the generic parameters. Usually, ','.")]
166167
[Input("genericEnd", "Start symbol used for the end of the generic parameters, if any. Usually, '>'.")]

BHoM_Engine/Query/Events.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,4 @@ public static List<Event> EventsSinceBookmark()
9494

9595
private static DateTime m_LastBookmark = DateTime.UtcNow; //Default to the current UTC time on load
9696
}
97-
}
98-
99-
100-
101-
102-
97+
}

0 commit comments

Comments
 (0)