/[RomCheater]/trunk/RomCheater.PluginFramework/Interfaces/PluginInterfaces.cs
ViewVC logotype

Diff of /trunk/RomCheater.PluginFramework/Interfaces/PluginInterfaces.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/RomCheater.PluginFramework/Interfaces/PluginInterfaces.cs	2013/06/03 18:22:20	476
+++ trunk/RomCheater.PluginFramework/Interfaces/PluginInterfaces.cs	2013/06/03 18:35:45	477
@@ -68,22 +68,41 @@
         TPlugin AcceptedPlugin { get; set; }
     }
     public interface IAcceptsConfig : IAcceptsPlugin<IConfigPlugin> { }
-    public interface IAcceptsProcess : IAcceptsProcessPID    {    }
+    public interface IAcceptsProcess : IAcceptsProcess<Process>    {    }
+    public interface IAcceptsProcess<TProcess>
+        where TProcess : Process
+    {
+        TProcess AcceptedProcess { get; set; }
+    }
     #endregion
+    public interface IAcceptsProcessAndConfig<TProcess> : IAcceptsConfig, IAcceptsProcess<TProcess> where TProcess : Process { }
     public interface IAcceptsProcessAndConfig : IAcceptsProcess, IAcceptsConfig { }
 
-    public class AcceptedProcessAndConfig : IAcceptsProcessAndConfig
+    public class AcceptedProcessAndConfig<TProcess> : IAcceptsProcessAndConfig<TProcess> where TProcess : Process
     {
-        public AcceptedProcessAndConfig() : this(null, 0) { }
-        public AcceptedProcessAndConfig(IConfigPlugin config, int pid) { AcceptedPlugin = config; ProcessPID = pid; }
-   
+        public AcceptedProcessAndConfig() : this(null, default(TProcess)) { }
+        public AcceptedProcessAndConfig(IConfigPlugin config, TProcess process) { AcceptedPlugin = config; AcceptedProcess = process; }
+        #region IAcceptsProcessAndConfig<TProcess> members
+        #endregion
 
         #region IAcceptsPlugin<IConfigPlugin> Members
         public IConfigPlugin AcceptedPlugin { get; set; }
         #endregion
 
-        #region IAcceptsProcess Members
-        public int ProcessPID { get; set; }
+        #region IAcceptsProcess<TProcess> Members
+        public TProcess AcceptedProcess { get; set; }
+        #endregion
+    }
+    public class AcceptedProcessAndConfig : IAcceptsProcessAndConfig
+    {
+        public AcceptedProcessAndConfig() : this(null, null) { }
+        public AcceptedProcessAndConfig(IConfigPlugin config, Process process) { AcceptedPlugin = config; AcceptedProcess = process; }
+
+        #region IAcceptsProcess<Process> Members
+        public Process AcceptedProcess { get; set; }
+        #endregion
+        #region IAcceptsPlugin<IConfigPlugin> Members
+        public IConfigPlugin AcceptedPlugin { get; set; }
         #endregion
     }
 

 

  ViewVC Help
Powered by ViewVC 1.1.22