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 path="string" using={string[]}>
{children}
</SourceFile>
childrenoptionalChildren

Source file content

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.