/// <summary>
    /// Example testing DAPI endpoints using Classes
    /// </summary>
    public DAPIResponse runDAPICall(string method, Dictionary<string, string> args, UserToken userToken = null, AppToken appToken = null, string stringToken = null)
    {
        Uri u = new Uri("https://api.zynga.com");
        TTransport transport = new THttpModClient(u);
        TProtocol protocol = new TDAPIProtocol(transport);
        DAPI.Client client = new DAPI.Client(protocol);

        transport.Open();

        List<CallRequest> dapiCalls = new List<CallRequest>();
        CallRequest callRequest = new CallRequest();
        callRequest.Method = method;
        callRequest.Argz = args;
        dapiCalls.Add(callRequest);

        DAPIRequest dapiRequest = new DAPIRequest();
        dapiRequest.Calls = dapiCalls;
        dapiRequest.UserToken = userToken;
        dapiRequest.AppToken = appToken;
        dapiRequest.StringToken = stringToken;

        DAPIResponse dapiResponse = client.call(dapiRequest);

        transport.Close();

        return dapiResponse;
    }
 public object getWebService(Type clazz)
 {
     if (this.protocol == null)
     {
         Uri u = new Uri("https://api.zynga.com");
         TTransport transport = new THttpModClient(u);
         TDAPIProtocol protocol = new TDAPIProtocol(transport);
         this.protocol = protocol;
         transport.Open();
     }
     Type[] types = new Type[1];
     types[0] = typeof(TProtocol);
     return clazz.GetConstructor(types).Invoke(new object[]{ this.protocol });
 }