예제 #1
0
 /// <summary>
 ///     Gets Or Adds a PropertyValue with the given label and collection.
 /// </summary>
 /// <param name="label"> </param>
 /// <param name="collections"> </param>
 /// <returns> </returns>
 public override PropertyValue GetPropertyValue(string label, IEnumerable<string> collections = null) {
     var result = _propertyValues.FirstOrDefault(each => each.Label == label);
     if (result == null) {
         _propertyValues.Add(result = new PropertyValue(this, label, collections.IsNullOrEmpty() ? null : collections));
     }
     return result;
 }
        private void SetPropertyValues(PropertyValue pv, IEnumerable<string> values)
        {
            pv.Clear();

                foreach (var v in values)
                {
                    pv.Add(v);
                }
        }