예제 #1
0
        public override string ToString()
        {
            if (AddedSecurities.Count == 0 && RemovedSecurities.Count == 0)
            {
                return("SecurityChanges: None");
            }
            var added = string.Empty;

            if (AddedSecurities.Count != 0)
            {
                added = " Added: " + string.Join(",", AddedSecurities.Select(x => x.Symbol.ID));
            }
            var removed = string.Empty;

            if (RemovedSecurities.Count != 0)
            {
                removed = " Removed: " + string.Join(",", RemovedSecurities.Select(x => x.Symbol.ID));
            }
            return("SecurityChanges: " + added + removed);
        }
예제 #2
0
        /// <summary>
        /// Returns a string that represents the current object.
        /// </summary>
        /// <returns>
        /// A string that represents the current object.
        /// </returns>
        /// <filterpriority>2</filterpriority>
        public override string ToString()
        {
            if (Count == 0)
            {
                return("SecurityChanges: None");
            }

            var added = string.Empty;

            if (AddedSecurities.Count != 0)
            {
                added = $" Added: {string.Join(",", AddedSecurities.Select(x => x.Symbol.ID))}";
            }
            var removed = string.Empty;

            if (RemovedSecurities.Count != 0)
            {
                removed = $" Removed: {string.Join(",", RemovedSecurities.Select(x => x.Symbol.ID))}";
            }

            return($"SecurityChanges: {added}{removed}");
        }