private static string ReadFromSource(Interfaces.ISourceReader reader) { reader.Prepare(); string content = reader.ReadSource(); reader.Release(); return(content); }
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); }