Skip to content

Commit 1bfa947

Browse files
cxznmhdcxzCopilot
andcommitted
Add csharp naming/type customizations for DomainServices (ETag, AzureLocation, DateTime naming, Status rename)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent dc9ad05 commit 1bfa947

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

  • specification/domainservices/resource-manager/Microsoft.AAD/DomainServices

specification/domainservices/resource-manager/Microsoft.AAD/DomainServices/client.tsp

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,26 @@ using Microsoft.AAD;
2626
// the whole namespace to `_DomainServices`. Rename the operation group for C# to
2727
// avoid the collision (the class is internal, so this has no public API impact).
2828
@@clientName(DomainServices, "DomainServiceOperationGroup", "csharp");
29+
30+
// Use the ARM ETag type instead of a plain string for resource etags.
31+
@@alternateType(DomainService.etag, Azure.Core.eTag, "csharp");
32+
@@alternateType(OuContainer.etag, Azure.Core.eTag, "csharp");
33+
34+
// These `location` properties are Azure regions; use AzureLocation instead of string.
35+
@@alternateType(DomainService.location, Azure.Core.azureLocation, "csharp");
36+
@@alternateType(OuContainer.location, Azure.Core.azureLocation, "csharp");
37+
@@alternateType(ReplicaSet.location, Azure.Core.azureLocation, "csharp");
38+
39+
// .NET guideline: DateTimeOffset properties should end with `On`/`At`.
40+
@@clientName(ConfigDiagnostics.lastExecuted, "lastExecutedOn", "csharp");
41+
@@clientName(HealthAlert.lastDetected, "lastDetectedOn", "csharp");
42+
@@clientName(HealthAlert.raised, "raisedOn", "csharp");
43+
@@clientName(
44+
LdapsSettings.certificateNotAfter,
45+
"certificateNotAfterOn",
46+
"csharp"
47+
);
48+
@@clientName(ReplicaSet.healthLastEvaluated, "healthLastEvaluatedOn", "csharp");
49+
50+
// `Status` is a generic name in IntelliSense; it is the diagnostics validator status.
51+
@@clientName(Status, "DomainServiceValidatorStatus", "csharp");

0 commit comments

Comments
 (0)