public void Instalize()
        {
            StructureMapConfigure.Configure();
            var container = StructureMapConfigure.Container;

            _store = container.GetInstance <ISamplesMemoryStore>();
        }
예제 #2
0
        /// <summary>
        /// Get All instances that implement ISampleReader from IoC container,
        /// so if you add new sample, just register it and it will works auto
        /// </summary>
        public SamplesCollector()
        {
            _unitOfWork = new SampleReadersUnitOfWork
            {
                SampleReaders = StructureMapConfigure.Container.GetAllInstances <ISampleReader>().ToList()
            };

            _samplesStore = StructureMapConfigure.Container.GetInstance <ISamplesMemoryStore>();
        }