コード例 #1
0
        public string GetStringProperty(string key, string defaultValue = null)
        {
            BundleVersionProperty property = this.Properties.FirstOrDefault(p => p.Key.ToLower() == key.ToLower());

            if (property == null)
            {
                return(defaultValue);
            }

            return(property.Value ?? defaultValue);
        }
コード例 #2
0
        public void SetStringProperty(string key, string value)
        {
            BundleVersionProperty property = this.Properties.FirstOrDefault(p => p.Key.ToLower() == key.ToLower());

            if (property == null)
            {
                property = new BundleVersionProperty();
                property.BundleVersion = this;
                property.Key           = key;
                this.Properties.Add(property);
            }

            property.Value = value;
        }