Exemplo n.º 1
0
 private static ViewLocationResult LocateViewAndSupressExceptions(IViewSourceProvider viewSourceProvider, string viewName, IEnumerable<string> supportedViewEngineExtensions)
 {
     try
     {
         return viewSourceProvider.LocateView(viewName, supportedViewEngineExtensions);
     }
     catch (Exception)
     {
         return null;
     }
 }
Exemplo n.º 2
0
 private static ViewLocationResult LocateViewAndSupressExceptions(IViewSourceProvider viewSourceProvider, string viewName, IEnumerable <string> supportedViewEngineExtensions)
 {
     try
     {
         return(viewSourceProvider.LocateView(viewName, supportedViewEngineExtensions));
     }
     catch (Exception)
     {
         return(null);
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Configures the bootstrapper to use the provided instance of <see cref="IViewSourceProvider"/>.
 /// </summary>
 /// <param name="viewSourceProvider">The <see cref="IViewSourceProvider"/> instance that should be used by the bootstrapper.</param>
 /// <returns>An instance to the current <see cref="FakeNancyBootstrapperConfigurator"/>.</returns>
 public FakeNancyBootstrapperConfigurator ViewSourceProvider(IViewSourceProvider viewSourceProvider)
 {
     this.bootstrapper.configuredEnumerableInstances[typeof(IViewSourceProvider)] = new[] { viewSourceProvider };
     return(this);
 }