/// <summary>
 /// Initializes a new instance of the ModuleClientPlugin class
 /// </summary>
 /// <param name="plugin">The plugin application module</param>
 internal ModuleClientPlugin(IModulePlugin plugin)
     : base(plugin.ModuleName)
 {
     if (plugin == null)
         throw new ArgumentNullException();
     this.plugin = plugin;
     dataReceived = new ProducerConsumer<string>(100);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the ModuleClientPlugin class
 /// </summary>
 /// <param name="plugin">The plugin application module</param>
 internal ModuleClientPlugin(IModulePlugin plugin)
     : base(plugin.ModuleName)
 {
     if (plugin == null)
     {
         throw new ArgumentNullException();
     }
     this.plugin  = plugin;
     dataReceived = new ProducerConsumer <string>(100);
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Adds a ModuleClientPlugin to the blackboard so it can communicate to the module plugin application
        /// </summary>
        /// <param name="plugin">The plugin to initialize as module</param>
        private void AddClientForModulePlugin(IModulePlugin plugin)
        {
            ModuleClientPlugin module;

            module = new ModuleClientPlugin(plugin);
            if (this.owner.Modules.Contains(plugin.ModuleName))
            {
                return;
            }
            this.owner.Modules.Add(module);
            plugin.AttachClient(module);
        }