Microsoft.Cci.SourceDocumentWithInclusion.SourceDocumentWithInclusion C# (CSharp) Method

SourceDocumentWithInclusion() public method

Allocates an object that represents a primary source document that has a region of text that originally came from another source document.
public SourceDocumentWithInclusion ( IPrimarySourceDocument wrappedDocument, int originalLineNumber, string originalDocumentName, int startingPositionOfIncludedRegion ) : System
wrappedDocument IPrimarySourceDocument A primary source document that has an inclusion (but does not know about it).
originalLineNumber int The starting line number that the included region of text has in the the document it originated from.
originalDocumentName string The name of the document from which the included region of text has originated.
startingPositionOfIncludedRegion int The position in the wrapped document where the included region starts.
return System
    public SourceDocumentWithInclusion(IPrimarySourceDocument wrappedDocument, int originalLineNumber, string originalDocumentName, int startingPositionOfIncludedRegion) {
      Contract.Requires(wrappedDocument != null);
      Contract.Requires(0 <= startingPositionOfIncludedRegion && startingPositionOfIncludedRegion < wrappedDocument.Length);

      this.wrappedDocument = wrappedDocument;
      this.originalLineNumber = originalLineNumber;
      this.originalDocumentName = originalDocumentName;
      this.startingPositionOfIncludedRegion = startingPositionOfIncludedRegion;
    }