Example #1
0
        static void Main(string[] args)
        {
            ILogger        logger         = new CloudLogger();
            ProductService productService = new ProductService(logger);

            productService.Log("Hello World!");
        }
Example #2
0
        static void Main(string[] args)
        {

            //ILogger logger = new FileLogger();
            //ILogger logger = new DatabaseLogger();

            ILogger logger = new CloudLogger();
            ProductService _prodService = new ProductService(logger);
            _prodService.dataLog("My new message");





            //
            //
            //
            /*
            DateTime myDate;
            myDate = DateTime.Now;                              // gets current date and current time
            myDate = DateTime.Today;                            // gets current date but time will be midnight
            myDate = Convert.ToDateTime(Console.ReadLine());    // converts string from userInput to date and time
            Console.WriteLine(myDate.ToString("MM/dd/yyyy"));   // only date portion of DateTime variable is displayed
            */

        }
Example #3
0
        static void Main(string[] args)
        {
            RemoteControlSetup remoteSetup = new RemoteControlSetup();
            RemoteControl      remote      = remoteSetup.InitializeRemote();

            ILogger    logger     = new CloudLogger();
            LogManager logManager = new LogManager(logger);

            logger.Log("Hi Logger!");
        }
Example #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Startup"/> class.
        /// </summary>
        /// <param name="configuration">App configuration</param>
        /// <param name="env">Hosting environment</param>
        /// <param name="logger">Logger used for tracing</param>
        public Startup(IConfiguration configuration, IHostingEnvironment env, ILogger <Startup> logger)
        {
            var builder = new ConfigurationBuilder()
                          .AddJsonFile("appsettings.json", optional: false)
                          .AddJsonFile("secrets.json", optional: true)
                          .AddJsonFile("/flexvol/secrets.json", optional: true)
                          .AddEnvironmentVariables();

            this.Configuration = builder.Build();
            this.logger        = logger;
            CloudLogger.SetLogger(logger);
            this.cloudProvider      = new CloudFactory(this.Configuration).Provider();
            this.currentEnvironment = env;
        }