internal void Update(DateTime now, string value, PointState pointState, FeedState feedState = Models.FeedState.OK) { RealDate = now; RealValue = value; RealState = (int)pointState; FeedState = (int)feedState; }
public int Delete(FeedState feed) { List <FeedState> lst = new List <FeedState>(); lst.Add(feed); return(Delete(lst)); }
public int Save(FeedState feed) { List <FeedState> lstfeed = new List <FeedState>(); lstfeed.Add(feed); return(Save(lstfeed)); }
public async Task <FeedState> GetCurrentStateAsync(Uri uri) { var contentsCurrentHtml = await _webRepository.GetContents(uri); var contentsCurrentText = await _html2TextConverter.Html2TextAsync(contentsCurrentHtml); var contentThumbprint = MakeThumbprint(contentsCurrentText); var feedState = new FeedState { ContentTextThumbprint = contentThumbprint, ContentText = contentsCurrentText }; return(feedState); }
public virtual void Validate(FeedState item) { string strMsg = string.Empty; if (item.ID < 0) { strMsg += "Feedi Id nao pode ser menor ou igual a zero." + Environment.NewLine; } if (String.IsNullOrEmpty(item.Name)) { strMsg += "Feed Name nao pode ser nulo." + Environment.NewLine; } if (strMsg != string.Empty) { throw new TebaldiMarketDataException(strMsg); } }
public Task SetFeedFlags(string location, FeedState feedState) { var response = Event<GetResponseInterface>.RaiseFirst(); if (CancellationRequested) { response.OperationCanceled("set-feed"); return FinishedSynchronously; } if (Event<CheckForPermission>.RaiseFirst(PermissionPolicy.EditSystemFeeds)) { PackageManagerSettings.PerPackageSettings[location, "state"].SetEnumValue(feedState); } return FinishedSynchronously; }
public void FeedDetails(string location, DateTime lastScanned, bool session, bool suppressed, bool validated, FeedState state) { _feeds.Value.Add(new Feed { Location = location, LastScanned = lastScanned, IsSession = session, IsSuppressed = suppressed, FeedState = state }); }
public FeedState GetFeed(int Id) { FeedState feed = GetFeeds(Id).Find(f => f.ID == Id); return(feed); }
public Task SetFeed(string feedLocation, FeedState state) { return(Remote.SetFeedFlags(feedLocation, state)); }
public void RemoveFeedState(FeedState feedState) { _unitOfWork.FeedState.Remove(feedState); }