Ejemplo n.º 1
0
        private static void ReadDynamicSource(Data.SourceType selectedSource)
        {
            string sourceContent = string.Empty;

            if (selectedSource == Data.SourceType.Console)
            {
                var console = new Classes.ConsoleReader();

                console.Prepare();

                sourceContent = console.ReadSource();

                console.Release();
            }
            else if (selectedSource == Data.SourceType.File)
            {
                var filesource = new Classes.FileReader(DATA_SOURCE);

                filesource.Prepare();

                sourceContent = filesource.ReadSource();

                filesource.Release();
            }
            else if (selectedSource == Data.SourceType.Input)
            {
                var inputsource = new Classes.TestReader(DATA_SOURCE);

                inputsource.Prepare();

                sourceContent = inputsource.ReadSource();

                inputsource.Release();
            }
        }
Ejemplo n.º 2
0
        private static void ReadHardCodedSource()
        {
            Classes.FileReader reader = new Classes.FileReader(DATA_SOURCE);

            reader.Prepare();

            string content = reader.ReadSource();

            reader.Release();
        }