Golem.Core.Configuration.Save C# (CSharp) Method

Save() public method

public Save ( ) : void
return void
        public void Save()
        {
            WriteFile(_file);
        }

Usage Example

        public void Can_Automatically_Generate_First_Config_File()
        {
            Assert.IsFalse(Configuration.ConfigFileExists);

            var config = new Configuration();

            Assert.IsTrue(config.IsNew);
            Assert.IsTrue(Configuration.ConfigFileExists);

            var cataloger = new RecipeCataloger(Environment.CurrentDirectory);
            cataloger.CatalogueRecipes();

            if(config.IsNew)
                config.SearchPaths.AddRange(
                    cataloger.LoadedAssembliesContainingRecipes.Select(la=>la.Assembly.FullName)
                    );

            config.Save();

            var config2 = new Configuration();
            Assert.IsFalse(config2.IsNew);
            Assert.AreEqual(1, config2.SearchPaths.Count);
        }
All Usage Examples Of Golem.Core.Configuration::Save