Beispiel #1
0
        public IEnumerable <string> GetUnsupportedFileNames()
        {
            if (Directory.Exists(dataDirectory.FullName))
            {
                IEnumerable <FileInfo> xmlFiles =
                    dataDirectory.EnumerateFiles("*.xml");
                foreach (FileInfo xmlFile in xmlFiles)
                {
                    // collecting unsupported graphical data
                    string csvFileName =
                        xmlFile.FullName.Replace(".xml", ".csv");
                    LexiaGraphSessionRawData data =
                        LexiaScanDataFactory.CreateWithCsv(
                            xmlFile.FullName, csvFileName);
                    foreach (LexiaChannelRawData lcrData in data.Channels)
                    {
                        if (LexiaChannelDataTypeMapper.
                            GetTypeEnum(lcrData.Header.Mnemocode) ==
                            LexiaChannelType.NOT_SUPPORTED)
                        {
                            yield return(xmlFile.FullName);

                            yield return(csvFileName);
                        }
                    }
                }
            }

            if (Directory.Exists(lexiaInstallationDisk + tracesDataDirectory))
            {
                LexiaPointTypeDataRetriever retr =
                    new LexiaPointTypeDataRetriever(
                        lexiaInstallationDisk + tracesDataDirectory);
                foreach (FileInfo traceFile in retr.GetTraceFiles())
                {
                    TraceFactory factory = new TraceFactory(traceFile);
                    LexiaTrace   trace   = factory.Create();
                    trace.SourceFilePath = traceFile.FullName;
                    if (trace.ParameterSets.Any(ps => ps.Parameters.
                                                Any(p => p.Type == PsaParameterType.Unsupported)) ||
                        trace.ParameterSets.
                        Any(ps => ps.Name == CodeBehindStringResolver.
                            Resolve("UnsupportedDataSet")))
                    {
                        yield return(traceFile.FullName);

                        foreach (string additionalFileName in
                                 retr.GetAdditionalTraceTxtData(traceFile.FullName))
                        {
                            yield return(additionalFileName);
                        }
                    }
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// Gets all point type data saved in lexia in raw format.
        /// </summary>
        public IList <LexiaGraphSessionRawData> GetGraphsRawData()
        {
            IList <LexiaGraphSessionRawData> result =
                new List <LexiaGraphSessionRawData>();
            IEnumerable <FileInfo> xmlFiles =
                dataDirectory.EnumerateFiles("*.xml");

            foreach (FileInfo xmlFile in xmlFiles)
            {
                string csvFileName = xmlFile.FullName.Replace(".xml", ".csv");
                result.Add(
                    LexiaScanDataFactory.CreateWithCsv(
                        xmlFile.FullName, csvFileName));
            }
            return(result);
        }