public static void ReadInput() { Console.WriteLine(@" ********************************************* ** ** ** BANGAZON FINANCIAL REPORT ** ** ** ********************************************* Weekly Report ------------- Product Amount ...................................... "); List <KeyValuePair <string, int> > reportValues = new List <KeyValuePair <string, int> >(); MultiFactory multiFactory = new MultiFactory(); reportValues = multiFactory.WeeklyReport(); foreach (var y in reportValues) { Console.WriteLine(String.Format("{0,-30}" + "{1:c0}", y.Key, y.Value)); } Console.WriteLine(""); Console.WriteLine("Press ENTER to go back to MainMenu"); Console.ReadLine(); }
public static void ReadInput() { Console.WriteLine(@" ********************************************* ** ** ** BANGAZON FINANCIAL REPORT ** ** ** ********************************************* Monthly Report ------------- Product Amount ...................................... "); var connectionString = $"Filename={System.Environment.GetEnvironmentVariable("REPORTING_DB_PATH")}"; List <KeyValuePair <string, int> > reportValues = new List <KeyValuePair <string, int> >(); MultiFactory multiFactory = new MultiFactory(); reportValues = multiFactory.MonthlyReport(); foreach (var y in reportValues) { Console.WriteLine(String.Format("{0,-30}" + "{1:c0}", y.Key, y.Value)); } Console.WriteLine(""); Console.WriteLine("Press ENTER to go back to MainMenu"); Console.ReadLine(); }
private static IRuntimeTypeSource CreateRuntimeTypeSource() { var typeFactory = new MultiFactory( new List<TypeFactoryRegistration> { new TypeFactoryRegistration(new TypeFactory(), type => type != typeof (ChildClass)), new TypeFactoryRegistration(new TypeFactoryMock((type, args) => new ChildClass {Name = "InnerName"}), type => type == typeof (ChildClass)), }); var typeFeatureProvider = new TypeFeatureProvider(new TypeConverterProvider()); var xamlTypeRepository = new TypeRepository(new NamespaceRegistry(), typeFactory, typeFeatureProvider); var typeSource = new RuntimeTypeSource(xamlTypeRepository, new NamespaceRegistry()); typeFeatureProvider.RegisterMetadata(typeof (DummyObject), new Metadata {RuntimePropertyName = "Name"}); return typeSource; }
private static IRuntimeTypeSource CreateRuntimeTypeSource() { var typeFactory = new MultiFactory( new List <TypeFactoryRegistration> { new TypeFactoryRegistration(new TypeFactory(), type => type != typeof(ChildClass)), new TypeFactoryRegistration(new TypeFactoryMock((type, args) => new ChildClass { Name = "InnerName" }), type => type == typeof(ChildClass)), }); var typeFeatureProvider = new TypeFeatureProvider(new TypeConverterProvider()); var xamlTypeRepository = new TypeRepository(new NamespaceRegistry(), typeFactory, typeFeatureProvider); var typeSource = new RuntimeTypeSource(xamlTypeRepository, new NamespaceRegistry()); typeFeatureProvider.RegisterMetadata(typeof(DummyObject), new Metadata { RuntimePropertyName = "Name" }); return(typeSource); }