Esempio n. 1
0
        public void SendLargeBuffer(byte[] buffer)
        {
            using (InternalProxy p = new InternalProxy())
            {
                p.DoSomething();
            }

            Console.WriteLine("Received buffer[{0}]", buffer.Length);
        }
Esempio n. 2
0
 public void SetServerState(State newState)
 {
     using (InternalProxy p = new InternalProxy())
     {
         p.DoSomething();
     }
     Console.WriteLine("Setting server state to {0}", newState);
     GlobalServerState.CurrentState = newState;
 }
Esempio n. 3
0
        public ServerState GetServerState()
        {
            ServerState state = new ServerState
            {
                State = GlobalServerState.CurrentState,
                Time  = DateTime.Now
            };

            InternalProxy p = new InternalProxy();

            p.DoSomething();

            Console.WriteLine("Returning {0}", state);
            return(state);
        }
 internal static Target Create <Target>(HttpClient client) where Target : class
 {
     return(InternalProxy <Target> .Create(client));
 }