Skip to content

Instantly share code, notes, and snippets.

@gindyo
Last active March 25, 2016 17:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gindyo/c46ffb7b0ad5c6ae6f16 to your computer and use it in GitHub Desktop.
Save gindyo/c46ffb7b0ad5c6ae6f16 to your computer and use it in GitHub Desktop.
using System;
namespace Glimpse.Core.Extensibility
{
/// <summary>
/// The context passed into the <c>Setup</c> method of <see cref="IInspector"/>.
/// </summary>
public class InspectorContext : IInspectorContext
{
public InspectorContext(ILogger logger, IProxyFactory proxyFactory, IMessageBroker messageBroker, Func<IExecutionTimer> timerStrategy, Func<RuntimePolicy> runtimePolicyStrategy)
{
if (logger == null)
{
throw new ArgumentNullException("logger");
}
if (proxyFactory == null)
{
throw new ArgumentNullException("proxyFactory");
}
if (messageBroker == null)
{
throw new ArgumentNullException("messageBroker");
}
if (timerStrategy == null)
{
throw new ArgumentNullException("timerStrategy");
}
if (runtimePolicyStrategy == null)
{
throw new ArgumentNullException("runtimePolicyStrategy");
}
Logger = logger;
ProxyFactory = proxyFactory;
TimerStrategy = timerStrategy;
MessageBroker = messageBroker;
RuntimePolicyStrategy = runtimePolicyStrategy;
}
public ILogger Logger { get; set; }
public IProxyFactory ProxyFactory { get; set; }
public Func<IExecutionTimer> TimerStrategy { get; set; }
public IMessageBroker MessageBroker { get; set; }
public Func<RuntimePolicy> RuntimePolicyStrategy { get; set; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment