コード例 #1
0
 public void CanGenXmlForSection()
 {
     Section section = new Section
     {
         OutputPath = @"C:\output-code-gen",
         Namespace = "Awish.Security.Data",
         ConnectionString = "user id=sa;password=anja8247;database=AwishSecurity;server=maximus;",
         Namer = "HyperActive.Core.NameProvider, HyperActive",
         Generator = "HyperActive.Core.Generators.BasicActiveRecordGenerator, HyperActive"
     };
     //Console.WriteLine(section.ToString().Replace("\"", "\\\""));
     Assert.AreEqual("<config><add key=\"namespace\" value=\"Awish.Security.Data\"></add><add key=\"namer\" value=\"HyperActive.Core.NameProvider, HyperActive\"></add><add key=\"connectionstring\" value=\"user id=sa;password=anja8247;database=AwishSecurity;server=maximus;\"></add><add key=\"generator\" value=\"HyperActive.Core.Generators.BasicActiveRecordGenerator, HyperActive\"></add><add key=\"outputpath\" value=\"C:\\output-code-gen\"></add></config>", section.ToString());
 }
コード例 #2
0
ファイル: ConfigBuilder.cs プロジェクト: chrcar01/HyperActive
 public void AddSection(Section section)
 {
     _sections.Add(section);
 }