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>
childrenoptional ChildrenSource file content
headeroptional Children
headerCommentoptional string
pathstringPath of the source file
usingoptional string[]A list of using directives to explicitly include. Note that providing explicit usings is not necessary when referencing symbols via refkeys.