Exemplo n.º 1
0
 public void AddField(Field field)
 {
     lock (_lockObject)
     {
         if (!FullyQualifiedPickListCollection.Contains(field.Name, StringComparer.CurrentCultureIgnoreCase))
         {
             _barePickListCollection           = _barePickListCollection.Union(new string[] { field.FieldName }).ToArray();
             _barePickList                     = string.Join(PickListSeparator.ToString(), _barePickList, field.FieldName);
             _fullyQualifiedPickListCollection = _fullyQualifiedPickListCollection.Union(new string[] { field.Name }).ToArray();
             _fullyQualifiedPickList           = string.Join(PickListSeparator.ToString(), _fullyQualifiedPickList, field.Name);
         }
     }
 }
Exemplo n.º 2
0
        public void Normalize(IEnumerable <Field> entityFields)
        {
            // materialize the entityFields collection if it is an enumerator rather than a collection.
            if (!(entityFields is IList <Field>))
            {
                entityFields = entityFields.ToArray();
            }

            lock (_lockObject)
            {
                _fullyQualifiedPickList           = NormalizePickList(_pickList, entityFields);
                _fullyQualifiedPickListCollection = FullyQualifiedPickList.Split(PickListSeparator);
                _barePickListCollection           = FullyQualifiedPickListCollection.Select(x => DequalifyPickListField(x)).ToArray();
                _barePickList = string.Join(PickListSeparator.ToString(), BarePickListCollection);
            }
        }