using System.Reflection; using System.Runtime.CompilerServices; namespace RGB.NET.Core; /// /// Offsers some helper methods for device creation. /// public static class DeviceHelper { #region Methods /// /// Creates a unique device name from a manufacturer and model name. /// /// /// The id is made unique based on the assembly calling this method. /// /// The manufacturer of the device. /// The model of the device. /// The unique identifier for this device. [MethodImpl(MethodImplOptions.NoInlining)] public static string CreateDeviceName(string manufacturer, string model) => IdGenerator.MakeUnique(Assembly.GetCallingAssembly(), $"{manufacturer} {model}"); #endregion }