Example #1
0
        /// <summary>
        /// Called when Dependency Injection is being setup
        /// </summary>
        /// <param name="construction">The framework construction</param>
        public override void ConfigureServices(FrameworkConstruction construction)
        {
            //
            //  Example
            // ---------
            //
            //   Add a service like this (include using Microsoft.Extensions.DependencyInjection):
            //
            //      construction.Services.AddSingleton(new SomeClass());
            //
            //   Retrieve the service anywhere in your application like this
            //
            //      Dna.Framework.Service<SomeClass>();
            //

            // Add file logger (will be in /bin/Debug/AddinTesting.log.txt)
            construction.AddFileLogger(Path.ChangeExtension(this.AssemblyFilePath(), "log.txt"));
        }
 public override void ConfigureServices(FrameworkConstruction construction)
 {
     // Add file logger (will be in /bin/Debug/SolidDNA.ScriptRunner.com-register-log.txt)
     construction.AddFileLogger(Path.ChangeExtension(this.AssemblyFilePath(), "com-register-log.txt"));
 }