Skip to content

Commit 633235e

Browse files
authored
Code analysis with static analysers based on microsoft rules (#2831)
Code refactoring.
1 parent 620f420 commit 633235e

File tree

54 files changed

+115
-109
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+115
-109
lines changed

src/DataCollectors/Microsoft.TestPlatform.Extensions.EventLogCollector/EventLogDataCollector.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,6 @@ protected override void Dispose(bool disposing)
371371

372372
// Delete all the temp event log directories
373373
this.RemoveTempEventLogDirs(this.eventLogDirectories);
374-
GC.SuppressFinalize(this);
375374
}
376375

377376
#endregion

src/Microsoft.TestPlatform.AdapterUtilities/ManagedNameUtilities/ManagedNameHelper.Reflection.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ public static partial class ManagedNameHelper
2424
/// A <see cref="MethodBase" /> instance to get fully qualified managed type and method name.
2525
/// </param>
2626
/// <param name="managedTypeName">
27-
/// When this method returns, contains the fully qualified managed type name of the <paramref name="method"/>.
27+
/// When this method returns, contains the fully qualified managed type name of the <paramref name="method"/>.
2828
/// This parameter is passed uninitialized; any value originally supplied in result will be overwritten.
2929
/// The format is defined in <see href="https://github.com/microsoft/vstest-docs/blob/master/RFCs/0017-Managed-TestCase-Properties.md#managedtype-property">the RFC</see>.
3030
/// </param>
3131
/// <param name="managedMethodName">
32-
/// When this method returns, contains the fully qualified managed method name of the <paramref name="method"/>.
32+
/// When this method returns, contains the fully qualified managed method name of the <paramref name="method"/>.
3333
/// This parameter is passed uninitialized; any value originally supplied in result will be overwritten.
3434
/// The format is defined in <see href="https://github.com/microsoft/vstest-docs/blob/master/RFCs/0017-Managed-TestCase-Properties.md#managedmethod-property">the RFC</see>.
3535
/// </param>
@@ -43,7 +43,7 @@ public static partial class ManagedNameHelper
4343
/// Required functionality on <paramref name="method"/> is missing on the current platform.
4444
/// </exception>
4545
/// <remarks>
46-
/// More information about <paramref name="managedTypeName"/> and <paramref name="managedMethodName"/> can be found in
46+
/// More information about <paramref name="managedTypeName"/> and <paramref name="managedMethodName"/> can be found in
4747
/// <see href="https://github.com/microsoft/vstest-docs/blob/master/RFCs/0017-Managed-TestCase-Properties.md">the RFC</see>.
4848
/// </remarks>
4949
public static void GetManagedName(MethodBase method, out string managedTypeName, out string managedMethodName)
@@ -65,7 +65,7 @@ public static void GetManagedName(MethodBase method, out string managedTypeName,
6565
// sure we are working with the open form of the generic type.
6666
semanticType = semanticType.GetGenericTypeDefinition();
6767

68-
// The method might have some of its parameters specified by the original closed type
68+
// The method might have some of its parameters specified by the original closed type
6969
// declaration. Here we use the method handle (basically metadata token) to create
7070
// a new method reference using the open form of the reflected type. The intent is
7171
// to strip all generic type parameters.
@@ -114,7 +114,7 @@ public static void GetManagedName(MethodBase method, out string managedTypeName,
114114
}
115115

116116
/// <summary>
117-
/// Gets the <see cref="MethodBase"/> object with the specified <paramref name="managedTypeName"/>
117+
/// Gets the <see cref="MethodBase"/> object with the specified <paramref name="managedTypeName"/>
118118
/// and <paramref name="managedMethodName"/> in the <paramref name="assembly"/> instance.
119119
/// </summary>
120120
/// <param name="assembly">
@@ -132,11 +132,11 @@ public static void GetManagedName(MethodBase method, out string managedTypeName,
132132
/// A <see cref="MethodBase" /> object that represents specified parameters, throws if null.
133133
/// </returns>
134134
/// <exception cref="InvalidManagedNameException">
135-
/// Values specified with <paramref name="managedTypeName"/> and <paramref name="managedMethodName"/>
135+
/// Values specified with <paramref name="managedTypeName"/> and <paramref name="managedMethodName"/>
136136
/// does not correspond to a method in the <paramref name="assembly"/> instance, or malformed.
137137
/// </exception>
138138
/// <remarks>
139-
/// More information about <paramref name="managedTypeName"/> and <paramref name="managedMethodName"/> can be found in
139+
/// More information about <paramref name="managedTypeName"/> and <paramref name="managedMethodName"/> can be found in
140140
/// <see href="https://github.com/microsoft/vstest-docs/blob/master/RFCs/0017-Managed-TestCase-Properties.md">the RFC</see>.
141141
/// </remarks>
142142
public static MethodBase GetMethod(Assembly assembly, string managedTypeName, string managedMethodName)
@@ -335,7 +335,7 @@ private static void AppendMethodString(StringBuilder methodBuilder, string name,
335335

336336
private static void NormalizeAndAppendString(StringBuilder b, string name)
337337
{
338-
b.Append("'");
338+
b.Append('\'');
339339
for (int i = 0; i < name.Length; i++)
340340
{
341341
char c = name[i];
@@ -348,15 +348,15 @@ private static void NormalizeAndAppendString(StringBuilder b, string name)
348348
// b.Append('0', 4 - encoded.Length);
349349
// b.Append(encoded);
350350

351-
b.Append("\\");
351+
b.Append('\\');
352352
b.Append(c);
353353
continue;
354354
}
355355
}
356356

357357
b.Append(c);
358358
}
359-
b.Append("'");
359+
b.Append('\'');
360360
}
361361

362362
private static int AppendNestedTypeName(StringBuilder b, Type type)
@@ -439,7 +439,7 @@ private static bool NeedsEscaping(char c, int pos)
439439
}
440440

441441
if (c == '_'
442-
|| char.IsLetterOrDigit(c) // Lu, Ll, Lt, Lm, Lo, or Nl
442+
|| char.IsLetterOrDigit(c) // Lu, Ll, Lt, Lm, Lo, or Nl
443443
)
444444
{
445445
return false;

src/Microsoft.TestPlatform.Build/ArgumentEscaper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public static string HandleEscapeSequenceInArgForProcessStart(string arg)
2323

2424
if (needsQuotes)
2525
{
26-
sb.Append("\"");
26+
sb.Append('\"');
2727
}
2828

2929
for (int i = 0; i < arg.Length; ++i)
@@ -70,7 +70,7 @@ public static string HandleEscapeSequenceInArgForProcessStart(string arg)
7070

7171
if (needsQuotes)
7272
{
73-
sb.Append("\"");
73+
sb.Append('\"');
7474
}
7575

7676
return sb.ToString();

src/Microsoft.TestPlatform.Client/Discovery/DiscoveryRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ public void HandleDiscoveryComplete(DiscoveryCompleteEventArgs discoveryComplete
267267
// Raise onDiscoveredTests event if there are some tests in the last chunk.
268268
// (We don't want to send the tests in the discovery complete event so that programming on top of
269269
// RS client is easier i.e. user does not have to listen on discovery complete event.)
270-
if (lastChunk != null && lastChunk.Count() > 0)
270+
if (lastChunk != null && lastChunk.Any())
271271
{
272272
var discoveredTestsEvent = new DiscoveredTestsEventArgs(lastChunk);
273273
this.LoggerManager.HandleDiscoveredTests(discoveredTestsEvent);

src/Microsoft.TestPlatform.Common/ExtensionFramework/TestPluginManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public static T CreateTestExtension<T>(Type extensionType)
6969
{
7070
if (extensionType == null)
7171
{
72-
throw new ArgumentNullException("extensionType");
72+
throw new ArgumentNullException(nameof(extensionType));
7373
}
7474

7575
EqtTrace.Info("TestPluginManager.CreateTestExtension: Attempting to load test extension: " + extensionType);

src/Microsoft.TestPlatform.Common/Logging/InternalTestLoggerEvents.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ internal void RaiseTestRunMessage(TestRunMessageEventArgs args)
177177
{
178178
if (args == null)
179179
{
180-
throw new ArgumentNullException("args");
180+
throw new ArgumentNullException(nameof(args));
181181
}
182182

183183
this.CheckDisposed();

src/Microsoft.TestPlatform.Common/Logging/TestSessionMessageLogger.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public void SendMessage(TestMessageLevel testMessageLevel, string message)
6464
{
6565
if (string.IsNullOrWhiteSpace(message))
6666
{
67-
throw new ArgumentException(ObjectModelCommonResources.CannotBeNullOrEmpty, "message");
67+
throw new ArgumentException(ObjectModelCommonResources.CannotBeNullOrEmpty, nameof(message));
6868
}
6969

7070
if (this.TreatTestAdapterErrorsAsWarnings

src/Microsoft.TestPlatform.Common/RunSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public ISettingsProvider GetSettings(string settingsName)
6969
{
7070
if (StringUtilities.IsNullOrWhiteSpace(settingsName))
7171
{
72-
throw new ArgumentException(ObjectModelCommonResources.CannotBeNullOrEmpty, "settingsName");
72+
throw new ArgumentException(ObjectModelCommonResources.CannotBeNullOrEmpty, nameof(settingsName));
7373
}
7474

7575
// Try and lookup the settings provider.

src/Microsoft.TestPlatform.Common/SettingsProvider/SettingsProviderExtensionManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ internal LazyExtension<ISettingsProvider, ISettingsProviderCapabilities> GetSett
181181
{
182182
if (string.IsNullOrWhiteSpace(settingsName))
183183
{
184-
throw new ArgumentException(ObjectModelCommonResources.CannotBeNullOrEmpty, "settingsName");
184+
throw new ArgumentException(ObjectModelCommonResources.CannotBeNullOrEmpty, nameof(settingsName));
185185
}
186186

187187
this.SettingsProvidersMap.TryGetValue(settingsName, out LazyExtension<ISettingsProvider, ISettingsProviderCapabilities> settingsProvider);

src/Microsoft.TestPlatform.CommunicationUtilities/LengthPrefixCommunicationChannel.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ public void Dispose()
8181
EqtTrace.Verbose("LengthPrefixCommunicationChannel.Dispose: Dispose reader and writer.");
8282
this.reader.Dispose();
8383
this.writer.Dispose();
84+
GC.SuppressFinalize(this);
8485
}
8586
}
8687
}

src/Microsoft.TestPlatform.CommunicationUtilities/Serialization/TestObjectConverter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist
3434
if (objectType != typeof(List<KeyValuePair<TestProperty, object>>))
3535
{
3636
// Support only deserialization of KeyValuePair list
37-
throw new ArgumentException(nameof(objectType));
37+
throw new ArgumentException("the objectType was not a KeyValuePair list", nameof(objectType));
3838
}
3939

4040
var propertyList = new List<KeyValuePair<TestProperty, object>>();

src/Microsoft.TestPlatform.CommunicationUtilities/TestRequestSender.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,7 @@ public void Dispose()
470470
}
471471

472472
this.communicationEndpoint.Stop();
473+
GC.SuppressFinalize(this);
473474
}
474475

475476
private void OnExecutionMessageReceived(object sender, MessageReceivedEventArgs messageReceived, ITestRunEventsHandler testRunEventsHandler)

src/Microsoft.TestPlatform.CoreUtilities/Helpers/FileHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public void DeleteEmptyDirectroy(string dirPath)
118118
try
119119
{
120120
if (Directory.Exists(dirPath)
121-
&& Directory.EnumerateFileSystemEntries(dirPath).Count() == 0)
121+
&& !Directory.EnumerateFileSystemEntries(dirPath).Any())
122122
{
123123
Directory.Delete(dirPath, true);
124124
}

src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/DataCollectionTestRunEventsHandler.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ internal class DataCollectionTestRunEventsHandler : ITestRunEventsHandler2
4040
/// The proxy Data Collection Manager.
4141
/// </param>
4242
public DataCollectionTestRunEventsHandler(ITestRunEventsHandler baseTestRunEventsHandler, IProxyDataCollectionManager proxyDataCollectionManager, CancellationToken cancellationToken)
43-
: this(baseTestRunEventsHandler, proxyDataCollectionManager, cancellationToken, JsonDataSerializer.Instance)
43+
: this(baseTestRunEventsHandler, proxyDataCollectionManager, JsonDataSerializer.Instance, cancellationToken)
4444
{
4545
}
4646

@@ -56,7 +56,7 @@ public DataCollectionTestRunEventsHandler(ITestRunEventsHandler baseTestRunEvent
5656
/// <param name="dataSerializer">
5757
/// The data Serializer.
5858
/// </param>
59-
public DataCollectionTestRunEventsHandler(ITestRunEventsHandler baseTestRunEventsHandler, IProxyDataCollectionManager proxyDataCollectionManager, CancellationToken cancellationToken, IDataSerializer dataSerializer)
59+
public DataCollectionTestRunEventsHandler(ITestRunEventsHandler baseTestRunEventsHandler, IProxyDataCollectionManager proxyDataCollectionManager, IDataSerializer dataSerializer, CancellationToken cancellationToken)
6060
{
6161
this.proxyDataCollectionManager = proxyDataCollectionManager;
6262
this.testRunEventsHandler = baseTestRunEventsHandler;
@@ -86,7 +86,7 @@ public void HandleLogMessage(TestMessageLevel level, string message)
8686
/// </param>
8787
public void HandleRawMessage(string rawMessage)
8888
{
89-
// In case of data collection, data collection attachments should be attached to raw message for ExecutionComplete
89+
// In case of data collection, data collection attachments should be attached to raw message for ExecutionComplete
9090
var message = this.dataSerializer.DeserializeMessage(rawMessage);
9191

9292
if (string.Equals(MessageType.ExecutionComplete, message.MessageType))
@@ -178,20 +178,20 @@ public bool AttachDebuggerToProcess(int pid)
178178
/// </returns>
179179
internal static ICollection<AttachmentSet> GetCombinedAttachmentSets(Collection<AttachmentSet> originalAttachmentSets, ICollection<AttachmentSet> newAttachments)
180180
{
181-
if (null == newAttachments || newAttachments.Count == 0)
181+
if (newAttachments == null || newAttachments.Count == 0)
182182
{
183183
return originalAttachmentSets;
184184
}
185185

186-
if (null == originalAttachmentSets)
186+
if (originalAttachmentSets == null)
187187
{
188188
return new Collection<AttachmentSet>(newAttachments.ToList());
189189
}
190190

191191
foreach (var attachmentSet in newAttachments)
192192
{
193193
var attSet = originalAttachmentSets.FirstOrDefault(item => Uri.Equals(item.Uri, attachmentSet.Uri));
194-
if (null == attSet)
194+
if (attSet == null)
195195
{
196196
originalAttachmentSets.Add(attachmentSet);
197197
}

src/Microsoft.TestPlatform.CrossPlatEngine/Discovery/DiscovererEnumerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ private void LoadTestsFromAnExtension(string extensionAssembly, IEnumerable<stri
143143
try
144144
{
145145
// Collecting Total Number of Adapters Discovered in Machine
146-
this.requestData.MetricsCollection.Add(TelemetryDataConstants.NumberOfAdapterDiscoveredDuringDiscovery, discovererToSourcesMap.Keys.Count());
146+
this.requestData.MetricsCollection.Add(TelemetryDataConstants.NumberOfAdapterDiscoveredDuringDiscovery, discovererToSourcesMap.Keys.Count);
147147

148148
var context = new DiscoveryContext { RunSettings = settings };
149149
context.FilterExpressionWrapper = !string.IsNullOrEmpty(testCaseFilter) ? new FilterExpressionWrapper(testCaseFilter) : null;

src/Microsoft.TestPlatform.CrossPlatEngine/Execution/BaseRunTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ private void RaiseTestRunComplete(
645645
this.requestData.MetricsCollection.Add(TelemetryDataConstants.RunState, canceled ? "Canceled" : (aborted ? "Aborted" : "Completed"));
646646

647647
// Collecting Number of Adapters Used to run tests.
648-
this.requestData.MetricsCollection.Add(TelemetryDataConstants.NumberOfAdapterUsedToRunTests, this.ExecutorUrisThatRanTests.Count());
648+
this.requestData.MetricsCollection.Add(TelemetryDataConstants.NumberOfAdapterUsedToRunTests, this.ExecutorUrisThatRanTests.Count);
649649

650650
if (lastChunkTestResults.Any() && this.IsTestSourceIsPackage())
651651
{

src/Microsoft.TestPlatform.Extensions.BlameDataCollector/BlameLogger.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ private void TestRunCompleteHandler(object sender, TestRunCompleteEventArgs e)
107107

108108
// Gets the faulty test cases if test aborted
109109
var testCaseNames = this.GetFaultyTestCaseNames(e);
110-
if (testCaseNames.Count() == 0)
110+
if (!testCaseNames.Any())
111111
{
112112
return;
113113
}

src/Microsoft.TestPlatform.Extensions.BlameDataCollector/InactivityTimer.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public void ResetTimer(TimeSpan inactivityTimespan)
3030
public void Dispose()
3131
{
3232
this.timer.Dispose();
33+
GC.SuppressFinalize(this);
3334
}
3435
}
3536
}

src/Microsoft.TestPlatform.Extensions.HtmlLogger/HtmlLogger.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ public void TestResultHandler(object sender, TestResultEventArgs e)
242242

243243
Results.TryAdd(executionId, testResult);
244244

245-
// Check for parent execution id to store the test results in hierarchical way
245+
// Check for parent execution id to store the test results in hierarchical way
246246
if (parentExecutionId == Guid.Empty)
247247
{
248248
if (e.Result.Outcome == TestOutcome.Failed)

src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestId.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ public int CompareTo(TestId other)
227227
{
228228
if (other == null)
229229
{
230-
throw new ArgumentNullException("other");
230+
throw new ArgumentNullException(nameof(other));
231231
}
232232

233233
return this.id.CompareTo(other.id);

src/Microsoft.TestPlatform.Extensions.TrxLogger/ObjectModel/TestType.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public TestType(Guid id)
1919
{
2020
if (id == Guid.Empty)
2121
{
22-
throw new ArgumentNullException("id");
22+
throw new ArgumentNullException(nameof(id));
2323
}
2424

2525
this.typeId = id;

src/Microsoft.TestPlatform.ObjectModel/Adapter/TestPlatformFormatException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public override void GetObjectData(SerializationInfo info, StreamingContext cont
8989
{
9090
if (info == null)
9191
{
92-
throw new ArgumentNullException("info");
92+
throw new ArgumentNullException(nameof(info));
9393
}
9494

9595
base.GetObjectData(info, context);

src/Microsoft.TestPlatform.ObjectModel/DataCollector/Common/RequestId.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public int CompareTo(object obj)
152152
RequestId other = obj as RequestId;
153153
if (other == null)
154154
{
155-
throw new ArgumentException(string.Format(Resources.Common_ObjectMustBeOfType, new object[] { typeof(RequestId).Name }), "obj");
155+
throw new ArgumentException(string.Format(Resources.Common_ObjectMustBeOfType, new object[] { typeof(RequestId).Name }), nameof(obj));
156156
}
157157

158158
return Id.CompareTo(other.Id);

src/Microsoft.TestPlatform.ObjectModel/DefaultExecutorUriAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public DefaultExecutorUriAttribute(string executorUri)
2323
{
2424
if (string.IsNullOrWhiteSpace(executorUri))
2525
{
26-
throw new ArgumentException(CommonResources.CannotBeNullOrEmpty, "executorUri");
26+
throw new ArgumentException(CommonResources.CannotBeNullOrEmpty, nameof(executorUri));
2727
}
2828

2929
ExecutorUri = executorUri;

src/Microsoft.TestPlatform.ObjectModel/ExtensionUriAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public ExtensionUriAttribute(string extensionUri)
2626
{
2727
if (string.IsNullOrWhiteSpace(extensionUri))
2828
{
29-
throw new ArgumentException(CommonResources.CannotBeNullOrEmpty, "extensionUri");
29+
throw new ArgumentException(CommonResources.CannotBeNullOrEmpty, nameof(extensionUri));
3030
}
3131

3232
ExtensionUri = extensionUri;

src/Microsoft.TestPlatform.ObjectModel/FileExtensionAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public FileExtensionAttribute(string fileExtension)
2727
{
2828
if (string.IsNullOrWhiteSpace(fileExtension))
2929
{
30-
throw new ArgumentException(CommonResources.CannotBeNullOrEmpty, "fileExtension");
30+
throw new ArgumentException(CommonResources.CannotBeNullOrEmpty, nameof(fileExtension));
3131
}
3232

3333
FileExtension = fileExtension;

src/Microsoft.TestPlatform.ObjectModel/FriendlyNameAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public FriendlyNameAttribute(string friendlyName)
2525
{
2626
if (string.IsNullOrWhiteSpace(friendlyName))
2727
{
28-
throw new ArgumentException(CommonResources.CannotBeNullOrEmpty, "friendlyName");
28+
throw new ArgumentException(CommonResources.CannotBeNullOrEmpty, nameof(friendlyName));
2929
}
3030

3131
FriendlyName = friendlyName;

0 commit comments

Comments
 (0)