Skip to content

SourceFile

A C# source file exists within the context of a namespace contains using statements and declarations

Props for SourceFile component

import { SourceFile } from "@alloy-js/csharp";
<SourceFile
header={Children}
headerComment="string"
path="string"
using={string[]}
>
{children}
</SourceFile>
childrenoptionalChildren

Source file content

headeroptionalChildren
headerCommentoptionalstring
pathstring

Path of the source file

usingoptionalstring[]

A list of using directives to explicitly include. Note that providing explicit usings is not necessary when referencing symbols via refkeys.