aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/SideChains/RealTimeGraphX/ExtensionMethods/IGraphComponentExtensions.cs
blob: e6946394ea7ac3152fc3e34c782451133227f42b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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);
        }
    }
}