Exemplo n.º 1
0
 /// <summary>
 /// Gets the value of the <see cref="ParameterInit"/> specified name.
 /// </summary>
 /// <param name="name">The name of the <see cref="ParameterInit"/>.</param>
 /// <returns>
 /// The value of the <see cref="ParameterInit"/> specified name.
 /// </returns>
 public Value Get(ParameterName name)
 {
     if (name == null)
     {
         throw new ArgumentNullException(nameof(name));
     }
     return(_parameters.Get(name)?.Value);
 }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ParameterDef"/> class.
        /// </summary>
        /// <param name="name">Name of this element.</param>
        /// <param name="elements">Properties of this element.</param>
        public ParameterDef(ParameterName name, params Property[] elements)
        {
            Name = name;

            var properties = ImmutableNamedElementCollection.CreatePropertyCollectionBuilder();

            foreach (var e in elements)
            {
                properties.Add(e);
            }

            _properties = properties.ToImmutable();
        }
Exemplo n.º 3
0
        /// <summary>
        /// Set a value to the <see cref="ParameterInit"/> specified by name.
        /// </summary>
        /// <param name="name">
        /// The name of the <see cref="ParameterInit"/> to set.
        /// </param>
        /// <param name="value">A value to set to the <see cref="ParameterInit"/>.</param>
        /// <returns>A new Ticket with the value set.</returns>
        public Ticket Set(ParameterName name, Value value)
        {
            if (name == null)
            {
                throw new ArgumentNullException(nameof(name));
            }
            if (value == null)
            {
                throw new ArgumentNullException(nameof(value));
            }

            var pi = new ParameterInit(name, value);

            return(new Ticket(_features, _parameters.SetItem(pi), _properties, _declaredNamespaces));
        }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ParameterRef"/> class.
 /// </summary>
 /// <param name="name">Name of ParameterRef element</param>
 public ParameterRef(ParameterName name)
 {
     Name = name;
 }
Exemplo n.º 5
0
 internal ParameterDef(ParameterName name, ImmutableNamedElementCollection <Property> properties)
 {
     Name        = name;
     _properties = properties;
 }
Exemplo n.º 6
0
 public PrintSchemaParameterRef(ParameterName name)
 {
     _parameterRef = new ParameterRef(name);
 }
Exemplo n.º 7
0
 public PrintSchemaParameterInit(ParameterName name)
 {
     _name = name;
 }
Exemplo n.º 8
0
 public PrintSchemaParameterDef(ParameterName name)
 {
     _name = name;
 }
Exemplo n.º 9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ParameterInit"/> class.
 /// </summary>
 /// <param name="name">Name of the element.</param>
 /// <param name="value">Value of the element.</param>
 public ParameterInit(ParameterName name, Value value)
 {
     Name  = name;
     Value = value;
 }