/// <summary> /// Initializes a new instance of the <see cref="ServerWrapper" /> class. /// </summary> /// <param name="plugin">The interface to get access to the plugin.</param> /// <param name="assembly">The assembly containing the plug-in.</param> /// <param name="gui">The user interaction interface that provides basic functionality to implement user interactivity.</param> /// <param name="configuration">The file path containing the configuration.</param> public ServerWrapper(IConfiguration plugin, IDataProviderDescription assembly, IGraphicalUserInterface gui, string configuration) { m_Server = plugin ?? throw new ArgumentNullException(nameof(plugin)); PluginDescription = assembly ?? throw new ArgumentNullException(nameof(plugin)); m_GraphicalUserInterfaceField = gui ?? throw new ArgumentNullException(nameof(plugin)); m_Server.OnModified += new EventHandler <UAServerConfigurationEventArgs>(OnConfigurationDataChangeHandler); FileInfo _file = null; if (!string.IsNullOrEmpty(configuration)) { if (!Path.IsPathRooted(configuration)) { throw new ArgumentOutOfRangeException(nameof(configuration)); } _file = new FileInfo(configuration); } Configuration = new ConfigurationWrapper(_file, m_Server, gui); }
private void Initialize(IConfiguration plugin, Assembly assembly) { m_Server = plugin; m_Server.OnModified += new EventHandler <UAServerConfigurationEventArgs>(OnConfigurationDataChangeHandler); m_PluginDescription = new DataProviderDescription(assembly); }
/// <summary> /// Initializes a new instance of the <see cref="ServerWrapper" /> class. /// </summary> /// <param name="plugin">The interface to get access to the plugin.</param> /// <param name="assembly">An assembly containing the plug-in.</param> /// <param name="gui">The user interaction interface that provides basic functionality to implement user interactivity.</param> public ServerWrapper(IConfiguration plugin, IDataProviderDescription assembly, IGraphicalUserInterface gui) : this(plugin, assembly, gui, string.Empty) { }
/// <summary> /// Initializes a new instance of the <see cref="ServerWrapper"/> class. /// </summary> /// <param name="plugin">The interface to get access to the plugin.</param> /// <param name="assembly">The assembly containing the plug-in.</param> /// <param name="currentPlugin">The current plugin.</param> public ServerWrapper(IConfiguration plugin, IDataProviderDescription assembly, ServerWrapper currentPlugin) : this(plugin, assembly, currentPlugin.m_GraphicalUserInterfaceField) { }