public bool Equals(DocumentMetadata other)
        {
            if (other == null)
            {
                return(false);
            }

            return(this.GetHashCode().Equals(other.GetHashCode()));
        }
Exemple #2
0
        public TextDocument(string text, DocumentMetadata metadata)
        {
            if (text == null)
            {
                throw new ArgumentNullException(nameof(text));
            }
            if (metadata == null)
            {
                Metadata = new DocumentMetadata();
            }
            else
            {
                Metadata = metadata;
            }

            _text = text;
        }