Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BarType"/> class.
 /// </summary>
 /// <param name="symbol">The bar type symbol.</param>
 /// <param name="specification">The bar type specification.</param>
 public BarType(
     Symbol symbol,
     BarSpecification specification)
 {
     this.Symbol        = symbol;
     this.Specification = specification;
 }
Exemplo n.º 2
0
        // Due to the convention that an IEquatable<T> argument can be null the compiler now emits
        // a warning unless Equals is marked with [AllowNull] or takes a nullable param. We don't
        // want to allow null here for the sake of silencing the warning and so temporarily using
        // #pragma warning disable CS8767 until a better refactoring is determined.
#pragma warning disable CS8767
        /// <summary>
        /// Returns a value indicating whether this <see cref="BarSpecification"/> is equal
        /// to the given <see cref="BarSpecification"/>.
        /// </summary>
        /// <param name="other">The other object.</param>
        /// <returns>A <see cref="bool"/>.</returns>
        public bool Equals(BarSpecification other)
        {
            return(this.Period == other.Period &&
                   this.BarStructure == other.BarStructure &&
                   this.PriceType == other.PriceType);
        }