/// <summary> /// Instantiates an instance of <see cref="ResourceEndpointConfiguration"/>. /// </summary> /// <returns>A <see cref="ResourceEndpointConfiguration"/> instance resolved by one of the <see cref="IServiceLocator"/>s.</returns> /// <exception cref="GlimpseException">An exception is thrown is an instance of <see cref="ResourceEndpointConfiguration"/> is not provided by a <see cref="IServiceLocator"/>.</exception> public ResourceEndpointConfiguration InstantiateResourceEndpointConfiguration() { ResourceEndpointConfiguration result; if (TrySingleInstanceFromServiceLocators(out result)) { return(result); } throw new GlimpseException( string.Format( Resources.InstantiateResourceEndpointConfigurationException, UserServiceLocator == null ? "UserServiceLocator not configured" : UserServiceLocator.GetType().AssemblyQualifiedName, ProviderServiceLocator == null ? "ProviderServiceLocator not configured" : ProviderServiceLocator.GetType().AssemblyQualifiedName)); }
/// <summary> /// Instantiates an instance of <see cref="IFrameworkProvider"/>. /// </summary> /// <returns>A <see cref="IFrameworkProvider"/> instance resolved by one of the <see cref="IServiceLocator"/>s.</returns> /// <exception cref="GlimpseException">An exception is thrown is an instance of <see cref="IFrameworkProvider"/> is not provided by a <see cref="IServiceLocator"/>.</exception> public IFrameworkProvider InstantiateFrameworkProvider() { if (FrameworkProvider != null) { return(FrameworkProvider); } IFrameworkProvider result; if (TrySingleInstanceFromServiceLocators(out result)) { FrameworkProvider = result; return(FrameworkProvider); } throw new GlimpseException( string.Format( Resources.InstantiateFrameworkProviderException, UserServiceLocator == null ? "UserServiceLocator not configured" : UserServiceLocator.GetType().AssemblyQualifiedName, ProviderServiceLocator == null ? "ProviderServiceLocator not configured" : ProviderServiceLocator.GetType().AssemblyQualifiedName)); }