Exemplo n.º 1
0
        public ServiceCompiler(ServiceNotifier notifier)
        {
            if (notifier == null)
            {
                throw new ArgumentNullException(nameof(notifier));
            }

            _notifier = notifier;
        }
        /// <summary>
        /// Initializes the service factory and its dependencies.
        /// </summary>
        public void Initialize()
        {
            ContractObserver = new DefaultContractWorkObserver();
            _notifier        = new ServiceNotifier();
            _compiler        = new ServiceCompiler(_notifier);

            //set contract observer to SharedFactory
            SharedFactory.ContractObserver = ContractObserver;

            ContractObserver.OnUpdate((type) =>
            {
                _notifier.SendUpdate(type);
            });
        }