Example #1
0
        public async Task <FBResult> deleteTestUser(
            FBTestUser user
            )
        {
            string token = await getAppToken();

            PropertySet parameters = new PropertySet();
            string      path       = "/" + user.Id;

            parameters.Add("access_token", Uri.EscapeUriString(token));

            FBSingleValue sval = new FBSingleValue(path, parameters,
                                                   new FBJsonClassFactory(FBSuccess.FromJson));

            return(await sval.DeleteAsync());
        }
Example #2
0
        private static IAsyncOperation <FBResult> ExecuteAsync(string method, FBSingleValue request)
        {
            switch (method.ToLowerInvariant())
            {
            case "delete":
                return(request.DeleteAsync());

            case "get":
                return(request.GetAsync());

            case "post":
                return(request.PostAsync());

            default:
                throw new NotSupportedException($"Method '{method}' is not supported.");
            }
        }
Example #3
0
        public async Task<FBResult> deleteTestUser(
            FBTestUser user
            )
        {
            string token = await getAppToken();
            PropertySet parameters = new PropertySet();
            string path = "/" + user.Id;

            parameters.Add("access_token", Uri.EscapeUriString(token));

            FBSingleValue sval = new FBSingleValue(path, parameters,
                new FBJsonClassFactory(FBSuccess.FromJson));

            return await sval.DeleteAsync();
        }
Example #4
0
 private static IAsyncOperation<FBResult> ExecuteAsync(string method, FBSingleValue request)
 {
     switch (method.ToLowerInvariant())
     {
         case "delete":
             return request.DeleteAsync();
         case "get":
             return request.GetAsync();
         case "post":
             return request.PostAsync();
         default:
             throw new NotSupportedException($"Method '{method}' is not supported.");
     }
 }