예제 #1
0
        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);
        }
예제 #2
0
 public FeedItem Match(FeedItem feeditem)
 {
     Account.GetAccount(feeditem.SourceAccountId);
     return(feeditem);
 }
 public FeedItem Match(FeedItem feeditem)
 {
     Account.GetAccount(feeditem.CounterpartyId + feeditem.PrincipalId);
     return(feeditem);
 }
예제 #4
0
 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");
 }