コード例 #1
0
        public void Add(IClosedDocument document)
        {
            if (document == null)
            {
                return;
            }

            //Remove duplications
            var docs = ClosedDocuments
                       .Where(x => _closedDocumentComparer.Equals(x, document))
                       .ToArray();

            //TODO: use intersect
            foreach (var doc in docs)
            {
                ClosedDocuments.Remove(doc);
            }
            //TODO: filter history by MaxAllowed Number and Days...
            ClosedDocuments.AddFirst(document);
            OnHistoryChanged();
        }
コード例 #2
0
        public void Equals_Should_Handle_Null()
        {
            var ret = _closedDocumentComparer.Equals(null, null);

            Assert.True(ret);
        }