65 references to AtsConstants
Aspire.Hosting (39)
Ats\AtsCapabilityInfo.cs (1)
193
/// Use <see cref="
AtsConstants
.Void"/> TypeId for void return types.
Ats\AtsCapabilityScanner.cs (37)
85
var typeId =
AtsConstants
.EnumTypeId(fullName);
442
if (typeId.StartsWith(
AtsConstants
.EnumPrefix, StringComparison.Ordinal))
444
var fullName = typeId[
AtsConstants
.EnumPrefix.Length..];
977
: new AtsTypeRef { TypeId =
AtsConstants
.Any, Category = AtsTypeCategory.Primitive };
981
TypeId =
AtsConstants
.DictTypeId(keyTypeRef.TypeId, valueTypeRef.TypeId),
1004
propertyTypeRef = new AtsTypeRef { TypeId =
AtsConstants
.Any, Category = AtsTypeCategory.Primitive };
1483
returnTypeRef = new AtsTypeRef { TypeId =
AtsConstants
.Void, Category = AtsTypeCategory.Primitive };
1487
returnTypeRef = new AtsTypeRef { TypeId =
AtsConstants
.Void, Category = AtsTypeCategory.Primitive };
1495
?? new AtsTypeRef { TypeId =
AtsConstants
.Void, Category = AtsTypeCategory.Primitive }
1496
: new AtsTypeRef { TypeId =
AtsConstants
.Void, Category = AtsTypeCategory.Primitive };
1501
?? new AtsTypeRef { TypeId =
AtsConstants
.Void, Category = AtsTypeCategory.Primitive };
1527
var voidTypeRef = new AtsTypeRef { TypeId =
AtsConstants
.Void, Category = AtsTypeCategory.Primitive };
1627
if (
AtsConstants
.IsPrimitiveType(type))
1635
return
AtsConstants
.Any;
1641
return
AtsConstants
.EnumTypeId(type.FullName ?? type.Name);
1663
return
AtsConstants
.DictTypeId(keyTypeName, valueTypeName);
1679
return
AtsConstants
.ListTypeId(elementTypeName);
1750
return
AtsConstants
.String;
1754
return
AtsConstants
.Char;
1758
return
AtsConstants
.Boolean;
1767
return
AtsConstants
.Number;
1773
return
AtsConstants
.DateTime;
1777
return
AtsConstants
.DateTimeOffset;
1781
return
AtsConstants
.DateOnly;
1785
return
AtsConstants
.TimeOnly;
1789
return
AtsConstants
.TimeSpan;
1795
return
AtsConstants
.Guid;
1799
return
AtsConstants
.Uri;
1803
return
AtsConstants
.CancellationToken;
1828
TypeId =
AtsConstants
.Void,
1884
return new AtsTypeRef { TypeId =
AtsConstants
.Any, ClrType = type, Category = AtsTypeCategory.Primitive };
1895
TypeId =
AtsConstants
.EnumTypeId(type.FullName ?? type.Name),
1918
TypeId =
AtsConstants
.DictTypeId(keyTypeRef.TypeId, valueTypeRef.TypeId),
1941
TypeId =
AtsConstants
.DictTypeId(keyTypeRef.TypeId, valueTypeRef.TypeId),
1963
TypeId =
AtsConstants
.ListTypeId(elementTypeRef.TypeId),
1983
TypeId =
AtsConstants
.ArrayTypeId(elementTypeRef.TypeId),
2042
TypeId =
AtsConstants
.ArrayTypeId(elementTypeRef.TypeId),
Ats\AtsContext.cs (1)
102
if (
AtsConstants
.IsPrimitiveType(type))
Aspire.Hosting.CodeGeneration.TypeScript (21)
AtsTypeScriptCodeGenerator.cs (21)
166
AtsConstants
.String or
AtsConstants
.Char => "string",
167
AtsConstants
.Number => "number",
168
AtsConstants
.Boolean => "boolean",
169
AtsConstants
.Void => "void",
170
AtsConstants
.Any => "any",
171
AtsConstants
.DateTime or
AtsConstants
.DateTimeOffset or
172
AtsConstants
.DateOnly or
AtsConstants
.TimeOnly => "string",
173
AtsConstants
.TimeSpan => "number",
174
AtsConstants
.Guid or
AtsConstants
.Uri => "string",
175
AtsConstants
.CancellationToken => "AbortSignal",
439
_wrapperClassNames[
AtsConstants
.ReferenceExpressionTypeId] = "ReferenceExpression";
1161
var returnType = callbackReturnType == null || callbackReturnType.TypeId ==
AtsConstants
.Void
1219
return param.Type?.TypeId ==
AtsConstants
.CancellationToken;
1250
&& callbackParam.CallbackReturnType.TypeId !=
AtsConstants
.Void;
1316
var builderHandle = GetHandleTypeName(
AtsConstants
.BuilderTypeId);
1947
var isVoid = capability.ReturnType == null || capability.ReturnType.TypeId ==
AtsConstants
.Void;
2144
var isVoid = capability.ReturnType == null || capability.ReturnType.TypeId ==
AtsConstants
.Void;
Aspire.Hosting.CodeGeneration.TypeScript.Tests (4)
AtsTypeScriptCodeGeneratorTests.cs (4)
1013
Assert.Equal(
AtsConstants
.CancellationToken, ctParam.Type.TypeId);
1046
Assert.Equal(
AtsConstants
.CancellationToken, operationParam.CallbackParameters[0].Type?.TypeId);
1065
Assert.Equal(
AtsConstants
.TimeSpan, timeoutParam.Type?.TypeId);
1069
Assert.Equal(
AtsConstants
.CancellationToken, ctParam.Type?.TypeId);
Aspire.Hosting.RemoteHost (1)
Ats\AtsMarshaller.cs (1)
128
if (typeRef.TypeId == Hosting.Ats.
AtsConstants
.Any)