示例#1
0
 private ResourceProperties(ResourceProperties propertiesToClone)
 {
     if (propertiesToClone?.m_items?.Count > 0)
     {
         m_items = new Dictionary <String, JToken>(propertiesToClone.m_items, StringComparer.OrdinalIgnoreCase);
     }
 }
示例#2
0
        public void UnionWith(
            ResourceProperties properties,
            Boolean overwrite = false)
        {
            if (properties?.m_items == null)
            {
                return;
            }

            foreach (var property in properties.m_items)
            {
                if (overwrite || !this.Items.ContainsKey(property.Key))
                {
                    this.Items[property.Key] = property.Value;
                }
            }
        }