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

DerivedSourceLocation() public method

Allocates a range of source text that corresponds to an identifiable entity.
public DerivedSourceLocation ( IDerivedSourceDocument derivedSourceDocument, int startIndex, int length ) : System
derivedSourceDocument IDerivedSourceDocument The document containing the source text of which this location is a subrange.
startIndex int The character index of the first character of this location, when treating the source document as a single string.
length int The number of characters in this source location.
return System
    public DerivedSourceLocation(IDerivedSourceDocument derivedSourceDocument, int startIndex, int length)
      : base(startIndex, length) {
      Contract.Requires(derivedSourceDocument != null);
      //Contract.Requires(startIndex >= 0 && startIndex <= derivedSourceDocument.Length);
      //Contract.Requires(length >= 0 && length <= derivedSourceDocument.Length);
      //Contract.Requires((startIndex + length) <= derivedSourceDocument.Length);

      this.derivedSourceDocument = derivedSourceDocument;
    }