Beispiel #1
0
 public void Add(Element element)
 {
     element.Apply(
         onFeature: x => _features.Add(x),
         onOption: x => _options.Add(x),
         onProperty: x => _properties.Add(x));
 }
Beispiel #2
0
 public void Add(Element element)
 {
     element.Apply(
         onFeature: x => _features.Add(x),
         onParameterInit: x => _parameters.Add(x),
         onProperty: x => _properties.Add(x));
 }
Beispiel #3
0
 /// <summary>
 /// Adds the specified element to the <see cref="ScoredProperty"/>.
 /// </summary>
 /// <param name="property">The Property to add.</param>
 /// <returns>A new ScoredProperty with the element added.</returns>
 public ScoredProperty Add(Property property)
 {
     return(new ScoredProperty(
                Name,
                Value,
                ParameterRef,
                _scoredProperties,
                _properties.Add(property)));
 }
Beispiel #4
0
 /// <summary>
 /// Adds the specified element to the <see cref="ScoredProperty"/>.
 /// </summary>
 /// <param name="element">The ScoredProperty to add.</param>
 /// <returns>A new ScoredProperty with the element added.</returns>
 public ScoredProperty Add(ScoredProperty element)
 {
     return(new ScoredProperty(
                Name,
                Value,
                ParameterRef,
                _scoredProperties.Add(element),
                _properties));
 }
Beispiel #5
0
 public void Add(Element element)
 {
     element.Apply(
         onScoredProperty: x => _scoredProperties.Add(x),
         onProperty: x => _properties.Add(x),
         onParameterRef: x =>
     {
         ThrowIfValueOrParameterRefExists();
         _parameterRef = x;
     },
         onValue: x =>
     {
         ThrowIfValueOrParameterRefExists();
         _value = x;
     });
 }
Beispiel #6
0
 public Feature Add(Feature feature)
 {
     return(new Feature(Name, _properties, _options, _features.Add(feature)));
 }
Beispiel #7
0
 public Feature Add(Property property)
 {
     return(new Feature(Name, _properties.Add(property), _options, _features));
 }
Beispiel #8
0
 /// <summary>
 /// Add the specified element to the <see cref="Option"/>.
 /// </summary>
 /// <param name="element">The <see cref="ScoredProperty"/> to add.</param>
 /// <returns>A new Option with the element added.</returns>
 public Option Add(ScoredProperty element)
 {
     return(new Option(Name, Constrained, _properties, _scoredProperties.Add(element)));
 }
Beispiel #9
0
 /// <summary>
 /// Adds the specified element to the <see cref="Property"/>.
 /// </summary>
 /// <param name="property">The property to add to this instance.</param>
 /// <returns>A new Property with the element added.</returns>
 public Property Add(Property property)
 {
     return(new Property(Name, Value, _properties.Add(property)));
 }
Beispiel #10
0
 public void Add(Element element)
 {
     element.Apply(
         onProperty: x => _properties.Add(x),
         onValue: x => _value = x);
 }
Beispiel #11
0
 public void Add(Element element)
 {
     element.Apply(onProperty: x => _properties.Add(x));
 }
Beispiel #12
0
 public Capabilities Add(Property element)
 {
     return(new Capabilities(_features, _parameters, _properties.Add(element), _declaredNamespaces));
 }