Beispiel #1
0
 /// <summary>
 ///     Removes all occurences of the invocation
 ///     It's titled Dequeue for this may change in the future if this class
 ///     is modified to handle asynchronous calls to plugins it will have to handle
 ///     in a sort-of queue like fashion.
 /// </summary>
 /// <param name="plugin">The plugin that was invoked</param>
 /// <param name="methodName">The method name within the plugin that was invoked</param>
 /// <param name="parameters">The parameters being passed to the method within the plugin that was invoked.</param>
 protected void DequeueInvocation(Plugin plugin, String methodName, Object[] parameters) {
     lock (this) {
         Invocations.RemoveAll(x => x.Plugin == plugin && x.MethodName == methodName);
     }
 }
Beispiel #2
0
 /// <summary>
 ///     Adds an invocation to our list.
 ///     It's titled Enqueue for this may change in the future if this class
 ///     is modified to handle asynchronous calls to plugins it will have to handle
 ///     in a sort-of queue like fashion.
 /// </summary>
 /// <param name="plugin">The plugin being invoked</param>
 /// <param name="methodName">The method name within the plugin that is being invoked</param>
 /// <param name="parameters">The parameters being passed to the method within the plugin being invoked.</param>
 protected void EnqueueInvocation(Plugin plugin, String methodName, Object[] parameters) {
     lock (this) {
         Invocations.Add(new PluginInvocation() {
             Plugin = plugin,
             MethodName = methodName,
             Parameters = parameters
         });
     }
 }