/// <summary> /// Initializes a new instance of the <see cref="ResourceResultContext" /> class. /// </summary> /// <param name="logger">The logger.</param> /// <param name="frameworkProvider">The framework provider.</param> /// <param name="serializer">The serializer.</param> /// <param name="htmlEncoder">The HTML encoder.</param> public ResourceResultContext(ILogger logger, IFrameworkProvider frameworkProvider, ISerializer serializer, IHtmlEncoder htmlEncoder) { Logger = logger; FrameworkProvider = frameworkProvider; Serializer = serializer; HtmlEncoder = htmlEncoder; }
public static void Bootstrap(IFrameworkProvider frameworkProvider, IClusterProvider clusterProvider, string serviceName, string version) { _frameworkProvider = frameworkProvider; var uri = _frameworkProvider.Start(serviceName, version); var serviceId = serviceName + Guid.NewGuid(); _clusterProvider = clusterProvider; _clusterProvider.RegisterServiceAsync(serviceName, serviceId, version, uri); }
public static void Bootstrap(IFrameworkProvider frameworkProvider, IClusterProvider clusterProvider, string serviceName, string version) { _frameworkProvider = frameworkProvider; var uri = _frameworkProvider.Start(serviceName, version); var serviceId = serviceName + Guid.NewGuid(); _clusterProvider = clusterProvider; _clusterProvider.RegisterServiceAsync(serviceName, serviceId, version, uri).Wait(); }
public static void Bootstrap(IFrameworkProvider frameworkProvider, IClusterProvider clusterProvider, string serviceName, string version) { try { _frameworkProvider = frameworkProvider; var uri = _frameworkProvider.Start(serviceName, version); var serviceId = serviceName + Guid.NewGuid(); _clusterProvider = clusterProvider; _clusterProvider.RegisterServiceAsync(serviceName, serviceId, version, uri).Wait(); } catch (Exception e) { Console.WriteLine(e); } }
/// <summary> /// Initializes a new instance of the <see cref="GlimpseConfiguration" /> class. /// </summary> /// <param name="frameworkProvider">The framework provider.</param> /// <param name="endpointConfiguration">The resource endpoint configuration.</param> /// <param name="clientScripts">The client scripts collection.</param> /// <param name="logger">The logger.</param> /// <param name="defaultRuntimePolicy">The default runtime policy.</param> /// <param name="htmlEncoder">The Html encoder.</param> /// <param name="persistenceStore">The persistence store.</param> /// <param name="inspectors">The inspectors collection.</param> /// <param name="resources">The resources collection.</param> /// <param name="serializer">The serializer.</param> /// <param name="tabs">The tabs collection.</param> /// <param name="runtimePolicies">The runtime policies collection.</param> /// <param name="defaultResource">The default resource.</param> /// <param name="proxyFactory">The proxy factory.</param> /// <param name="messageBroker">The message broker.</param> /// <param name="endpointBaseUri">The endpoint base Uri.</param> /// <param name="timerStrategy">The timer strategy.</param> /// <param name="runtimePolicyStrategy">The runtime policy strategy.</param> /// <exception cref="System.ArgumentNullException">An exception is thrown if any parameter is <c>null</c>.</exception> public GlimpseConfiguration( IFrameworkProvider frameworkProvider, ResourceEndpointConfiguration endpointConfiguration, ICollection<IClientScript> clientScripts, ILogger logger, RuntimePolicy defaultRuntimePolicy, IHtmlEncoder htmlEncoder, IPersistenceStore persistenceStore, ICollection<IInspector> inspectors, ICollection<IResource> resources, ISerializer serializer, ICollection<ITab> tabs, ICollection<IDisplay> displays, ICollection<IRuntimePolicy> runtimePolicies, IResource defaultResource, IProxyFactory proxyFactory, IMessageBroker messageBroker, string endpointBaseUri, Func<IExecutionTimer> timerStrategy, Func<RuntimePolicy> runtimePolicyStrategy) { if (frameworkProvider == null) { throw new ArgumentNullException("frameworkProvider"); } if (endpointConfiguration == null) { throw new ArgumentNullException("endpointConfiguration"); } if (logger == null) { throw new ArgumentNullException("logger"); } if (htmlEncoder == null) { throw new ArgumentNullException("htmlEncoder"); } if (persistenceStore == null) { throw new ArgumentNullException("persistenceStore"); } if (clientScripts == null) { throw new ArgumentNullException("clientScripts"); } if (resources == null) { throw new ArgumentNullException("inspectors"); } if (serializer == null) { throw new ArgumentNullException("serializer"); } if (tabs == null) { throw new ArgumentNullException("tabs"); } if (displays == null) { throw new ArgumentNullException("displays"); } if (runtimePolicies == null) { throw new ArgumentNullException("runtimePolicies"); } if (defaultResource == null) { throw new ArgumentNullException("defaultResource"); } if (proxyFactory == null) { throw new ArgumentNullException("proxyFactory"); } if (messageBroker == null) { throw new ArgumentNullException("messageBroker"); } if (endpointBaseUri == null) { throw new ArgumentNullException("endpointBaseUri"); } if (timerStrategy == null) { throw new ArgumentNullException("timerStrategy"); } if (runtimePolicyStrategy == null) { throw new ArgumentNullException("runtimePolicyStrategy"); } Logger = logger; ClientScripts = clientScripts; FrameworkProvider = frameworkProvider; HtmlEncoder = htmlEncoder; PersistenceStore = persistenceStore; Inspectors = inspectors; ResourceEndpoint = endpointConfiguration; Resources = resources; Serializer = serializer; Tabs = tabs; Displays = displays; RuntimePolicies = runtimePolicies; DefaultRuntimePolicy = defaultRuntimePolicy; DefaultResource = defaultResource; ProxyFactory = proxyFactory; MessageBroker = messageBroker; EndpointBaseUri = endpointBaseUri; TimerStrategy = timerStrategy; RuntimePolicyStrategy = runtimePolicyStrategy; }
/// <summary> /// Initializes a new instance of the <see cref="GlimpseConfiguration" /> class. /// </summary> /// <param name="frameworkProvider">The framework provider.</param> /// <param name="endpointConfiguration">The resource endpoint configuration.</param> /// <param name="clientScripts">The client scripts collection.</param> /// <param name="logger">The logger.</param> /// <param name="defaultRuntimePolicy">The default runtime policy.</param> /// <param name="htmlEncoder">The Html encoder.</param> /// <param name="persistenceStore">The persistence store.</param> /// <param name="inspectors">The inspectors collection.</param> /// <param name="resources">The resources collection.</param> /// <param name="serializer">The serializer.</param> /// <param name="tabs">The tabs collection.</param> /// <param name="runtimePolicies">The runtime policies collection.</param> /// <param name="defaultResource">The default resource.</param> /// <param name="proxyFactory">The proxy factory.</param> /// <param name="messageBroker">The message broker.</param> /// <param name="endpointBaseUri">The endpoint base Uri.</param> /// <param name="timerStrategy">The timer strategy.</param> /// <param name="runtimePolicyStrategy">The runtime policy strategy.</param> /// <exception cref="System.ArgumentNullException">An exception is thrown if any parameter is <c>null</c>.</exception> public GlimpseConfiguration( IFrameworkProvider frameworkProvider, ResourceEndpointConfiguration endpointConfiguration, ICollection <IClientScript> clientScripts, ILogger logger, RuntimePolicy defaultRuntimePolicy, IHtmlEncoder htmlEncoder, IPersistenceStore persistenceStore, ICollection <IInspector> inspectors, ICollection <IResource> resources, ISerializer serializer, ICollection <ITab> tabs, ICollection <IRuntimePolicy> runtimePolicies, IResource defaultResource, IProxyFactory proxyFactory, IMessageBroker messageBroker, string endpointBaseUri, Func <IExecutionTimer> timerStrategy, Func <RuntimePolicy> runtimePolicyStrategy) { if (frameworkProvider == null) { throw new ArgumentNullException("frameworkProvider"); } if (endpointConfiguration == null) { throw new ArgumentNullException("endpointConfiguration"); } if (logger == null) { throw new ArgumentNullException("logger"); } if (htmlEncoder == null) { throw new ArgumentNullException("htmlEncoder"); } if (persistenceStore == null) { throw new ArgumentNullException("persistenceStore"); } if (clientScripts == null) { throw new ArgumentNullException("clientScripts"); } if (resources == null) { throw new ArgumentNullException("inspectors"); } if (serializer == null) { throw new ArgumentNullException("serializer"); } if (tabs == null) { throw new ArgumentNullException("tabs"); } if (runtimePolicies == null) { throw new ArgumentNullException("runtimePolicies"); } if (defaultResource == null) { throw new ArgumentNullException("defaultResource"); } if (proxyFactory == null) { throw new ArgumentNullException("proxyFactory"); } if (messageBroker == null) { throw new ArgumentNullException("messageBroker"); } if (endpointBaseUri == null) { throw new ArgumentNullException("endpointBaseUri"); } if (timerStrategy == null) { throw new ArgumentNullException("timerStrategy"); } if (runtimePolicyStrategy == null) { throw new ArgumentNullException("runtimePolicyStrategy"); } Logger = logger; ClientScripts = clientScripts; FrameworkProvider = frameworkProvider; HtmlEncoder = htmlEncoder; PersistenceStore = persistenceStore; Inspectors = inspectors; ResourceEndpoint = endpointConfiguration; Resources = resources; Serializer = serializer; Tabs = tabs; RuntimePolicies = runtimePolicies; DefaultRuntimePolicy = defaultRuntimePolicy; DefaultResource = defaultResource; ProxyFactory = proxyFactory; MessageBroker = messageBroker; EndpointBaseUri = endpointBaseUri; TimerStrategy = timerStrategy; RuntimePolicyStrategy = runtimePolicyStrategy; }