예제 #1
0
 public MutualFund(
     string tickerSymbol,
     string name,
     CurrencyCode currencyCode)
 {
     _currencyCode = currencyCode;
     TickerSymbol  = tickerSymbol;
     Name          = name;
 }
예제 #2
0
 public DomainEvent(
     MutualFundEventTypeForCurrencyChange eventType,
     DateTime effectiveDate,
     CurrencyCode currencyCode,
     MutualFund mutualFund)
 {
     _eventType    = eventType;
     _currencyCode = currencyCode;
     EffectiveDate = effectiveDate;
     _mutualFund   = mutualFund;
 }
예제 #3
0
 public IMutualFundDomainEvent CreateEvent(
     DateTime effectiveDate,
     CurrencyCode currencyCode,
     MutualFund mutualFund)
 {
     return(new DomainEvent(
                this,
                effectiveDate,
                currencyCode,
                mutualFund));
 }
 public DomainEvent(
     MutualFundEventTypeForCreate eventType,
     DateTime effectiveDate,
     string tickerSymbol,
     string fundName,
     CurrencyCode currencyCode)
 {
     _eventType    = eventType;
     _currencyCode = currencyCode;
     EffectiveDate = effectiveDate;
     TickerSymbol  = tickerSymbol;
     _fundName     = fundName;
 }
 public IMutualFundDomainEvent CreateEvent(
     DateTime effectiveDate,
     string tickerSymbol,
     string name,
     CurrencyCode currencyCode)
 {
     return(new DomainEvent(
                this,
                effectiveDate,
                tickerSymbol,
                name,
                currencyCode));
 }
예제 #6
0
        public IMutualFundDomainEvent CreateEventFromJson(
            DateTime effectiveDate,
            string tickerSymbol,
            string json,
            MutualFund mutualFund)
        {
            var jObject = JObject.Parse(json);

            var currencyCodeToken = jObject.SelectToken("currencyCode");

            var currencyCode = new CurrencyCode(currencyCodeToken.ToString());

            return(new DomainEvent(
                       this,
                       effectiveDate,
                       currencyCode,
                       mutualFund));
        }
예제 #7
0
 public void SetCurrencyCode(
     CurrencyCode currencyCode)
 {
     _currencyCode = currencyCode;
 }