Exemple #1
0
        /// <summary>
        /// Adds the datasource.
        /// </summary>
        /// <param name="sourceIndex">Index of the source.</param>
        /// <param name="sourceSnapshot">The source snapshot.</param>
        public void AddDatasource(MemoryIndex sourceIndex, Snapshot sourceSnapshot)
        {
            MemoryIndexDataSource datasource = new MemoryIndexDataSource(sourceIndex, sourceSnapshot);

            if (!datasources.Contains(datasource))
            {
                datasources.Add(datasource);
            }
        }
Exemple #2
0
        /// <inheritdoc />
        public override bool Equals(object obj)
        {
            if (base.Equals(obj))
            {
                return(true);
            }

            MemoryIndexDataSource other = obj as MemoryIndexDataSource;

            if (other != null)
            {
                return(SourceIndex.Equals(other.SourceIndex) && SourceSnapshot.Equals(other.SourceSnapshot));
            }
            else
            {
                return(false);
            }
        }