コード例 #1
0
 /// <summary>
 /// Helper method that creates a user friendly type from the internal interop structure.
 /// </summary>
 /// <param name="s">AudioOutputDeviceStructure from interop</param>
 /// <returns>public AudioOutputDevice to be consumed by the user</returns>
 internal static AudioOutputDevice Build(this AudioOutputDeviceStructure s) =>
 new AudioOutputDevice(Utf8StringMarshaler.GetInstance().MarshalNativeToManaged(s.DeviceIdentifier) as string,
                       Utf8StringMarshaler.GetInstance().MarshalNativeToManaged(s.Description) as string);
コード例 #2
0
 /// <summary>
 /// Helper method that creates a user friendly type from the internal interop structure.
 /// </summary>
 /// <param name="s">AudioOutputDeviceStructure from interop</param>
 /// <returns>public AudioOutputDevice to be consumed by the user</returns>
 internal static AudioOutputDevice Build(this AudioOutputDeviceStructure s) =>
 new AudioOutputDevice(s.DeviceIdentifier.FromUtf8(), s.Description.FromUtf8());