private async Task <ICharacteristicManager> CreateCharacteristicManager()
        {
            FileParserResult fileParserResult = await _fileParserManager.ParseFileAsync(_fileName);

            SignalData signalData = SignalDataMapper.Map(fileParserResult);

            return(_characteristicManagerFactory.Create(signalData));
        }
        public async Task <FileParserResult> ParseFileAsync(string fileName)
        {
            Logger.Trace("Start file {0} handling.", fileName);

            FileParserResult fileParserResult = await _fileParserManager.ParseFileAsync(fileName);

            Logger.Trace("End file {0} handling.", fileName);

            return(fileParserResult);
        }
Esempio n. 3
0
        public static void Main(string[] args)
        {
            FluentCommandLineParser <Arguments> parser = ParserBuilder.Build();
            var parserResult = parser.Parse(args);

            if (!parserResult.HasErrors && !parserResult.EmptyArgs)
            {
                Arguments argument  = parser.Object;
                var       container = new ServiceContainer();
                container.RegisterFrom <CompositionRoot>();
                using (var scope = container.BeginScope())
                {
                    IFileParserManager fileParserManager = container.GetInstance <IFileParserManager>();
                    FileParserResult   parseResult       = fileParserManager.ParseFileAsync(argument.Path).Result;
                }
            }
        }