0

Ok, here is the problem. I have a third party c# lib and im kind of writing a tool about it. So there are a few static Containers that i want to monitor from another application but ofcourse i cant reach them in the domain of my app. A simple example would be :

namespace DefinedInAsembly1
{
     public class Resource
     {
       public static IList<DateTime> DateTimes {get;set;}
     }
}

 namespace DefinedInAssembly2
 {
    class RunningProgram
    {
      static void Main(string[] args)
      {
         while(true)
         {
          Resource.DateTimes.Add(DateTime.Now); 
          Thread.Sleep(10000);
         }
      }
    }
 }

namespace DefinedInAssembly3
{
 class ToolProgram
 {
    static void Main(string[] args)
    {
         //Accessing Resource.DateTimes with the values inserted from RunningProgram
         //Any ideas?
    }

 }
}
Simeon Dimov
  • 104
  • 9
  • 1
    If you have another process, then there is no magic, the only solution is to use IPC. – ken2k Jun 24 '13 at 11:42

1 Answers1

5

You need to use any of available on host OS IPC (Inter Process Commnuication) tecniques:

So applications that have to be listened by someone, should expose themselves via one of these, so another application that would like to sniff, or affect the state of them, can communicate with them via these channels.

Community
  • 1
  • 1
Tigran
  • 61,654
  • 8
  • 86
  • 123