public int Locate( Vote vote )
		{
			var document = provider.Load( vote.Location );
			var node = document.DocumentNode.SelectSingleNode( "//div[@class='uvIdeaVoteCount']/strong" );
			var data = node.InnerText;
			var result = int.Parse( data, NumberStyles.AllowThousands );
			return result;
		}
		public int Locate( Vote vote )
		{
			var minimum = vote.Records.OrderByDescending( record => record.Created ).FirstOrDefault().With( x => x.Count );
			var result = new Random().Next( minimum + 5, minimum + 150 );
			return result;
		}
예제 #3
0
		public void Update( Recording set, Vote vote )
		{
			var record = context.Create<Record>( x => x.Recording = set );
			record.Count = locator.Locate( vote );
			vote.Records.Add( record );
		}