예제 #1
0
        /// <summary>
        /// Saves the build property data.
        /// </summary>
        public void SaveBuildPropertyData()
        {
            var xml      = Memberfactory.SerializeAllSetupData(BuildProperties);
            var filename = Path.Combine(Application.StartupPath, this.BuildPropertyFilename);

            File.WriteAllText(filename, xml);
        }
예제 #2
0
        private void GeneratorConfigLoad(IBuildDataDictionary properties)
        {
            Log("--------- Loading Property Data (Start) ------------");

/*            var sampleXmlData =
 * @"<NStub.CSharp.ObjectGeneration.Builders.PropertyBuilder>" + Environment.NewLine +
 * @"  <PropertyBuilderUserParameters>" + Environment.NewLine +
 * @"    <MethodSuffix>HeuteMalWasNeues</MethodSuffix>" + Environment.NewLine +
 * @"    <UseDings>true</UseDings>" + Environment.NewLine +
 * @"    <Moep>0</Moep>" + Environment.NewLine +
 * @"    <Enabled>false</Enabled>" + Environment.NewLine +
 * @"  </PropertyBuilderUserParameters>" + Environment.NewLine +
 * @"</NStub.CSharp.ObjectGeneration.Builders.PropertyBuilder>";
 */

            // IBuildSystem sys;
            // sys.
            var filename = Path.Combine(Application.StartupPath, this.BuildPropertyFilename);

            if (File.Exists(filename))
            {
                var xml = File.ReadAllText(filename);
                Memberfactory.DeserializeAllSetupData(xml, properties);
            }
            else
            {
                Log("Build parameter file '" + filename + "' does not exist. Skipped loading.");
                HasSkippedLoading = true;
            }

            // log the parsed data to the logger.
            var xmlparsed = Memberfactory.SerializeAllSetupData(BuildProperties);

            Log("Property data in property store:");
            Log(xmlparsed);
            Log("--------- Loading Property Data (End) ------------");
        }