SourceInfoAttribute Class

Summary

A clever trick to get source info for declarations during reflection. From http://stackoverflow.com/a/17998371/807064.
Assembly
Wyam.Common.dll
Namespace
Wyam.Common.Util
Base Types
  • Attribute
graph BT Type-->Base0["Attribute"] Type["SourceInfoAttribute"] class Type type-node

Syntax

[AttributeUsage(AttributeTargets.All, Inherited = false)]
public sealed class SourceInfoAttribute : Attribute

Attributes

Type Description
AttributeUsageAttribute

Constructors

Name Summary
SourceInfoAttribute(string, int) Creates an instance of the attribute.

Properties

Name Value Summary
FilePath string
The file path of the source file.
LineNumber int
The line number of the attribute in the source file.
GitHub