Ejemplo n.º 1
0
        private static string ReadFromSource(Interfaces.ISourceReader reader)
        {
            reader.Prepare();

            string content = reader.ReadSource();

            reader.Release();

            return(content);
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Example: Interfaces");

            // read hard coded from a json source.
            ReadHardCodedSource();

            // read from a dynamic source
            ReadDynamicSource(Data.SourceType.File);

            // read from a source hidden by interface
            Interfaces.ISourceReader reader = SelectSource(Data.SourceType.File, DATA_SOURCE);

            string content = ReadFromSource(reader);
        }