ExecutionSessionHelper
using Dynamo.Events;
using DynamoServices.Properties;
using System;
namespace Dynamo.Session
{
    public static class ExecutionSessionHelper
    {
        public static void ThrowIfNoNetworkMode()
        {
            IExecutionSession activeSession = ExecutionEvents.ActiveSession;
            if (activeSession != null && (bool)activeSession.GetParameterValue(ParameterKeys.NoNetworkMode))
                throw new InvalidOperationException(Resources.WebRequestOfflineWarning);
        }
    }
}