@alloy-js/csharp 0.23.0-dev.6 → 0.23.0-dev.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dev/src/components/constructor/constructor.js +78 -9
- package/dist/dev/src/components/constructor/constructor.js.map +1 -1
- package/dist/dev/src/components/constructor/constructor.test.js +170 -4
- package/dist/dev/src/components/constructor/constructor.test.js.map +1 -1
- package/dist/dev/src/components/enum/declaration.js +14 -5
- package/dist/dev/src/components/enum/declaration.js.map +1 -1
- package/dist/dev/src/components/enum/declaration.test.js +40 -0
- package/dist/dev/src/components/enum/declaration.test.js.map +1 -1
- package/dist/dev/src/components/enum/member.js +13 -4
- package/dist/dev/src/components/enum/member.js.map +1 -1
- package/dist/dev/src/components/enum/member.test.js +42 -0
- package/dist/dev/src/components/enum/member.test.js.map +1 -1
- package/dist/src/components/constructor/constructor.d.ts +34 -0
- package/dist/src/components/constructor/constructor.d.ts.map +1 -1
- package/dist/src/components/constructor/constructor.js +41 -4
- package/dist/src/components/constructor/constructor.js.map +1 -1
- package/dist/src/components/constructor/constructor.test.js +114 -0
- package/dist/src/components/constructor/constructor.test.js.map +1 -1
- package/dist/src/components/enum/declaration.d.ts +2 -0
- package/dist/src/components/enum/declaration.d.ts.map +1 -1
- package/dist/src/components/enum/declaration.js +6 -1
- package/dist/src/components/enum/declaration.js.map +1 -1
- package/dist/src/components/enum/declaration.test.js +24 -0
- package/dist/src/components/enum/declaration.test.js.map +1 -1
- package/dist/src/components/enum/member.d.ts +4 -2
- package/dist/src/components/enum/member.d.ts.map +1 -1
- package/dist/src/components/enum/member.js +6 -1
- package/dist/src/components/enum/member.js.map +1 -1
- package/dist/src/components/enum/member.test.js +26 -0
- package/dist/src/components/enum/member.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/docs/api/components/AttributeList.md +34 -0
- package/docs/api/components/ClassDeclaration.md +104 -0
- package/docs/api/components/Constructor.md +61 -0
- package/docs/api/components/CsprojFile.md +34 -0
- package/docs/api/components/Declaration.md +32 -0
- package/docs/api/components/DocC.md +27 -0
- package/docs/api/components/DocCode.md +27 -0
- package/docs/api/components/DocComment.md +27 -0
- package/docs/api/components/DocDescription.md +27 -0
- package/docs/api/components/DocExample.md +27 -0
- package/docs/api/components/DocException.md +27 -0
- package/docs/api/components/DocFromMarkdown.md +27 -0
- package/docs/api/components/DocInclude.md +26 -0
- package/docs/api/components/DocList.md +26 -0
- package/docs/api/components/DocPara.md +27 -0
- package/docs/api/components/DocParam.md +28 -0
- package/docs/api/components/DocParamRef.md +25 -0
- package/docs/api/components/DocPermission.md +27 -0
- package/docs/api/components/DocRemarks.md +27 -0
- package/docs/api/components/DocReturns.md +27 -0
- package/docs/api/components/DocSee.md +30 -0
- package/docs/api/components/DocSeeAlso.md +29 -0
- package/docs/api/components/DocSummary.md +27 -0
- package/docs/api/components/DocTypeParam.md +28 -0
- package/docs/api/components/DocTypeParamRef.md +25 -0
- package/docs/api/components/DocValue.md +27 -0
- package/docs/api/components/DocWhen.md +27 -0
- package/docs/api/components/ElseClause.md +29 -0
- package/docs/api/components/ElseIfClause.md +30 -0
- package/docs/api/components/EnumDeclaration.md +76 -0
- package/docs/api/components/EnumMember.md +31 -0
- package/docs/api/components/Field.md +67 -0
- package/docs/api/components/IfStatement.md +30 -0
- package/docs/api/components/InterfaceDeclaration.md +82 -0
- package/docs/api/components/InterfaceMethod.md +68 -0
- package/docs/api/components/InterfaceProperty.md +78 -0
- package/docs/api/components/InvocationExpression.md +49 -0
- package/docs/api/components/LexicalScope.md +65 -0
- package/docs/api/components/Method.md +92 -0
- package/docs/api/components/MethodScope.md +65 -0
- package/docs/api/components/Name.md +19 -0
- package/docs/api/components/Namespace.md +35 -0
- package/docs/api/components/Parameter.md +58 -0
- package/docs/api/components/Parameters_2.md +27 -0
- package/docs/api/components/Property.md +110 -0
- package/docs/api/components/RecordDeclaration.md +84 -0
- package/docs/api/components/Reference.md +25 -0
- package/docs/api/components/Region.md +28 -0
- package/docs/api/components/SourceFile.md +45 -0
- package/docs/api/components/StructDeclaration.md +94 -0
- package/docs/api/components/UsingNamespaceDirective.md +25 -0
- package/docs/api/components/Usings.md +40 -0
- package/docs/api/components/VarDeclaration.md +74 -0
- package/docs/api/components/index.md +55 -0
- package/docs/api/functions/access.md +35 -0
- package/docs/api/functions/accessibilityFromProps.md +18 -0
- package/docs/api/functions/computeModifiersPrefix.md +20 -0
- package/docs/api/functions/createCSharpNamePolicy.md +17 -0
- package/docs/api/functions/createCSharpNamespaceScope.md +18 -0
- package/docs/api/functions/createClassScope.md +27 -0
- package/docs/api/functions/createFieldSymbol.md +43 -0
- package/docs/api/functions/createLibrary.md +19 -0
- package/docs/api/functions/createMethodScope.md +26 -0
- package/docs/api/functions/createMethodSymbol.md +34 -0
- package/docs/api/functions/createNamedTypeScope.md +27 -0
- package/docs/api/functions/createNamedTypeSymbol.md +35 -0
- package/docs/api/functions/createNamespaceSymbol.md +43 -0
- package/docs/api/functions/createParameterSymbol.md +45 -0
- package/docs/api/functions/createPropertySymbol.md +43 -0
- package/docs/api/functions/createTypeParameterSymbol.md +34 -0
- package/docs/api/functions/createVariableSymbol.md +43 -0
- package/docs/api/functions/getAccessModifier.md +18 -0
- package/docs/api/functions/getAsyncModifier.md +18 -0
- package/docs/api/functions/index.md +33 -0
- package/docs/api/functions/makeModifiers.md +18 -0
- package/docs/api/functions/nonAccessibilityFromProps.md +18 -0
- package/docs/api/functions/ref.md +18 -0
- package/docs/api/functions/useCSharpNamePolicy.md +17 -0
- package/docs/api/functions/useCSharpScope.md +17 -0
- package/docs/api/functions/useCsharpFormatOptions.md +18 -0
- package/docs/api/functions/useEnclosingNamespaceScope.md +17 -0
- package/docs/api/functions/useLexicalScope.md +17 -0
- package/docs/api/functions/useMethodScope.md +17 -0
- package/docs/api/functions/useNamedTypeScope.md +17 -0
- package/docs/api/functions/useNamespace.md +17 -0
- package/docs/api/functions/useSourceFileScope.md +17 -0
- package/docs/api/index.md +6 -0
- package/docs/api/types/AccessExpressionBuilder.md +11 -0
- package/docs/api/types/AccessExpressionPartProps.md +17 -0
- package/docs/api/types/AccessModifiers.md +13 -0
- package/docs/api/types/AttributeProps.md +8 -0
- package/docs/api/types/AttributesProp.md +5 -0
- package/docs/api/types/CSharpClassScope.md +9 -0
- package/docs/api/types/CSharpElements.md +5 -0
- package/docs/api/types/CSharpFormatOptions.md +5 -0
- package/docs/api/types/CSharpLexicalScope.md +10 -0
- package/docs/api/types/CSharpMethodScope.md +12 -0
- package/docs/api/types/CSharpNamedTypeScope.md +16 -0
- package/docs/api/types/CSharpNamespaceScope.md +10 -0
- package/docs/api/types/CSharpProjectSdk.md +5 -0
- package/docs/api/types/CSharpScope.md +12 -0
- package/docs/api/types/CSharpSourceFileScope.md +13 -0
- package/docs/api/types/CSharpSymbol.md +30 -0
- package/docs/api/types/CSharpSymbolKinds.md +5 -0
- package/docs/api/types/CSharpSymbolOptions.md +17 -0
- package/docs/api/types/ClassDescriptor.md +9 -0
- package/docs/api/types/ClassModifiers.md +10 -0
- package/docs/api/types/CreateMethodSymbolOptions.md +9 -0
- package/docs/api/types/CreateTypeParameterSymbolOptions.md +9 -0
- package/docs/api/types/DeclarationModifiers.md +8 -0
- package/docs/api/types/DeclaredAccessibility.md +5 -0
- package/docs/api/types/Descriptor.md +5 -0
- package/docs/api/types/DocCommentTagProps.md +7 -0
- package/docs/api/types/EnumDescriptor.md +9 -0
- package/docs/api/types/FieldDescriptor.md +9 -0
- package/docs/api/types/FieldModifiers.md +12 -0
- package/docs/api/types/GenericDescriptor.md +7 -0
- package/docs/api/types/InterfaceDescriptor.md +9 -0
- package/docs/api/types/InterfaceMethodModifiers.md +9 -0
- package/docs/api/types/InterfaceModifiers.md +7 -0
- package/docs/api/types/InterfacePropertyModifiers.md +9 -0
- package/docs/api/types/LexicalScopeProps.md +5 -0
- package/docs/api/types/LibraryFrom.md +7 -0
- package/docs/api/types/MemberDescriptor.md +16 -0
- package/docs/api/types/MethodDescriptor.md +10 -0
- package/docs/api/types/MethodKinds.md +5 -0
- package/docs/api/types/MethodModifiers.md +15 -0
- package/docs/api/types/MethodScopeProps.md +5 -0
- package/docs/api/types/MethodSymbol.md +13 -0
- package/docs/api/types/NamedTypeDescriptor.md +11 -0
- package/docs/api/types/NamedTypeSymbol.md +17 -0
- package/docs/api/types/NamedTypeSymbolKind.md +5 -0
- package/docs/api/types/NamedTypeTypeKind.md +5 -0
- package/docs/api/types/NamespaceDescriptor.md +8 -0
- package/docs/api/types/NamespaceSymbol.md +16 -0
- package/docs/api/types/NamespaceSymbolOptions.md +9 -0
- package/docs/api/types/NonAccessModifiers.md +13 -0
- package/docs/api/types/PropertyDescriptor_2.md +9 -0
- package/docs/api/types/PropertyModifiers.md +17 -0
- package/docs/api/types/RecordDescriptor.md +9 -0
- package/docs/api/types/RecordModifiers.md +7 -0
- package/docs/api/types/ResolveDescriptor.md +7 -0
- package/docs/api/types/StructDescriptor.md +9 -0
- package/docs/api/types/StructModifiers.md +10 -0
- package/docs/api/types/TypeParameterProps.md +11 -0
- package/docs/api/types/VarModifiers.md +8 -0
- package/docs/api/types/index.md +62 -0
- package/docs/api/variables/Attribute.md +21 -0
- package/docs/api/variables/index.md +3 -0
- package/package.json +5 -5
- package/src/components/constructor/constructor.test.tsx +91 -0
- package/src/components/constructor/constructor.tsx +86 -1
- package/src/components/enum/declaration.test.tsx +20 -0
- package/src/components/enum/declaration.tsx +4 -0
- package/src/components/enum/member.test.tsx +21 -0
- package/src/components/enum/member.tsx +5 -0
- package/temp/api.json +149 -5
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# DocSee
|
|
2
|
+
|
|
3
|
+
* jsx
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import { DocSee } from "@alloy-js/csharp";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
<DocSee cref="string" href="string" langword="string">
|
|
10
|
+
{children}
|
|
11
|
+
</DocSee>
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
* stc
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
import { DocSee } from "@alloy-js/csharp/stc";
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
DocSee({ cref: string, href: string, langword: string }).children(children)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Props
|
|
24
|
+
|
|
25
|
+
| | | |
|
|
26
|
+
| -------- | -------------------------------------------------- | - |
|
|
27
|
+
| children | optional [Children](../../../core/types/children/) | |
|
|
28
|
+
| cref | optional string | |
|
|
29
|
+
| href | optional string | |
|
|
30
|
+
| langword | optional string | |
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# DocSeeAlso
|
|
2
|
+
|
|
3
|
+
* jsx
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import { DocSeeAlso } from "@alloy-js/csharp";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
<DocSeeAlso cref="string" href="string">
|
|
10
|
+
{children}
|
|
11
|
+
</DocSeeAlso>
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
* stc
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
import { DocSeeAlso } from "@alloy-js/csharp/stc";
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
DocSeeAlso({ cref: string, href: string }).children(children)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Props
|
|
24
|
+
|
|
25
|
+
| | | |
|
|
26
|
+
| -------- | -------------------------------------------------- | - |
|
|
27
|
+
| children | optional [Children](../../../core/types/children/) | |
|
|
28
|
+
| cref | optional string | |
|
|
29
|
+
| href | optional string | |
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# DocSummary
|
|
2
|
+
|
|
3
|
+
* jsx
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import { DocSummary } from "@alloy-js/csharp";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
<DocSummary >
|
|
10
|
+
{children}
|
|
11
|
+
</DocSummary>
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
* stc
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
import { DocSummary } from "@alloy-js/csharp/stc";
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
DocSummary({ }).children(children)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Props
|
|
24
|
+
|
|
25
|
+
| | | |
|
|
26
|
+
| -------- | ----------------------------------------- | - |
|
|
27
|
+
| children | [Children](../../../core/types/children/) | |
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# DocTypeParam
|
|
2
|
+
|
|
3
|
+
* jsx
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import { DocTypeParam } from "@alloy-js/csharp";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
<DocTypeParam name="string">
|
|
10
|
+
{children}
|
|
11
|
+
</DocTypeParam>
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
* stc
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
import { DocTypeParam } from "@alloy-js/csharp/stc";
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
DocTypeParam({ name: string }).children(children)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Props
|
|
24
|
+
|
|
25
|
+
| | | |
|
|
26
|
+
| -------- | ----------------------------------------- | - |
|
|
27
|
+
| children | [Children](../../../core/types/children/) | |
|
|
28
|
+
| name | string | |
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# DocTypeParamRef
|
|
2
|
+
|
|
3
|
+
* jsx
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import { DocTypeParamRef } from "@alloy-js/csharp";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
<DocTypeParamRef name="string" />
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
* stc
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import { DocTypeParamRef } from "@alloy-js/csharp/stc";
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
DocTypeParamRef({ name: string }).children(children)
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Props
|
|
22
|
+
|
|
23
|
+
| | | |
|
|
24
|
+
| ---- | ------ | - |
|
|
25
|
+
| name | string | |
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# DocValue
|
|
2
|
+
|
|
3
|
+
* jsx
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import { DocValue } from "@alloy-js/csharp";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
<DocValue >
|
|
10
|
+
{children}
|
|
11
|
+
</DocValue>
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
* stc
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
import { DocValue } from "@alloy-js/csharp/stc";
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
DocValue({ }).children(children)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Props
|
|
24
|
+
|
|
25
|
+
| | | |
|
|
26
|
+
| -------- | ----------------------------------------- | - |
|
|
27
|
+
| children | [Children](../../../core/types/children/) | |
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# DocWhen
|
|
2
|
+
|
|
3
|
+
Conditionally render the given doc in a component and tail with a line
|
|
4
|
+
|
|
5
|
+
* jsx
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { DocWhen } from "@alloy-js/csharp";
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
<DocWhen doc={Children | undefined} />
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
* stc
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
import { DocWhen } from "@alloy-js/csharp/stc";
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
DocWhen({ doc: Children | undefined }).children(children)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Props
|
|
24
|
+
|
|
25
|
+
| | | |
|
|
26
|
+
| --- | ------------------------------------------------------ | - |
|
|
27
|
+
| doc | [Children](../../../core/types/children/) \| undefined | |
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# ElseClause
|
|
2
|
+
|
|
3
|
+
The else clause of an if statement.
|
|
4
|
+
|
|
5
|
+
* jsx
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { ElseClause } from "@alloy-js/csharp";
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
<ElseClause >
|
|
12
|
+
{children}
|
|
13
|
+
</ElseClause>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
* stc
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
import { ElseClause } from "@alloy-js/csharp/stc";
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
ElseClause({ }).children(children)
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Props
|
|
26
|
+
|
|
27
|
+
| | | |
|
|
28
|
+
| -------- | ----------------------------------------- | - |
|
|
29
|
+
| children | [Children](../../../core/types/children/) | |
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# ElseIfClause
|
|
2
|
+
|
|
3
|
+
An else clause with an if statement.
|
|
4
|
+
|
|
5
|
+
* jsx
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { ElseIfClause } from "@alloy-js/csharp";
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
<ElseIfClause condition={Children}>
|
|
12
|
+
{children}
|
|
13
|
+
</ElseIfClause>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
* stc
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
import { ElseIfClause } from "@alloy-js/csharp/stc";
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
ElseIfClause({ condition: Children }).children(children)
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Props
|
|
26
|
+
|
|
27
|
+
| | | |
|
|
28
|
+
| --------- | ----------------------------------------- | - |
|
|
29
|
+
| children | [Children](../../../core/types/children/) | |
|
|
30
|
+
| condition | [Children](../../../core/types/children/) | |
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# EnumDeclaration
|
|
2
|
+
|
|
3
|
+
A C# enum declaration
|
|
4
|
+
|
|
5
|
+
* jsx
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { EnumDeclaration } from "@alloy-js/csharp";
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
<EnumDeclaration
|
|
12
|
+
doc={Children}
|
|
13
|
+
file
|
|
14
|
+
internal
|
|
15
|
+
name={string | Namekey}
|
|
16
|
+
private
|
|
17
|
+
protected
|
|
18
|
+
public
|
|
19
|
+
refkey={Refkey | Refkey[]}
|
|
20
|
+
>
|
|
21
|
+
{children}
|
|
22
|
+
</EnumDeclaration>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
* stc
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import { EnumDeclaration } from "@alloy-js/csharp/stc";
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
EnumDeclaration({
|
|
32
|
+
doc: Children,
|
|
33
|
+
file: boolean,
|
|
34
|
+
internal: boolean,
|
|
35
|
+
name: string | Namekey,
|
|
36
|
+
private: boolean,
|
|
37
|
+
protected: boolean,
|
|
38
|
+
public: boolean,
|
|
39
|
+
refkey: Refkey | Refkey[],
|
|
40
|
+
}).children(children)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Props
|
|
44
|
+
|
|
45
|
+
| | | |
|
|
46
|
+
| --------- | ------------------------------------------------------------------------------------------ | ----------- |
|
|
47
|
+
| children | optional [Children](../../../core/types/children/) | |
|
|
48
|
+
| doc | optional [Children](../../../core/types/children/) | Doc comment |
|
|
49
|
+
| file | optional boolean | |
|
|
50
|
+
| internal | optional boolean | |
|
|
51
|
+
| name | string \| [Namekey](../../../core/types/namekey/) | |
|
|
52
|
+
| private | optional boolean | |
|
|
53
|
+
| protected | optional boolean | |
|
|
54
|
+
| public | optional boolean | |
|
|
55
|
+
| refkey | optional [Refkey](../../../core/types/refkey/) \| [Refkey](../../../core/types/refkey/)\[] | |
|
|
56
|
+
|
|
57
|
+
## Example
|
|
58
|
+
|
|
59
|
+
```tsx
|
|
60
|
+
<EnumDeclaration public name="Color">
|
|
61
|
+
<EnumMember name="Red" />
|
|
62
|
+
<EnumMember name="Green" />
|
|
63
|
+
<EnumMember name="Blue" />
|
|
64
|
+
</EnumDeclaration>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
This will produce:
|
|
68
|
+
|
|
69
|
+
```csharp
|
|
70
|
+
public enum Color
|
|
71
|
+
{
|
|
72
|
+
Red,
|
|
73
|
+
Green,
|
|
74
|
+
Blue
|
|
75
|
+
}
|
|
76
|
+
```
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# EnumMember
|
|
2
|
+
|
|
3
|
+
* jsx
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import { EnumMember } from "@alloy-js/csharp";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
<EnumMember doc={Children} name={string | Namekey} refkey={Refkey} />
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
* stc
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import { EnumMember } from "@alloy-js/csharp/stc";
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
EnumMember({
|
|
19
|
+
doc: Children,
|
|
20
|
+
name: string | Namekey,
|
|
21
|
+
refkey: Refkey,
|
|
22
|
+
}).children(children)
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Props
|
|
26
|
+
|
|
27
|
+
| | | |
|
|
28
|
+
| ------ | -------------------------------------------------- | ----------- |
|
|
29
|
+
| doc | optional [Children](../../../core/types/children/) | Doc comment |
|
|
30
|
+
| name | string \| [Namekey](../../../core/types/namekey/) | |
|
|
31
|
+
| refkey | optional [Refkey](../../../core/types/refkey/) | |
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Field
|
|
2
|
+
|
|
3
|
+
Render a c# field
|
|
4
|
+
|
|
5
|
+
* jsx
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { Field } from "@alloy-js/csharp";
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
<Field
|
|
12
|
+
doc={Children}
|
|
13
|
+
file
|
|
14
|
+
internal
|
|
15
|
+
name={string | Namekey}
|
|
16
|
+
new
|
|
17
|
+
private
|
|
18
|
+
protected
|
|
19
|
+
public
|
|
20
|
+
readonly
|
|
21
|
+
refkey={Refkey}
|
|
22
|
+
static
|
|
23
|
+
type={Children}
|
|
24
|
+
volatile
|
|
25
|
+
/>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
* stc
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
import { Field } from "@alloy-js/csharp/stc";
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
Field({
|
|
35
|
+
doc: Children,
|
|
36
|
+
file: boolean,
|
|
37
|
+
internal: boolean,
|
|
38
|
+
name: string | Namekey,
|
|
39
|
+
new: boolean,
|
|
40
|
+
private: boolean,
|
|
41
|
+
protected: boolean,
|
|
42
|
+
public: boolean,
|
|
43
|
+
readonly: boolean,
|
|
44
|
+
refkey: Refkey,
|
|
45
|
+
static: boolean,
|
|
46
|
+
type: Children,
|
|
47
|
+
volatile: boolean,
|
|
48
|
+
}).children(children)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Props
|
|
52
|
+
|
|
53
|
+
| | | |
|
|
54
|
+
| --------- | -------------------------------------------------- | ----------- |
|
|
55
|
+
| doc | optional [Children](../../../core/types/children/) | Doc comment |
|
|
56
|
+
| file | optional boolean | |
|
|
57
|
+
| internal | optional boolean | |
|
|
58
|
+
| name | string \| [Namekey](../../../core/types/namekey/) | |
|
|
59
|
+
| new | optional boolean | |
|
|
60
|
+
| private | optional boolean | |
|
|
61
|
+
| protected | optional boolean | |
|
|
62
|
+
| public | optional boolean | |
|
|
63
|
+
| readonly | optional boolean | |
|
|
64
|
+
| refkey | optional [Refkey](../../../core/types/refkey/) | |
|
|
65
|
+
| static | optional boolean | |
|
|
66
|
+
| type | [Children](../../../core/types/children/) | |
|
|
67
|
+
| volatile | optional boolean | |
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# IfStatement
|
|
2
|
+
|
|
3
|
+
An if statement.
|
|
4
|
+
|
|
5
|
+
* jsx
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { IfStatement } from "@alloy-js/csharp";
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
<IfStatement condition={Children}>
|
|
12
|
+
{children}
|
|
13
|
+
</IfStatement>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
* stc
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
import { IfStatement } from "@alloy-js/csharp/stc";
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
IfStatement({ condition: Children }).children(children)
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Props
|
|
26
|
+
|
|
27
|
+
| | | |
|
|
28
|
+
| --------- | ----------------------------------------- | - |
|
|
29
|
+
| children | [Children](../../../core/types/children/) | |
|
|
30
|
+
| condition | [Children](../../../core/types/children/) | |
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# InterfaceDeclaration
|
|
2
|
+
|
|
3
|
+
CSharp interface declaration.
|
|
4
|
+
|
|
5
|
+
* jsx
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { InterfaceDeclaration } from "@alloy-js/csharp";
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
<InterfaceDeclaration
|
|
12
|
+
attributes={AttributesProp}
|
|
13
|
+
doc={core.Children}
|
|
14
|
+
file
|
|
15
|
+
internal
|
|
16
|
+
name={string | core.Namekey}
|
|
17
|
+
partial
|
|
18
|
+
private
|
|
19
|
+
protected
|
|
20
|
+
public
|
|
21
|
+
refkey={core.Refkey}
|
|
22
|
+
typeParameters={(TypeParameterProps | string)[]}
|
|
23
|
+
/>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
* stc
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
import { InterfaceDeclaration } from "@alloy-js/csharp/stc";
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
InterfaceDeclaration({
|
|
33
|
+
attributes: AttributesProp,
|
|
34
|
+
doc: core.Children,
|
|
35
|
+
file: boolean,
|
|
36
|
+
internal: boolean,
|
|
37
|
+
name: string | core.Namekey,
|
|
38
|
+
partial: boolean,
|
|
39
|
+
private: boolean,
|
|
40
|
+
protected: boolean,
|
|
41
|
+
public: boolean,
|
|
42
|
+
refkey: core.Refkey,
|
|
43
|
+
typeParameters: (TypeParameterProps | string)[],
|
|
44
|
+
}).children(children)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Props
|
|
48
|
+
|
|
49
|
+
| | | |
|
|
50
|
+
| -------------- | ----------------------------------------------------------------------------- | --------------------------------- |
|
|
51
|
+
| attributes | optional [AttributesProp](../../types/attributesprop/) | Define attributes to attach |
|
|
52
|
+
| doc | optional [Children](../../../core/types/children/) | Doc comment |
|
|
53
|
+
| file | optional boolean | |
|
|
54
|
+
| internal | optional boolean | |
|
|
55
|
+
| name | string \| [Namekey](../../../core/types/namekey/) | |
|
|
56
|
+
| partial | optional boolean | |
|
|
57
|
+
| private | optional boolean | |
|
|
58
|
+
| protected | optional boolean | |
|
|
59
|
+
| public | optional boolean | |
|
|
60
|
+
| refkey | optional [Refkey](../../../core/types/refkey/) | |
|
|
61
|
+
| typeParameters | optional ([TypeParameterProps](../../types/typeparameterprops/) \| string)\[] | Type parameters for the interface |
|
|
62
|
+
|
|
63
|
+
## Example
|
|
64
|
+
|
|
65
|
+
```tsx
|
|
66
|
+
<InterfaceDeclaration public name="IMyInterface">
|
|
67
|
+
<InterfaceMember public name="MyProperty" type="int" />
|
|
68
|
+
<InterfaceMethod public name="MyMethod" returnType="void">
|
|
69
|
+
<Parameter name="value" type="int" />
|
|
70
|
+
</InterfaceMethod>
|
|
71
|
+
</InterfaceDeclaration>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
This will produce:
|
|
75
|
+
|
|
76
|
+
```csharp
|
|
77
|
+
public interface MyIface
|
|
78
|
+
{
|
|
79
|
+
public int MyProperty { get; set; }
|
|
80
|
+
public void MyMethod(int value);
|
|
81
|
+
}
|
|
82
|
+
```
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# InterfaceMethod
|
|
2
|
+
|
|
3
|
+
* jsx
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import { InterfaceMethod } from "@alloy-js/csharp";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
<InterfaceMethod
|
|
10
|
+
attributes={AttributesProp}
|
|
11
|
+
doc={Children}
|
|
12
|
+
file
|
|
13
|
+
internal
|
|
14
|
+
name={string | Namekey}
|
|
15
|
+
new
|
|
16
|
+
parameters={Array<ParameterProps>}
|
|
17
|
+
private
|
|
18
|
+
protected
|
|
19
|
+
public
|
|
20
|
+
refkey={Refkey}
|
|
21
|
+
returns={Children}
|
|
22
|
+
typeParameters={(TypeParameterProps | string)[]}
|
|
23
|
+
>
|
|
24
|
+
{children}
|
|
25
|
+
</InterfaceMethod>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
* stc
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
import { InterfaceMethod } from "@alloy-js/csharp/stc";
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
InterfaceMethod({
|
|
35
|
+
attributes: AttributesProp,
|
|
36
|
+
doc: Children,
|
|
37
|
+
file: boolean,
|
|
38
|
+
internal: boolean,
|
|
39
|
+
name: string | Namekey,
|
|
40
|
+
new: boolean,
|
|
41
|
+
parameters: Array<ParameterProps>,
|
|
42
|
+
private: boolean,
|
|
43
|
+
protected: boolean,
|
|
44
|
+
public: boolean,
|
|
45
|
+
refkey: Refkey,
|
|
46
|
+
returns: Children,
|
|
47
|
+
typeParameters: (TypeParameterProps | string)[],
|
|
48
|
+
}).children(children)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Props
|
|
52
|
+
|
|
53
|
+
| | | |
|
|
54
|
+
| -------------- | ----------------------------------------------------------------------------- | ------------------------------ |
|
|
55
|
+
| attributes | optional [AttributesProp](../../types/attributesprop/) | Define attributes to attach |
|
|
56
|
+
| children | optional [Children](../../../core/types/children/) | |
|
|
57
|
+
| doc | optional [Children](../../../core/types/children/) | Doc comment |
|
|
58
|
+
| file | optional boolean | |
|
|
59
|
+
| internal | optional boolean | |
|
|
60
|
+
| name | string \| [Namekey](../../../core/types/namekey/) | |
|
|
61
|
+
| new | optional boolean | |
|
|
62
|
+
| parameters | optional Array<[ParameterProps](../parameter/)> | |
|
|
63
|
+
| private | optional boolean | |
|
|
64
|
+
| protected | optional boolean | |
|
|
65
|
+
| public | optional boolean | |
|
|
66
|
+
| refkey | optional [Refkey](../../../core/types/refkey/) | |
|
|
67
|
+
| returns | optional [Children](../../../core/types/children/) | |
|
|
68
|
+
| typeParameters | optional ([TypeParameterProps](../../types/typeparameterprops/) \| string)\[] | Type parameters for the method |
|