Esempio n. 1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="configManager"> for determining whether in application is in standalone mode.</param>
        /// <param name="eventAggregator"> for publishing report data messages to listeners.</param>
        /// <param name="requestPricer"> for range pricing of a request.</param>
        /// <exception cref="ArgumentNullException"> thrown if configManager or eventAggregator parameters are null.</exception>
        public ReportDataManagerImpl(IConfigurationManager configManager, IEventAggregator eventAggregator, IOptionRequestPricer requestPricer)
        {
            if (configManager == null)
            {
                throw new ArgumentNullException("configManager");
            }

            if (eventAggregator == null)
            {
                throw new ArgumentNullException("eventAggregator");
            }

            if (requestPricer == null)
            {
                throw new ArgumentNullException("requestPricer");
            }

            this.configManager   = configManager;
            this.eventAggregator = eventAggregator;
            this.requestPricer   = requestPricer;
        }
Esempio n. 2
0
        public RequestForQuoteGridViewModel(IBookManager bookManager, IClientManager clientManager, IOptionRequestParser optionRequestParser,
                                            IOptionRequestPricer optionRequestPricer, IChatServiceManager chatServiceManager, IUnderlyingManager underlyingManager,
                                            IOptionRequestPersistanceManager optionRequestPersistanceManager, IEventAggregator eventAggregator,
                                            IConfigurationManager configManager, IUserManager userManager)
        {
            if (optionRequestPricer == null)
            {
                throw new ArgumentNullException("optionRequestPricer");
            }

            if (optionRequestParser == null)
            {
                throw new ArgumentNullException("optionRequestParser");
            }

            if (clientManager == null)
            {
                throw new ArgumentNullException("clientManager");
            }

            if (bookManager == null)
            {
                throw new ArgumentNullException("bookManager");
            }

            if (userManager == null)
            {
                throw new ArgumentNullException("userManager");
            }

            if (underlyingManager == null)
            {
                throw new ArgumentNullException("underlyingManager");
            }

            if (chatServiceManager == null)
            {
                throw new ArgumentNullException("chatServiceManager");
            }

            if (eventAggregator == null)
            {
                throw new ArgumentNullException("eventAggregator");
            }

            if (optionRequestPersistanceManager == null)
            {
                throw new ArgumentNullException("optionRequestPersistanceManager");
            }

            if (configManager == null)
            {
                throw new ArgumentNullException("configManager");
            }

            this.optionRequestParser             = optionRequestParser;
            this.optionRequestPricer             = optionRequestPricer;
            this.clientManager                   = clientManager;
            this.bookManager                     = bookManager;
            this.userManager                     = userManager;
            this.chatServiceManager              = chatServiceManager;
            this.underlyingManager               = underlyingManager;
            this.eventAggregator                 = eventAggregator;
            this.optionRequestPersistanceManager = optionRequestPersistanceManager;
            this.configManager                   = configManager;

            InitializeCommands();
            InitializeCollections();
            InitializeEventSubscriptions();
        }
 public bool CalculatePricing(IOptionRequestPricer optionPricer)
 {
     ResetPricing();
     return(Legs != null && Legs.All(optionPricer.CalculatePricing));
 }