161 references to AtsConstants
Aspire.Hosting (37)
Ats\AtsCapabilityInfo.cs (1)
204
/// Use <see cref="
AtsConstants
.Void"/> TypeId for void return types.
Ats\AtsCapabilityScanner.cs (35)
85
var typeId =
AtsConstants
.EnumTypeId(fullName);
988
: new AtsTypeRef { TypeId =
AtsConstants
.Any, Category = AtsTypeCategory.Primitive };
992
TypeId =
AtsConstants
.DictTypeId(keyTypeRef.TypeId, valueTypeRef.TypeId),
1015
propertyTypeRef = new AtsTypeRef { TypeId =
AtsConstants
.Any, Category = AtsTypeCategory.Primitive };
1501
returnTypeRef = new AtsTypeRef { TypeId =
AtsConstants
.Void, Category = AtsTypeCategory.Primitive };
1505
returnTypeRef = new AtsTypeRef { TypeId =
AtsConstants
.Void, Category = AtsTypeCategory.Primitive };
1513
?? new AtsTypeRef { TypeId =
AtsConstants
.Void, Category = AtsTypeCategory.Primitive }
1514
: new AtsTypeRef { TypeId =
AtsConstants
.Void, Category = AtsTypeCategory.Primitive };
1519
?? new AtsTypeRef { TypeId =
AtsConstants
.Void, Category = AtsTypeCategory.Primitive };
1545
var voidTypeRef = new AtsTypeRef { TypeId =
AtsConstants
.Void, Category = AtsTypeCategory.Primitive };
1661
if (
AtsConstants
.IsPrimitiveType(type))
1669
return
AtsConstants
.Any;
1675
return
AtsConstants
.EnumTypeId(type.FullName ?? type.Name);
1697
return
AtsConstants
.DictTypeId(keyTypeName, valueTypeName);
1713
return
AtsConstants
.ListTypeId(elementTypeName);
1784
return
AtsConstants
.String;
1788
return
AtsConstants
.Char;
1792
return
AtsConstants
.Boolean;
1801
return
AtsConstants
.Number;
1807
return
AtsConstants
.DateTime;
1811
return
AtsConstants
.DateTimeOffset;
1815
return
AtsConstants
.DateOnly;
1819
return
AtsConstants
.TimeOnly;
1823
return
AtsConstants
.TimeSpan;
1829
return
AtsConstants
.Guid;
1833
return
AtsConstants
.Uri;
1837
return
AtsConstants
.CancellationToken;
1862
TypeId =
AtsConstants
.Void,
1935
return new AtsTypeRef { TypeId =
AtsConstants
.Any, ClrType = type, Category = AtsTypeCategory.Primitive };
1946
TypeId =
AtsConstants
.EnumTypeId(type.FullName ?? type.Name),
1969
TypeId =
AtsConstants
.DictTypeId(keyTypeRef.TypeId, valueTypeRef.TypeId),
1992
TypeId =
AtsConstants
.DictTypeId(keyTypeRef.TypeId, valueTypeRef.TypeId),
2014
TypeId =
AtsConstants
.ListTypeId(elementTypeRef.TypeId),
2034
TypeId =
AtsConstants
.ArrayTypeId(elementTypeRef.TypeId),
2093
TypeId =
AtsConstants
.ArrayTypeId(elementTypeRef.TypeId),
Ats\AtsContext.cs (1)
102
if (
AtsConstants
.IsPrimitiveType(type))
Aspire.Hosting.CodeGeneration.Go (21)
AtsGoCodeGenerator.cs (21)
158
if (dto.TypeId ==
AtsConstants
.ReferenceExpressionTypeId)
296
var hasReturn = capability.ReturnType.TypeId !=
AtsConstants
.Void;
481
var builderStructName = _structNames.TryGetValue(
AtsConstants
.BuilderTypeId, out var name)
538
if (handleType.AtsTypeId ==
AtsConstants
.ReferenceExpressionTypeId)
655
if (typeRef.TypeId ==
AtsConstants
.ReferenceExpressionTypeId)
694
AtsConstants
.String or
AtsConstants
.Char => "string",
695
AtsConstants
.Number => "float64",
696
AtsConstants
.Boolean => "bool",
697
AtsConstants
.Void => "",
698
AtsConstants
.Any => "any",
699
AtsConstants
.DateTime or
AtsConstants
.DateTimeOffset or
700
AtsConstants
.DateOnly or
AtsConstants
.TimeOnly => "string",
701
AtsConstants
.TimeSpan => "float64",
702
AtsConstants
.Guid or
AtsConstants
.Uri => "string",
703
AtsConstants
.CancellationToken => "*CancellationToken",
708
parameter.Type?.TypeId ==
AtsConstants
.CancellationToken;
718
if (typeRef.TypeId ==
AtsConstants
.ReferenceExpressionTypeId)
Aspire.Hosting.CodeGeneration.Java (21)
AtsJavaCodeGenerator.cs (21)
177
if (dto.TypeId ==
AtsConstants
.ReferenceExpressionTypeId)
276
var hasReturn = capability.ReturnType.TypeId !=
AtsConstants
.Void;
454
var builderClassName = _classNames.TryGetValue(
AtsConstants
.BuilderTypeId, out var name)
505
if (handleType.AtsTypeId ==
AtsConstants
.ReferenceExpressionTypeId)
620
if (typeRef.TypeId ==
AtsConstants
.ReferenceExpressionTypeId)
658
AtsConstants
.String or
AtsConstants
.Char => "String",
659
AtsConstants
.Number => isOptional ? "Double" : "double",
660
AtsConstants
.Boolean => isOptional ? "Boolean" : "boolean",
661
AtsConstants
.Void => "void",
662
AtsConstants
.Any => "Object",
663
AtsConstants
.DateTime or
AtsConstants
.DateTimeOffset or
664
AtsConstants
.DateOnly or
AtsConstants
.TimeOnly => "String",
665
AtsConstants
.TimeSpan => isOptional ? "Double" : "double",
666
AtsConstants
.Guid or
AtsConstants
.Uri => "String",
667
AtsConstants
.CancellationToken => "CancellationToken",
672
parameter.Type?.TypeId ==
AtsConstants
.CancellationToken;
682
if (typeRef.TypeId ==
AtsConstants
.ReferenceExpressionTypeId)
Aspire.Hosting.CodeGeneration.Python (18)
AtsPythonCodeGenerator.cs (18)
290
if (capability.ReturnType.TypeId ==
AtsConstants
.Void)
374
var builderClassName = _classNames.TryGetValue(
AtsConstants
.BuilderTypeId, out var name)
574
if (typeRef.TypeId ==
AtsConstants
.ReferenceExpressionTypeId)
621
AtsConstants
.String or
AtsConstants
.Char => "str",
622
AtsConstants
.Number => "float",
623
AtsConstants
.Boolean => "bool",
624
AtsConstants
.Void => "None",
625
AtsConstants
.Any => "Any",
626
AtsConstants
.DateTime or
AtsConstants
.DateTimeOffset or
627
AtsConstants
.DateOnly or
AtsConstants
.TimeOnly => "str",
628
AtsConstants
.TimeSpan => "float",
629
AtsConstants
.Guid or
AtsConstants
.Uri => "str",
630
AtsConstants
.CancellationToken => "CancellationToken",
649
parameter.Type?.TypeId ==
AtsConstants
.CancellationToken;
Aspire.Hosting.CodeGeneration.Rust (38)
AtsRustCodeGenerator.cs (38)
197
if (dto.TypeId ==
AtsConstants
.ReferenceExpressionTypeId)
322
var hasReturn = capability.ReturnType.TypeId !=
AtsConstants
.Void;
425
else if (returnTypeRef?.TypeId ==
AtsConstants
.CancellationToken)
522
var builderStructName = _structNames.TryGetValue(
AtsConstants
.BuilderTypeId, out var name)
572
if (handleType.AtsTypeId ==
AtsConstants
.ReferenceExpressionTypeId)
686
if (typeRef.TypeId ==
AtsConstants
.ReferenceExpressionTypeId)
724
if (typeRef.TypeId ==
AtsConstants
.ReferenceExpressionTypeId)
759
AtsConstants
.String or
AtsConstants
.Char => "String",
760
AtsConstants
.Number => "f64",
761
AtsConstants
.Boolean => "bool",
762
AtsConstants
.Void => "()",
763
AtsConstants
.Any => "Value",
764
AtsConstants
.DateTime or
AtsConstants
.DateTimeOffset or
765
AtsConstants
.DateOnly or
AtsConstants
.TimeOnly => "String",
766
AtsConstants
.TimeSpan => "f64",
767
AtsConstants
.Guid or
AtsConstants
.Uri => "String",
768
AtsConstants
.CancellationToken => "CancellationToken",
785
AtsConstants
.String or
AtsConstants
.Char => "&str",
786
AtsConstants
.Number => "f64",
787
AtsConstants
.Boolean => "bool",
788
AtsConstants
.Void => "()",
789
AtsConstants
.Any => "&Value",
790
AtsConstants
.DateTime or
AtsConstants
.DateTimeOffset or
791
AtsConstants
.DateOnly or
AtsConstants
.TimeOnly => "&str",
792
AtsConstants
.TimeSpan => "f64",
793
AtsConstants
.Guid or
AtsConstants
.Uri => "&str",
794
AtsConstants
.CancellationToken => "&CancellationToken",
807
&& typeRef.TypeId !=
AtsConstants
.ReferenceExpressionTypeId;
810
parameter.Type?.TypeId ==
AtsConstants
.CancellationToken;
820
if (typeRef.TypeId ==
AtsConstants
.ReferenceExpressionTypeId)
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";
1162
var returnType = callbackReturnType == null || callbackReturnType.TypeId ==
AtsConstants
.Void
1220
return param.Type?.TypeId ==
AtsConstants
.CancellationToken;
1251
&& callbackParam.CallbackReturnType.TypeId !=
AtsConstants
.Void;
1317
var builderHandle = GetHandleTypeName(
AtsConstants
.BuilderTypeId);
2003
var isVoid = capability.ReturnType == null || capability.ReturnType.TypeId ==
AtsConstants
.Void;
2200
var isVoid = capability.ReturnType == null || capability.ReturnType.TypeId ==
AtsConstants
.Void;
Aspire.Hosting.CodeGeneration.TypeScript.Tests (4)
AtsTypeScriptCodeGeneratorTests.cs (4)
1018
Assert.Equal(
AtsConstants
.CancellationToken, ctParam.Type.TypeId);
1051
Assert.Equal(
AtsConstants
.CancellationToken, operationParam.CallbackParameters[0].Type?.TypeId);
1070
Assert.Equal(
AtsConstants
.TimeSpan, timeoutParam.Type?.TypeId);
1074
Assert.Equal(
AtsConstants
.CancellationToken, ctParam.Type?.TypeId);
Aspire.Hosting.RemoteHost (1)
Ats\AtsMarshaller.cs (1)
128
if (typeRef.TypeId == Hosting.Ats.
AtsConstants
.Any)