private PlugInHelper() { try { if (!String.IsNullOrEmpty(Settings.Default.IPdfUtilityImpl)) { Type type = Type.GetType(Settings.Default.IPdfUtilityImpl); if (type.GetInterface("CommonLib.PlugInAdapter.IPdfUtility") != null) { _pdfUtility = (IPdfUtility)type.Assembly.CreateInstance(type.FullName); } } } catch { } try { if (!String.IsNullOrEmpty(Settings.Default.ILoggerImpl)) { Type type = Type.GetType(Settings.Default.ILoggerImpl); if (type.GetInterface("CommonLib.PlugInAdapter.ILogger") != null) { _logger = (ILogger)type.Assembly.CreateInstance(type.FullName); } } } catch { } }
private PlugInHelper() { try { if (!String.IsNullOrEmpty(Startup.Properties["IPdfUtilityImpl"])) { FileLogger.Logger.Info("Pdf Utility intent type => " + Startup.Properties["IPdfUtilityImpl"]); Type type = Type.GetType(Startup.Properties["IPdfUtilityImpl"]); if (type != null && type.GetInterface("CommonLib.PlugInAdapter.IPdfUtility") != null) { _pdfUtility = (IPdfUtility)type.Assembly.CreateInstance(type.FullName); FileLogger.Logger.Info("Pdf Utility => " + _pdfUtility.GetType().FullName); } else { FileLogger.Logger.Warn("Pdf Utility intent type not found => " + Startup.Properties["IPdfUtilityImpl"]); } } } catch { } }