Skip to content

Commit 6a24b8e

Browse files
author
Max Charlamb
committed
improve wording
1 parent 7c62f67 commit 6a24b8e

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

docs/design/datacontracts/data_descriptor.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ The global values will be in an array, with each value described by a dictionary
214214
* `"type": "type name"` the type of the global value
215215
* optional `"value": VALUE | [ int ] ` the value of the global value, or an offset in an auxiliary array containing the value.
216216

217-
The `VALUE` may be either a number of string. JSON numeric constants are always parsed as numbers. JSON strings are always parsed as strings and may additionally parse as a hex (with prefix `0x` or `0X`) or decimal number.
217+
The `VALUE` may be either a number or a string. JSON numeric constants are always parsed as numbers. JSON strings are always parsed as strings and may additionally parse as a hex (with prefix `0x` or `0X`) or decimal number.
218218
Numeric constants must be within the range of the type of the global value.
219219

220220

@@ -225,7 +225,7 @@ The global values will be in a dictionary, with each key being the name of a glo
225225
* `[VALUE | [int], "type name"]` the type and value of a global
226226
* `VALUE | [int]` just the value of a global
227227

228-
`VALUE` may be either a number of string. JSON numeric constants are always parsed as numbers. JSON strings are always parsed as strings and may additionally parse as a hex (with prefix `0x` or `0X`) or decimal number.
228+
`VALUE` may be either a number or a string. JSON numeric constants are always parsed as numbers. JSON strings are always parsed as strings and may additionally parse as a hex (with prefix `0x` or `0X`) or decimal number.
229229
Numeric constants must be within the range of the type of the global value.
230230

231231
Note that a two element array is unambiguously "type and value", whereas a one-element array is

src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Abstractions/Target.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,14 @@ public abstract class Target
9999
/// <param name="name">The name of the global</param>
100100
/// <param name="value">The value of the global if found</param>
101101
/// <returns>True if a global is found, false otherwise</returns>
102-
public abstract bool TryReadStringGlobal(string name, [NotNullWhen(true)] out string? value);
102+
public abstract bool TryReadGlobalString(string name, [NotNullWhen(true)] out string? value);
103103

104104
/// <summary>
105105
/// Read a well known global from the target process as a string
106106
/// </summary>
107107
/// <param name="name">The name of the global</param>
108108
/// <returns>A string value</returns>
109-
public abstract string ReadStringGlobal(string name);
109+
public abstract string ReadGlobalString(string name);
110110

111111
/// <summary>
112112
/// Read a well known global from the target process as a number in the target endianness

src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader/ContractDescriptorTarget.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ public TargetPointer ReadGlobalPointer(string name, out string? type)
555555
return value.Value;
556556
}
557557

558-
public override string ReadStringGlobal(string name)
558+
public override string ReadGlobalString(string name)
559559
=> ReadStringGlobal(name, out _);
560560

561561
public string ReadStringGlobal(string name, out string? type)
@@ -566,7 +566,7 @@ public string ReadStringGlobal(string name, out string? type)
566566
return value;
567567
}
568568

569-
public override bool TryReadStringGlobal(string name, [NotNullWhen(true)] out string? value)
569+
public override bool TryReadGlobalString(string name, [NotNullWhen(true)] out string? value)
570570
=> TryReadStringGlobal(name, out value, out _);
571571

572572
public bool TryReadStringGlobal(string name, [NotNullWhen(true)] out string? value, out string? type)

src/native/managed/cdacreader/tests/ContractDescriptor/TargetTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,10 +297,10 @@ private static void ValidateGlobalStrings(
297297
{
298298
string actualString;
299299

300-
Assert.True(target.TryReadStringGlobal(name, out actualString));
300+
Assert.True(target.TryReadGlobalString(name, out actualString));
301301
AssertEqualsWithCallerInfo(value, actualString);
302302

303-
actualString = target.ReadStringGlobal(name);
303+
actualString = target.ReadGlobalString(name);
304304
AssertEqualsWithCallerInfo(value, actualString);
305305

306306
if (numericValue != null)

src/native/managed/cdacreader/tests/TestPlaceholderTarget.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,17 +132,17 @@ public override T ReadGlobal<T>(string name)
132132
throw new NotImplementedException();
133133
}
134134

135-
public override string ReadStringGlobal(string name)
135+
public override string ReadGlobalString(string name)
136136
{
137-
if (TryReadStringGlobal(name, out string? value))
137+
if (TryReadGlobalString(name, out string? value))
138138
{
139139
return value;
140140
}
141141

142142
throw new NotImplementedException();
143143
}
144144

145-
public override bool TryReadStringGlobal(string name, [NotNullWhen(true)] out string? value)
145+
public override bool TryReadGlobalString(string name, [NotNullWhen(true)] out string? value)
146146
{
147147
value = null;
148148

0 commit comments

Comments
 (0)