Esempio n. 1
0
 /// <summary>
 /// Indicates whether the current object is equal to another object of the same type.
 /// </summary>
 /// <returns>
 /// true if the current object is equal to the <paramref name="other"/> parameter; otherwise, false.
 /// </returns>
 /// <param name="other">An object to compare with this object.</param>
 public Boolean Equals(ActualParameterElement other)
 {
     return(EqualityHelper.IsNullOrReferenceEqual(other, this) ??
            ParameterName.Equals(other.ParameterName) &&
            Position.Equals(other.Position) &&
            Equals(Value, other.Value));
 }
        /// <summary>
        /// Creates the specified parameter.
        /// </summary>
        private ICommandCallActualArgument Create(ActualParameterElement parameter)
        {
            if (parameter.ParameterName.HasValue)
            {
                return(new NamedCommandCallActualArgument(parameter.ParameterName, parameter.Value.Value));
            }
            if (parameter.Position.HasValue)
            {
                return(new PositionedCommandCallActualArgument(parameter.Position, parameter.Value.Value));
            }

            throw new NotSupportedException("Not supported function call!");
        }