예제 #1
0
 public static BuildSettings Create(eDomain domain)
 {
     return(new BuildSettings
     {
         Domain = domain
     });
 }
예제 #2
0
 public static BuildSettings Create(eDomain domain, eEntityType entityType)
 {
     return(new BuildSettings
     {
         Domain = domain,
         EntityType = entityType
     });
 }
예제 #3
0
        private static string[] GetConfigItems(eDomain domain, string tagName)
        {
            var doc          = new XmlDocument();
            var absolutePath = IOHelper.GetExecutionPathLocation("\\Config\\", string.Format("{0}s{1}.xml", tagName, domain));

            doc.Load(absolutePath);

            var nodes = new List <XmlNode>(doc.DocumentElement.GetElementsByTagName(tagName).OfType <XmlNode>());
            var items = nodes.Select(n => n.FirstChild.Value).ToArray();

            return(items);
        }
예제 #4
0
 public static List <string> GetEnums(eDomain domain)
 {
     return(GetConfigItems(domain, "Enum")
            .Select(e => StringBuilder <int> .PluralizationService.Singularize(e))
            .ToList());
 }
 public BuildManager(eDomain defaultDomain, Action <eBuilder, IBuilder> addEventsCallack)
 {
     Initialize(defaultDomain, addEventsCallack);
 }
 public BuildManager(eDomain defaultDomain) : this(defaultDomain, null)
 {
 }
 private void Initialize(eDomain defaultDomain, Action <eBuilder, IBuilder> addEventsCallack)
 {
     Settings = BuildSettings.Create(defaultDomain);
     InitializeBuilders(addEventsCallack);
     Statistics = BuildStatistics.Create(this);
 }