Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BarData"/> class.
 /// </summary>
 /// <param name="barType">The bar type.</param>
 /// <param name="bar">The bar.</param>
 public BarData(BarType barType, Bar bar)
 {
     this.BarType = barType;
     this.Bar     = bar;
 }
Пример #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="BarType"/> 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(BarType other)
        {
            return(this.Symbol.Equals(other.Symbol) && this.Specification.Equals(other.Specification));
        }