Skip to content

Commit da975ae

Browse files
committed
Modernise syntax a bit
1 parent 32418aa commit da975ae

File tree

1 file changed

+4
-19
lines changed

1 file changed

+4
-19
lines changed

Source/ExcelDna.IntelliSense/IntelliSenseServer.cs

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -322,25 +322,10 @@ public static RegistrationInfo FromRegistrationString(string registrationString)
322322
}
323323
}
324324

325-
public string ToRegistrationString()
326-
{
327-
return string.Join(",", XllPath, ServerId.ToString("N"), Version);
328-
}
329-
330-
public int CompareTo(RegistrationInfo other)
331-
{
332-
return CompareVersions(Version, other.Version);
333-
}
334-
335-
public static string GetControlMacroName(Guid serverId)
336-
{
337-
return "IntelliSenseServerControl_" + serverId.ToString("N");
338-
}
339-
340-
public string GetControlMacroName()
341-
{
342-
return GetControlMacroName(ServerId);
343-
}
325+
public string ToRegistrationString() => $"{XllPath},{ServerId:N},{Version}";
326+
public int CompareTo(RegistrationInfo other) => CompareVersions(Version, other.Version);
327+
public static string GetControlMacroName(Guid serverId) => $"IntelliSenseServerControl_{serverId:N}";
328+
public string GetControlMacroName() => GetControlMacroName(ServerId);
344329

345330
// 1.2.0 is equal to 1.2
346331
// Returns: -1 if version1 < version2

0 commit comments

Comments
 (0)