In This Article

SourceFile Class

Represents a source code file that can be loaded by an IProjectAssembly.

public class SourceFile : ISourceFile, IKeyedObject
Inheritance:
System.Object Object
Implements:
ISourceFile IKeyedObject

Constructors

SourceFile(String, ITypeDefinition[])

Initializes a new instance of the SourceFile class.

public SourceFile(string key, params ITypeDefinition[] typeDefs)
Parameter Type Description
key System.String

The unique key that identifies the source file, which is generally a full file path or GUID.

typeDefs ITypeDefinition[]

The collection of ITypeDefinition objects contained in the source file.

SourceFile(String, IEnumerable<ITypeDefinition>)

Initializes a new instance of the SourceFile class.

public SourceFile(string key, IEnumerable<ITypeDefinition> typeDefs)
Parameter Type Description
key System.String

The unique key that identifies the source file, which is generally a full file path or GUID.

typeDefs System.Collections.Generic.IEnumerable<ITypeDefinition>

The collection of ITypeDefinition objects contained in the source file.

Properties

Key

Gets the unique key that identifies the source file, which is generally a full file path or GUID.

public string Key { get; }

Property Value

System.String:

The unique key that identifies the source file, which is generally a full file path or GUID.

TypeDefinitions

Gets the collection of ITypeDefinition objects contained in the source file.

public ITypeDefinitionCollection TypeDefinitions { get; }

Property Value

ITypeDefinitionCollection:

The collection of ITypeDefinition objects contained in the source file.

Methods

ToString()

Returns a String that represents the current Object.

public override string ToString()

Returns

System.String:

A String that represents the current Object.

Inherited Members

  • System.Object.Equals(System.Object)
  • System.Object.Equals(System.Object, System.Object)
  • System.Object.ReferenceEquals(System.Object, System.Object)
  • System.Object.GetHashCode()
  • System.Object.GetType()
  • System.Object.MemberwiseClone()