public ItemCostXml(
            [JsonProperty(PropertyName = "capitalresource", DefaultValueHandling = DefaultValueHandling.Ignore)]
            ItemCostCapitalResourceXml capitalResource,
            [JsonProperty(PropertyName = "gamecurrency", DefaultValueHandling = DefaultValueHandling.Ignore)]
            ItemCostGameCurrencyXml gameCurrency)
        {
            if (capitalResource == null && gameCurrency == null)
            {
                throw new ArgumentNullException();
            }

            if (capitalResource != null && gameCurrency != null)
            {
                throw new ArgumentOutOfRangeException();
            }

            CapitalResource = capitalResource;
            GameCurrency    = gameCurrency;
        }
 public ItemCostXml(GameCurrencyTypeEnum gameCurrency, double quantity)
 {
     CapitalResource = null;
     GameCurrency    = new ItemCostGameCurrencyXml(gameCurrency, quantity);
 }