예제 #1
0
 public Builder(ConfigDataJsonNode node)
 {
     Schema    = node.Schema;
     Languages = new HashSet <string>(node.Languages, StringComparer.OrdinalIgnoreCase);
     Commands  = node.Commands;
     Settings  = node.Settings;
 }
예제 #2
0
 private ConfigDataJsonNode(ConfigDataJsonNode node, ConfigDataTranslateJsonNode translateNode)
 {
     Schema    = node.Schema;
     Languages = node.Languages;
     Commands  = node.Commands.TranslateWith(translateNode.Commands);
     Settings  = node.Settings.TranslateWith(translateNode.Settings);
 }
예제 #3
0
 private SettingsJsonNode(SettingsJsonNode node, SettingsTranslateJsonNode translateNode)
     : base(ArrayHelper.Clone(node.Categories), ArrayHelper.Clone(node.Items))
 {
     foreach (var categoryTranslateNode in translateNode.Categories)
     {
         int index = node.GetCategoryIndex(categoryTranslateNode.Key);
         if (index != -1)
         {
             Categories[index] = node.Categories[index].TranslateWith(categoryTranslateNode);
         }
     }
     foreach (var itemTranslateNode in translateNode.Items)
     {
         int index = node.GetItemIndex(itemTranslateNode.Key);
         if (index != -1)
         {
             Items[index] = node.Items[index].TranslateWith(itemTranslateNode);
         }
     }
 }
예제 #4
0
 public Builder(CommandsJsonNode commands, SettingsJsonNode settings)
 {
     Commands = commands;
     Settings = settings;
 }
예제 #5
0
 public ConfigDataJsonNode(CommandsJsonNode commands, SettingsJsonNode settings)
 {
     Commands = commands;
     Settings = settings;
 }