Exemplo n.º 1
0
 public void GetStatusValue()
 {
     XmlDocument xmlDoc = new XmlDocument();
     xmlDoc.LoadXml(GameAsset.text);
     XmlNodeList setting_values = xmlDoc.GetElementsByTagName(costumesSettingsTag);
     costumesSettings = new List<CostumeSettings>();
     foreach (XmlNode setting_value in setting_values) {
         XmlNodeList status_contents = setting_value.ChildNodes;
         CostumeSettings costumeSettings = new CostumeSettings();
         costumeSettings.statusValues = new Dictionary<string, string>();
         foreach (XmlNode status_content in status_contents) {
             foreach (string tag_name in Enum.GetNames(typeof(TagNames))) {
                 if (status_content.Name == tag_name) {
                     costumeSettings.statusValues.Add(tag_name, status_content.InnerText);
                 }
             }
         }
         costumesSettings.Add(costumeSettings);
     }
 }
 public CostumeDBRepository(IOptions <CostumeSettings> costumeConfig)
 {
     _Settings = costumeConfig.Value;
 }