The ContentAttribute type exposes the following members.

Constructors

  NameDescription
ContentAttribute
Default constructor.

Methods

  NameDescription
Consume
Consumes a code element and applies its contributions to the scope provided by a containing pattern.
(Inherited from PatternAttribute.)
Equals
Returns a value that indicates whether this instance is equal to a specified object.
(Inherited from Attribute.)
Finalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
GetDataLocationName
Gets the name of the location that is providing the data, or null if none.
GetHashCode
Returns the hash code for this instance.
(Inherited from Attribute.)
GetTestParts
Gets the test parts represented by a code element.
(Inherited from PatternAttribute.)
GetType
Gets the Type of the current instance.
(Inherited from Object.)
IsDefaultAttribute
When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class.
(Inherited from Attribute.)
Match
When overridden in a derived class, returns a value that indicates whether this instance equals a specified object.
(Inherited from Attribute.)
MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
OpenStream
Opens the contents as a stream.
OpenTextReader
Opens the contents as a text reader.
PopulateDataSource
Populates the data source with the contributions of this attribute.
(Inherited from DataPatternAttribute.)
Process
Processes a code element and applies its contributions to the scope of this pattern. The scope will typically have been introduced by the Consume(IPatternScope, ICodeElementInfo, Boolean) method of a primary pattern applied to this code element.
(Inherited from DataPatternAttribute.)
ThrowUsageErrorExceptionOverloaded.
ToString
Returns a String that represents the current Object.
(Inherited from Object.)
Validate
Verifies that the attribute is being used correctly.
(Overrides DataPatternAttribute..::.Validate(IPatternScope, ICodeElementInfo).)
ValidateSource
Validates the data source properties of the content attribute.

Extension Methods

  NameDescription
FormatOverloaded.

Properties

  NameDescription
Contents
Gets or sets the inline data contents as a string.
FilePath
Gets or sets the path of a local file relative to the current working directory from which the file contents should be read.
IsDynamic
Returns true if the contents are dynamic, or false if they are static.
IsPrimary
Returns true if this is a primary pattern.
(Inherited from PatternAttribute.)
Order
Gets or sets the order in which the decorator should be applied.
(Inherited from DecoratorPatternAttribute.)
OutcomeOnFileError
Gets or sets the outcome of the test when an error occured while opening or reading the data file or the resource.
ResourcePath
Gets or sets the path of a manifest resource from which the contents should be read.
ResourceScope
Gets or sets a Type that is used to locate the assembly and namespace within which to resolve a manifest resource in combination with the ResourcePath property.
SourceName
Gets or sets the name of the data source to create so that the values produced by this attribute can be referred to elsewhere.
(Inherited from DataPatternAttribute.)
TypeId
When implemented in a derived class, gets a unique identifier for this Attribute.
(Inherited from Attribute.)

See Also