public CrossGate(Memo memo) : base(memo) { Actions = new Actions(memo); Cheater = new Cheater(memo); Player = new Player(memo); Stuffs = new StuffList(memo); Combat = new Combat(this); AutoCure = new AutoCure(this); Contacts = new ContactList(memo); Pets = new PetList(memo); Items = new ItemList(this); AutoFood = new AutoFood(this); AutoNurse = new AutoNurse(this); PetCatch = new PetCatch(this); Producer = new Producer(this); AutoCombat = new AutoCombat(this); AutoWalk = new AutoWalk(this); Script = Script.GetNewTownInstance(this); Poster = new Poster(this); AutoChange = new AutoChange(this); MoveScript = new MoveScript(this); Cheater.YiDongJiaSu = true; }
public Form1() { InitializeComponent(); m_layer = new Layer(); m_poster = new Poster(); m_poster2 = new Poster(); }
//------------------------------------------------------------------------------------ private void MoreForm_Load(object sender, EventArgs e) { if (Uri.IsWellFormedUriString(SelectedMovie.Poster, UriKind.Absolute)) { Poster.Load(SelectedMovie.Poster); } var mr = new MovieResponse(); try { DBConnect.GetResponse("i", SelectedMovie.imdbID, ref mr); } catch (Exception ex) { MessageBox.Show(ex.Message); } Movie movie = mr as Movie; labelTitle.Text = movie.Title; MyLabel LabelMore = new MyLabel(); tableLayoutPanel1.Controls.Add(LabelMore); LabelMore.Dock = DockStyle.Fill; LabelMore.Text = movie.ToString(); buttonOK.Focus(); }
public void getPoster(object obj) { Poster poster = obj as Poster; //The action added to Loom.QueueOnMainThread is run on Main Thread. Loom.QueueOnMainThread(showDetail, poster); }
public async Task <Poster> AddPoster(IFormFile file) { try { var id = Guid.NewGuid(); var path = "/Files/" + id + file.ContentType.Replace("image/", "."); await using (var fileStream = new FileStream(_appEnvironment.WebRootPath + path, FileMode.Create)) { await file.CopyToAsync(fileStream); } var poster = new Poster { Name = file.FileName, Path = path }; await _dbContext.Posters.AddAsync(poster); await _dbContext.SaveChangesAsync(); return(poster); } catch (Exception e) { Debug.WriteLine($"Failed to create new image, stack: {e}"); throw; } }
static void Main(string[] args) { Poster poster = new Poster("Eva", 500); Guest guest = new Guest("Anna", 430); Moderator moderator = new Moderator("moderator123"); poster.PostComment("comment 01"); poster.PostComment("comment 02"); poster.PostComment("comment 03"); poster.PostComment("comment 04"); poster.PrintUser(); poster.CheckStats(); Console.WriteLine("------------------------------------------------------------"); guest.PrintUser(); guest.ReadComment("some comment..."); Console.WriteLine("------------------------------------------------------------"); moderator.PrintUser(); moderator.BanUser(poster, "offensive comments"); Console.ReadLine(); }
void ReleaseDesignerOutlets() { if (Description != null) { Description.Dispose(); Description = null; } if (Duration != null) { Duration.Dispose(); Duration = null; } if (Header != null) { Header.Dispose(); Header = null; } if (Poster != null) { Poster.Dispose(); Poster = null; } if (Rating != null) { Rating.Dispose(); Rating = null; } }
public async Task <IActionResult> Edit(int id, [Bind("id,name")] Poster poster) { if (id != poster.id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(poster); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PosterExists(poster.id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(poster)); }
//Zwraca najnowszy plakat private byte[] SearchForPosters(int _seriesID) { string JSON = getReply("https://api.thetvdb.com/series/" + _seriesID + "/images/query?keyType=poster"); if (JSON != null) { JObject tvdbSearch = JObject.Parse(JSON); IList <JToken> results = tvdbSearch["data"].Children().ToList(); Poster p = new Poster(); byte[] array = null; foreach (JToken result in results) { p = result.ToObject <Poster>(); } using (WebClient client = new WebClient()) { array = client.DownloadData(new Uri("http://thetvdb.com/banners/" + p.fileName)); } return(array); } return(null); }
//------------------------------------------------------------------------------------ private void SearchButton_Click(object sender, EventArgs e) { shortMList.Clear(); var mr = new MovieResponse(); try { DBConnect.GetResponse("s", Title.Text.Trim(), ref mr); } catch (Exception ex) { MessageBox.Show(ex.Message); MoreButton.Enabled = false; } SearchMovie ms = mr as SearchMovie; foreach (var item in ms.Search) { shortMList.Add(item); } MovieListBox.DataSource = null; MovieListBox.DataSource = shortMList; MoreButton.Enabled = true; MovieListBox.Focus(); MovieListBox.SelectedIndex = 0; if (Uri.IsWellFormedUriString(shortMList[0].Poster, UriKind.Absolute)) { Poster.Load(shortMList[0].Poster); } }
//Wyszukuje banery i dodaje je odrazu do _BannerList public void SearchForAllBanners(int _seriesID, SeriesDescriptionViewModel main) { string JSON = getReply("https://api.thetvdb.com/series/" + _seriesID + "/images/query?keyType=series"); if (JSON != null) { JObject tvdbSearch = JObject.Parse(JSON); IList <JToken> results = tvdbSearch["data"].Children().ToList(); foreach (JToken result in results) { Poster p = result.ToObject <Poster>(); byte[] array; using (WebClient client = new WebClient()) { array = client.DownloadData(new Uri("http://thetvdb.com/banners/" + p.fileName)); } Application.Current.Dispatcher.Invoke(DispatcherPriority.Background, new Action(() => main.BannerList.Add(array))); Application.Current.Dispatcher.Invoke(DispatcherPriority.Background, new Action(() => main.UpdateBannerList())); } } }
/// <summary> /// The GetPosterWithStreamAndCompletionMode /// </summary> /// <returns>The <see cref="Task"/></returns> private async Task GetPosterWithStreamAndCompletionMode() { HttpRequestMessage request = new HttpRequestMessage( HttpMethod.Get, $"api/movies/d8663e5e-7494-4f81-8739-6e0de1bea7ee/posters/{Guid.NewGuid()}"); request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); using (HttpResponseMessage response = await _httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead)) { response.EnsureSuccessStatusCode(); Stream stream = await response.Content.ReadAsStreamAsync(); Poster poster = stream.ReadAndDeserializeFromJson <Poster>(); //using (var streamReader = new StreamReader(stream)) //{ // using (var jsonTextReader = new JsonTextReader(streamReader)) // { // var jsonSerializer = new JsonSerializer(); // var poster = jsonSerializer.Deserialize<Poster>(jsonTextReader); // // do something with the poster // } //} } }
/// <summary> /// The PostPosterWithoutStream /// </summary> /// <returns>The <see cref="Task"/></returns> private async Task PostPosterWithoutStream() { // generate a movie poster of 500KB Random random = new Random(); byte[] generatedBytes = new byte[524288]; random.NextBytes(generatedBytes); PosterForCreation posterForCreation = new PosterForCreation() { Name = "A new poster for The Big Lebowski", Bytes = generatedBytes }; string serializedPosterForCreation = JsonConvert.SerializeObject(posterForCreation); HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Post, "api/movies/d8663e5e-7494-4f81-8739-6e0de1bea7ee/posters"); request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); request.Content = new StringContent(serializedPosterForCreation); request.Content.Headers.ContentType = new MediaTypeHeaderValue("application/json"); HttpResponseMessage response = await _httpClient.SendAsync(request); response.EnsureSuccessStatusCode(); string content = await response.Content.ReadAsStringAsync(); Poster createdMovie = JsonConvert.DeserializeObject <Poster>(content); }
public async Task <IActionResult> CreatePoster(Guid movieId, [FromBody] Models.PosterForCreation posterForCreation) { // model validation if (posterForCreation == null) { return(this.BadRequest()); } if (!this.ModelState.IsValid) { // return 422 - Unprocessable Entity when validation fails return(new UnprocessableEntityObjectResult(this.ModelState)); } Poster poster = this.mapper.Map <Poster>(posterForCreation); Poster createdPoster = await this.postersRepository.AddPoster(movieId, poster); // no need to save, in this type of repo the poster is // immediately persisted. // map the poster from the repository to a shared model poster return(this.CreatedAtRoute("GetPoster", new { movieId, posterId = createdPoster.Id }, this.mapper.Map <Models.Poster>(createdPoster))); }
/// <summary> /// On SignUp activity completion, this will attempt to sign up user to the database. /// </summary> /// <param name="sender">The object that invoked the event</param> /// <param name="e">The event arguments</param> async void signUpDialog_mOnSignUpComplete(Object sender, OnSignUpEventArgs e) { // Retrieves data from SignUp activity userNameSignUp = e.UserName; userPasswordSignUp = e.Password; /// Checks if username is taken. If taken, user is notified. Otherwise a new profile object is created. /// User is then taken to EditProfileActivity. if (await TryToSignUp(userNameSignUp, userPasswordSignUp)) { //Create a default profile to start username = credentials.username; user_token = credentials.token; string userGender = null; string userBio = null; Profile myProfile = new Profile(credentials.username, userGender, userBio, credentials.token); //Send the temporary profile to the server if (await Poster.PostObject(myProfile, serverURL + profile_ext)) { // pass profile object to EditProfileActivity, so the user can fill in their information Intent intent = new Intent(this, typeof(EditProfileActivity)); var serializedProfile = JsonConvert.SerializeObject(myProfile); intent.PutExtra("UserProfile", serializedProfile); StartActivity(intent); } } else { Toast.MakeText(this, "Signup Unsuccessful ", ToastLength.Short).Show(); } }
public ActionResult <Menu> CreateMenuItem(int id, [FromForm] EditMenuDto dto) { var menu = new Menu { RestaurantId = id, CategoryId = dto.CategoryId, Description = dto.Description, Name = dto.Name, Price = dto.Price, }; if (dto.Image != null) { var fileName = Path.GetFileName(dto.Image.FileName); var poster = new Poster { FileExtension = Path.GetExtension(fileName), Name = dto.Image.FileName, ContentType = dto.Image.ContentType, Size = dto.Image.Length }; using (var memoryStream = new MemoryStream()) { dto.Image.CopyTo(memoryStream); poster.BinaryData = memoryStream.ToArray(); } menu.Poster = poster; } _context.Menus.Add(menu); _context.SaveChanges(); return(GetMenuItem(menu.Id)); }
public void Run() { int choice = 0; while (choice < 4) { Menu menu = new Menu(displayTypes.Console); menu.displayMessage(Menu.displayManagingSelectionMenu()); choice = menu.getIntInput(); Blogger blogger = new Blogger(menu); Poster poster = new Poster(menu); switch (choice) { case 1: menu.bloggerMenu(blogger); break; case 2: menu.posterMenu(poster); break; case 3: Environment.Exit(0); break; } } }
public List <Poster> GetAll() { List <Poster> result = new List <Poster>(); using (SqlConnection conn = new SqlConnection(connectionString)) { string cmdText = "Poster_SelectAll"; using (SqlCommand cmd = new SqlCommand(cmdText, conn)) { cmd.CommandType = System.Data.CommandType.StoredProcedure; conn.Open(); SqlDataReader reader = cmd.ExecuteReader(System.Data.CommandBehavior.CloseConnection); while (reader.Read()) { Poster model = new Poster(); int index = 0; model.Id = reader.GetInt32(index++); model.Title = reader.GetString(index++); model.Description = reader.GetString(index++); model.Type = reader.GetString(index++); model.Price = reader.GetDecimal(index++); model.ImageUrl = reader.GetString(index++); model.CreatedDate = reader.GetDateTime(index++); model.ModifiedDate = reader.GetDateTime(index++); model.ModifiedBy = reader.GetString(index++); result.Add(model); } conn.Close(); } } return(result); }
public static async void PushPage(Poster _mainPoster, INavigation navigation) { mainPoster = _mainPoster; Page p = new MovieResult();// { mainPoster = mainPoster }; await navigation.PushModalAsync(p, false); }
IEnumerator DownloadAndCache(Poster p, GameObject ImageTargetObject) { while (!Caching.ready) { yield return(null); } string assetUrl = p.model; using (UnityWebRequest www = UnityWebRequestAssetBundle.GetAssetBundle(assetUrl)) { yield return(www.SendWebRequest()); if (www.isNetworkError || www.isHttpError) { Debug.Log(www.error); } else { // Get downloaded asset bundle AssetBundle bundle = DownloadHandlerAssetBundle.GetContent(www); GameObject mBundleInstance = Instantiate(bundle.LoadAsset(bundle.GetAllAssetNames()[0])) as GameObject; mBundleInstance.transform.localPosition = new Vector3(0, 0.072f, 0); mBundleInstance.transform.rotation = Quaternion.Euler(-90, 0, 0); mBundleInstance.transform.localScale = new Vector3(0.01f, 0.01f, 0.01f); mBundleInstance.transform.parent = ImageTargetObject.transform; //mBundleInstance.SetActive(false); bundle.Unload(false); //mBundleInstance.transform.localPosition = new Vector3(0.0f, 0.15f, 0.0f); //mBundleInstance.transform.gameObject.SetActive(true); } } }
public TwitterPostWrapper(string title, string text, List <Attachement> attachements, Poster poster, TimeSpan delay, IAuthCredentials authCredentials) { if (title == null) { RaisePostingFinished(false, new ArgumentNullException(nameof(title))); } if (text == null) { RaisePostingFinished(false, new ArgumentNullException(nameof(text))); } if (attachements == null) { RaisePostingFinished(false, new ArgumentNullException(nameof(attachements))); } if (poster == null) { RaisePostingFinished(false, new ArgumentNullException(nameof(poster))); } if (authCredentials == null) { RaisePostingFinished(false, new ArgumentNullException(nameof(authCredentials))); } this.poster = poster; this.authCredentials = authCredentials; this.Post = new Post(title, text, attachements); this.postDelayTimer = new PostDelayTimer(delay, TryPost); }
public async Task <ActionResult <Poster> > PostPoster(Poster poster) { _context.poster.Add(poster); await _context.SaveChangesAsync(); return(CreatedAtAction("GetPoster", new { id = poster.posterID }, poster)); }
public void posterMenu(Poster poster) { this.displayMessage(Menu.displayPosterMenu()); int posterChoice = 0; posterChoice = this.getIntInput(); switch (posterChoice) { case 1: poster.Browse(); break; case 2: poster.Add(); break; case 3: poster.Edit(); break; case 4: poster.Delete(); break; case 5: break; } }
public async Task <Poster> CreateAsync(PosterInputDTO posterDto) { return(await TryCatch(async() => { var poster = new Poster { UserId = posterDto.UserId, PetName = posterDto.PetName, PetType = (EPetType)posterDto.PetType, Castrated = posterDto.Castrated, Dewormed = posterDto.Dewormed, DeliverToAdopter = posterDto.DeliverToAdopter, Country = posterDto.Country, State = posterDto.State, City = posterDto.City, IsAdopted = posterDto.IsAdopted }; poster = await _repository.CreateAsync(poster); foreach (var pic in posterDto.PetPictures) { await _petPictureService.Create(pic, poster.Id); } return poster; })); }
public async Task <IActionResult> PutPoster(int id, Poster poster) { if (id != poster.posterID) { return(BadRequest()); } _context.Entry(poster).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PosterExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <Poster> > PostPoster(Poster poster) { movieDBContext.Posters.Add(poster); await movieDBContext.SaveChangesAsync(); return(CreatedAtAction("GetPoster", new { id = poster.Id }, poster)); }
public async Task <string> Post() { try { var httpRequest = HttpContext.Current.Request; if (httpRequest.Files.Count > 0) { foreach (string file in httpRequest.Files) { Poster poster = new Poster(); var postedFile = httpRequest.Files[file]; var fileName = postedFile.FileName.Split('\\').LastOrDefault().Split('/').LastOrDefault(); var filePath = HttpContext.Current.Server.MapPath("~/Uploads/" + fileName); postedFile.SaveAs(filePath); poster.Name = fileName; return("/Uploads/" + fileName); } } } catch (Exception exception) { return(exception.Message); } return("no files"); }
public ActionResult Process(string Country, string Type, string Height, string Width, string Length, string Weight) { double hg = Double.Parse(Height); double ln = Double.Parse(Length); double wd = Double.Parse(Width); double wg = Double.Parse(Weight); Poster poster = new Poster(); poster.Country = Country; poster.Height = hg; poster.Length = ln; poster.Width = wd; poster.Weight = wg; poster.Type = Type; if (!ModelState.IsValid) { ViewBag.Table = Calculate.GetTeable().ToList(); ViewBag.Error = "Данные для вычисления не полный!"; return(View(poster)); } var res = Calculate.Calc(poster); Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("Uz"); Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("Uz"); ViewBag.Result = Convert.ToDecimal(res).ToString("C"); ViewBag.Table = Calculate.GetTeable().ToList(); return(View(poster)); }
private async Task AddMovie() { try { if (IsFileSelected()) { BitmapImage image = ImageUtility.ByteArrayToBitmapImage(_posterByteArray); Poster poster = new Poster(ImageUtility.GetImageFormat(_posterFileName), ImageUtility.PosterURLFromFilename(_posterFileName), _posterFileName, image); await MovieManagement.MovieManagement.AddMovieAsync(new Movie(Title, Description, Director, _yearInt, _priceDecimal, poster)); AddMovie(new Movie(Title, Description, Director, _yearInt, _priceDecimal, poster)); ClearPage(); } else { SetMessage("Select a poster file.", ERROR_COLOR); } } catch (ServerException e) { ClearForm(); SetMessage(e.Message, ERROR_COLOR); } catch (Exception e) { ClearForm(); SetMessage(e.Message, ERROR_COLOR); } }
private async void Grid_Loaded(object sender, RoutedEventArgs e) { List <Poster> list = Database.GetPosters(id); await Task.Run(async() => { if (list.Count > 0) { Dictionary <Poster, BitmapImage> dic = await GetPosters(list); Dispatcher.Invoke(() => { var sb = (Storyboard)FindResource("OpacityDown"); var temp = sb.Clone(); temp.Completed += (s, ev) => { LoadingText.Visibility = Visibility.Collapsed; }; temp.Begin(LoadingText); }, DispatcherPriority.Send); foreach (var item in dic) { Dispatcher.Invoke(() => { PosterSelection ps = new PosterSelection(item.Key, item.Value); ps.Background.MouseUp += (s, ev) => OnClick(ps); ps.Width = 208; ps.Opacity = 0; var stb = (Storyboard)FindResource("OpacityUp"); stb.Begin(ps); Panel.Children.Add(ps); }, DispatcherPriority.Send); Thread.Sleep(16); } } else { Poster p = new Poster(); p.fileName = "kua"; poster = p; } }); }
private Dictionary<String, String> dictionaryFromPoster(Poster poster) { var dic = new Dictionary<String, String>(); dic.Add("posts", poster.posts.ToString()); dic.Add("comments", poster.comments.ToString()); dic.Add("rec_likes", poster.rec_likes.ToString()); dic.Add("likes", poster.likes.ToString()); dic.Add("friends", poster.friends.ToString()); return dic; }
// process friends list private void OnGetFriends(JObject data, String cookie) { if (data[VkRestApi.ResponseBody] == null) { isNetworkRunning = false; return; } var memberId = cookie; // member id sent as a cooky var mId = Convert.ToInt64(memberId); // now calculate items in response var count = data[VkRestApi.ResponseBody]["count"].ToObject<long>(); Debug.WriteLine("Processing " + count + " friends of user id " + memberId); // update vertex with friends count if (!posters.ContainsKey(mId)) { posters[mId] = new Poster(); } posters[mId].friends = count; Dictionary<String, String> attr = dictionaryFromPoster(posters[mId]); // update poster vertex attributes groupNetworkAnalyzer.updateVertexAttributes(mId, attr); // process response body for (int i = 0; i < count; ++i) { var friendId = data[VkRestApi.ResponseBody]["items"][i].ToObject<long>(); groupNetworkAnalyzer.AddFriendsEdge(mId, friendId); // if friendship exists, the new edge will be added } }
// process likes user list private void OnLikesGetList(JObject data) { if (data[VkRestApi.ResponseBody] == null) { isRunning = false; return; } // now calculate items in response var count = data[VkRestApi.ResponseBody]["items"].Count(); // process response body for (var i = 0; i < count; ++i) { var likerId = data[VkRestApi.ResponseBody]["items"][i].ToObject<long>(); // this user liked the subject - add him to the posters if (!posters.ContainsKey(likerId)) { posters[likerId] = new Poster(); } posters[likerId].likes += 1; // increment poster's likes count posterIds.Add(likerId); } }
private Dictionary<String, String> dictionaryFromPoster(Poster poster) { var dic = new Dictionary<String, String>(); dic.Add("posts", poster.Posts.ToString()); dic.Add("rec_comments", poster.RecComments.ToString()); dic.Add("comments", poster.Comments.ToString()); dic.Add("rec_likes", poster.RecLikes.ToString()); dic.Add("likes", poster.Likes.ToString()); dic.Add("friends", poster.Friends.ToString()); dic.Add("board_comments", poster.BoardComments.ToString()); return dic; }
// process group board topic comments private void OnBoardGetComments(JObject data, string cookie) { if (data[VkRestApi.ResponseBody] == null) { isRunning = false; return; } if (totalCount == 0) { totalCount = data[VkRestApi.ResponseBody]["count"].ToObject<int>(); if (totalCount == 0) { isRunning = false; return; } step = CalcStep(totalCount, POSTS_PER_REQUEST); } // calculate items in response var count = data[VkRestApi.ResponseBody]["items"].Count(); if (!CheckAndIncrement(count)) return; var comments = new List<Comment>(); var board_id = Convert.ToInt64(cookie); // passed as a cookie // process response body for (int i = 0; i < count; ++i) { var postObj = data[VkRestApi.ResponseBody]["items"][i].ToObject<JObject>(); var comment = new Comment(); comment.id = Utils.getLongField("id", postObj); comment.post_id = board_id; comment.from_id = Utils.getLongField("from_id", postObj); // post date comment.date = Utils.getStringDateField("date", postObj); comment.reply_to_uid = Utils.getLongField("reply_to_uid", postObj); comment.reply_to_cid = Utils.getLongField("reply_to_cid", postObj); comment.likes = Utils.getLongField("likes", "count", postObj); // likes if (comment.likes > 0) { var like = new Like(); like.type = "topic_comment"; like.owner_id = (long)this.groupId; like.item_id = comment.id; likes.Add(like); } // attachments count if (postObj["attachments"] != null) { comment.attachments = postObj["attachments"].ToArray().Length; } // post text comment.text = Utils.getTextField("text", postObj); // update posters if (!posters.ContainsKey(comment.from_id)) { posters[comment.from_id] = new Poster(); } posters[comment.from_id].BoardComments += 1; // increment number of board comments posters[comment.from_id].RecLikes += comment.likes; // add to the poster ids if (comment.from_id != this.groupId) posterIds.Add(comment.from_id); comments.Add(comment); // add to board post info if (!boardPostInfo.ContainsKey(comment.id)) { boardPostInfo[comment.id] = new PostInfo(comment.id, comment.from_id); } // update u2u matrix for replies var to = ParseCommentForReplyTo(comment.text); if (to > 0) { UpdateU2UMatrix(comment.from_id, to, true); // reply is comment posters[comment.from_id].Comments += 1; // there must by a poster down there - update posters if (!posters.ContainsKey(to)) { posters[to] = new Poster(); } posters[to].RecComments += 1; // increment number of received comments } } // save the board comments Utils.PrintFileContent(groupBoardCommentsWriter, comments); }
// process likes user list private void OnLikesGetList(JObject data, string cookie) { if (data[VkRestApi.ResponseBody] == null) { isRunning = false; return; } // calculate items in response int count = data[VkRestApi.ResponseBody]["items"].Count(); if (!CheckAndIncrement(count)) return; var post_id = Convert.ToInt64(cookie); // passed as a cookie // process response body for (var i = 0; i < count; ++i) { var likerId = data[VkRestApi.ResponseBody]["items"][i].ToObject<long>(); // this user liked the subject - add him to the posters if (!posters.ContainsKey(likerId)) { posters[likerId] = new Poster(); } posters[likerId].Likes += 1; // increment poster's likes count posterIds.Add(likerId); // update u2u matrix var to = GetPosterFromPostId(post_id); if (to != 0) { UpdateU2UMatrix(likerId, to, false); } } }