コード例 #1
0
 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);
     }
 }
コード例 #2
0
                #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);
            }
        }
コード例 #3
0
 public LogFileOutlineViewModelProxy(ILogFileOutlinePlugin plugin, IServiceContainer services, ILogSource logSource)
 {
     _plugin         = plugin;
     _services       = services;
     _innerViewModel = TryCreateViewModel(services, plugin, logSource);
 }