aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/SideChains/RealTimeGraphX/ExtensionMethods/IGraphComponentExtensions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/SideChains/RealTimeGraphX/ExtensionMethods/IGraphComponentExtensions.cs')
-rw-r--r--Software/Visual_Studio/SideChains/RealTimeGraphX/ExtensionMethods/IGraphComponentExtensions.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX/ExtensionMethods/IGraphComponentExtensions.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX/ExtensionMethods/IGraphComponentExtensions.cs
new file mode 100644
index 000000000..e6946394e
--- /dev/null
+++ b/Software/Visual_Studio/SideChains/RealTimeGraphX/ExtensionMethods/IGraphComponentExtensions.cs
@@ -0,0 +1,27 @@
+using RealTimeGraphX;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+/// <summary>
+/// Contains a set of <see cref="IGraphComponent"/> extension methods.
+/// </summary>
+public static class IGraphComponentExtensions
+{
+ /// <summary>
+ /// Throws a null argument exception if the specified component is null.
+ /// </summary>
+ /// <param name="component">The component.</param>
+ /// <param name="message">The message.</param>
+ /// <exception cref="NullReferenceException"></exception>
+ public static void ThrowIfNull(this IGraphComponent component, String message)
+ {
+ if (component == null)
+ {
+ throw new NullReferenceException(message);
+ }
+ }
+}
+