private bool Matches(ILogFileOutlinePlugin plugin, ILogFileFormat format) { try { return(plugin.SupportedFormats.Any(x => Equals(x, format))); } catch (Exception e) { Log.ErrorFormat("Caught unexpected exception: {0}", e); return(false); } }
#pragma warning restore 67 #endregion private static ILogFileOutlineViewModel TryCreateViewModel(IServiceContainer services, ILogFileOutlinePlugin plugin, ILogSource logSource) { try { return(plugin.CreateViewModel(services, logSource)); } catch (Exception e) { Log.ErrorFormat("Caught unexpected exception: {0}", e); return(null); } }
public LogFileOutlineViewModelProxy(ILogFileOutlinePlugin plugin, IServiceContainer services, ILogSource logSource) { _plugin = plugin; _services = services; _innerViewModel = TryCreateViewModel(services, plugin, logSource); }