Beispiel #1
0
        public void SetChatPhoto(UploadResponseData uploadData, Action <BackendResult <ChatInfoWithMessageId, ResultCode> > callback)
        {
            Dictionary <string, string> parameters = new Dictionary <string, string>();

            parameters["file"] = uploadData.response;
            VKRequestsDispatcher.DispatchRequestToVK <ChatInfoWithMessageId>("messages.setChatPhoto", parameters, callback, null, false, true, new CancellationToken?(), null);
        }
Beispiel #2
0
        public void SavePhoto(UploadResponseData uploadData, Action <BackendResult <Photo, ResultCode> > callback)
        {
            Dictionary <string, string> dictionary = new Dictionary <string, string>();

            dictionary["server"] = uploadData.server;
            dictionary["photo"]  = uploadData.photo;
            dictionary["hash"]   = uploadData.hash;
            string methodName = "photos.saveMessagesPhoto";
            Dictionary <string, string> parameters = dictionary;
            Action <BackendResult <Photo, ResultCode> > callback1 = callback;
            int num1 = 0;
            int num2 = 1;
            CancellationToken?cancellationToken = new CancellationToken?();

            // ISSUE: variable of the null type

            VKRequestsDispatcher.DispatchRequestToVK <Photo>(methodName, parameters, callback1, (Func <string, Photo>)(jsonStr => JsonConvert.DeserializeObject <VKRequestsDispatcher.GenericRoot <List <Photo> > >(jsonStr).response.First <Photo>()), num1 != 0, num2 != 0, cancellationToken, null);
        }