Accessing the same service more than twice in the nick of time

Posted by PointedC on Programmers See other posts from Programmers or by PointedC
Published on 2011-12-28T12:50:32Z Indexed on 2012/11/16 5:13 UTC
Read the original article Hit count: 378

Filed under:

I have an application that will access interface service A which is to run from windows startup. This service is used by program B and my application functions on B's presence after getting a pointer to A. The scenario is translated as follows,

public interface A{}
///my program
public class MyProgram
{
    public MyProgram()
    {
      ProgramB.DoA();
    }
    public A GetA(){}
}

public class ProgramB
{
   void DoA(){}
}

The translated source is not true, but that seems to be what I am looking for. In order to eliminate the overhead of allocating and realocating dynamic accesses to the same service used by other processes, would you please provide an actual solution to the problem ?(I am all out of any idea now)

© Programmers or respective owner

Related posts about c#