public IEnumerable <ValidationError> Validate(FeedItem feeditem) { if (feeditem.GetType() != typeof(EmFeed)) { throw new Exception("Incorrect type detected"); } if (feeditem.SourceAccountId == default(int)) { _validationerror.Add(new ValidationError(((EmFeed)feeditem).FeedItemId, "SourceAccountId is empty!")); } if (((EmFeed)feeditem).Sedol == default(string)) { _validationerror.Add(new ValidationError(((EmFeed)feeditem).FeedItemId, "Sedol is empty!")); } if (((EmFeed)feeditem).AssetValue == default(int)) { _validationerror.Add(new ValidationError(((EmFeed)feeditem).FeedItemId, "AssetValue is empty!")); } return(_validationerror); }
public FeedItem Match(FeedItem feeditem) { Account.GetAccount(feeditem.SourceAccountId); return(feeditem); }
public FeedItem Match(FeedItem feeditem) { Account.GetAccount(feeditem.CounterpartyId + feeditem.PrincipalId); return(feeditem); }
public void Save(FeedItem matchedaccount) { Console.WriteLine($"EMFeed {matchedaccount.SourceAccountId} successfully saved"); }
public void Save(FeedItem matchedaccount) { Console.WriteLine($"DeltaOneFeed {((DeltaOneFeed)matchedaccount).FeedItemId } successfully saved"); }