Esempio n. 1
0
        public static DataOutput FromData(string sessionName, DataOutputData data, DataSource.DataSourceData sourceData)
        {
            switch (data.Type)
            {
            case DataOutputTypes.SubDirectory:
                return(new SubDirectoryOutput(sourceData.DirectoryName));

            case DataOutputTypes.Json:
                return(new JsonOutput(sessionName, data.DataFilename, data.JsonTagsKey));

            default:
                return(null);
            }
        }
        public DataOutput BuildOutput(string sessionName, DataSource.DataSourceData sourceData)
        {
            switch (_type)
            {
            case null:
                throw new ArgumentException();

            case DataOutput.DataOutputTypes.SubDirectory:
                return(new SubDirectoryOutput(sourceData.DirectoryName));

            case DataOutput.DataOutputTypes.Json:
                return(new JsonOutput(sessionName, _jsonFileName, _jsonTagKey));

            default:
                throw new ArgumentException();
            }
        }