SourceFile Class
Represents a source code file that can be loaded by an IProjectAssembly.
public class SourceFile : ISourceFile, IKeyedObject
- Inheritance:
- object object
- Implements:
- ISourceFile IKeyedObject
Constructors
SourceFile(string, params ITypeDefinition[])
Initializes an instance of the class.
public SourceFile(string key, params ITypeDefinition[] typeDefs)
| Parameter | Type | Description |
|---|---|---|
| key | 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 an instance of the class.
public SourceFile(string key, IEnumerable<ITypeDefinition> typeDefs)
| Parameter | Type | Description |
|---|---|---|
| key | string | The unique key that identifies the source file, which is generally a full file path or GUID. |
| typeDefs | IEnumerable<ITypeDefinition> | The collection of ITypeDefinition objects contained in the source file. |
SourceFile(string, IEnumerable<ITypeDefinition>, IEnumerable<IUsingDirective>?)
Initializes an instance of the class.
public SourceFile(string key, IEnumerable<ITypeDefinition> typeDefs, IEnumerable<IUsingDirective>? globalUsingDirectives)
| Parameter | Type | Description |
|---|---|---|
| key | string | The unique key that identifies the source file, which is generally a full file path or GUID. |
| typeDefs | IEnumerable<ITypeDefinition> | The collection of ITypeDefinition objects contained in the source file. |
| globalUsingDirectives | IEnumerable<IUsingDirective> | The collection of global using directives. |
Properties
GlobalUsingDirectives
The collection of global IUsingDirective objects contained in the source file.
public IUsingDirectiveCollection GlobalUsingDirectives { get; }
Property Value
Key
The unique key that identifies the source file, which is generally a full file path or GUID.
TypeDefinitions
The collection of ITypeDefinition objects contained in the source file.
Methods
ToString()
Returns the string representation of this object.
Inherited Members
- object.GetType()
- object.MemberwiseClone()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()