Files
Matt Nadareski 7689c6dd07 Libraries
This change looks dramatic, but it's just separating out the already-split namespaces into separate top-level folders. In theory, every single one could be built into their own Nuget package. `SabreTools.Serialization` still builds the normal Nuget package that is used by all other projects and includes all namespaces.
2026-03-21 16:26:56 -04:00

26 lines
857 B
C#

using System;
namespace SabreTools.ObjectIdentifier
{
/// <summary>
/// Methods related to Object Identifiers (OID) and dot notation
/// </summary>
public static partial class Parser
{
/// <summary>
/// Parse an OID in separated-value notation into dot notation
/// </summary>
/// <param name="values">List of values to check against</param>
/// <returns>List of values representing the dot notation</returns>
public static string? ParseOIDToDotNotation(ulong[]? values)
{
// If we have an invalid set of values, we can't do anything
if (values is null || values.Length == 0)
return null;
var stringValues = Array.ConvertAll(values, v => v.ToString());
return string.Join(".", [.. stringValues]);
}
}
}