Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,6 @@ static INativePeripheralDelegate GetDelegate(IntPtr peripheralPtr)
internal static void DidDiscoverServices(IntPtr peripheralPtr, IntPtr commaSeparatedServiceUUIDsPtr, int errorCode)
{
string commaSeparatedServiceUUIDs = Marshal.PtrToStringUTF8(commaSeparatedServiceUUIDsPtr);
if (string.IsNullOrEmpty(commaSeparatedServiceUUIDs))
{
throw new ArgumentException("commaSeparatedServiceUUIDs is null or empty.");
}

GetDelegate(peripheralPtr)?.DidDiscoverServices(
commaSeparatedServiceUUIDs.Split(','),
CBError.CreateOrNullFromCode(errorCode)
Expand All @@ -84,11 +79,6 @@ internal static void DidDiscoverServices(IntPtr peripheralPtr, IntPtr commaSepar
internal static void DidDiscoverCharacteristics(IntPtr peripheralPtr, IntPtr serviceUUIDPtr, IntPtr commaSeparatedCharacteristicUUIDsPtr, int errorCode)
{
string commaSeparatedCharacteristicUUIDs = Marshal.PtrToStringUTF8(commaSeparatedCharacteristicUUIDsPtr);
if (string.IsNullOrEmpty(commaSeparatedCharacteristicUUIDs))
{
throw new ArgumentException("commaSeparatedCharacteristicUUIDs is null or empty.");
}

GetDelegate(peripheralPtr)?.DidDiscoverCharacteristics(
Marshal.PtrToStringUTF8(serviceUUIDPtr),
commaSeparatedCharacteristicUUIDs.Split(','),
Expand Down Expand Up @@ -156,11 +146,6 @@ internal static void DidUpdateName(IntPtr peripheralPtr)
internal static void DidModifyServices(IntPtr peripheralPtr, IntPtr commaSeparatedServiceUUIDsPtr)
{
string commaSeparatedServiceUUIDs = Marshal.PtrToStringUTF8(commaSeparatedServiceUUIDsPtr);
if (string.IsNullOrEmpty(commaSeparatedServiceUUIDs))
{
throw new ArgumentException("commaSeparatedServiceUUIDs is null or empty.");
}

GetDelegate(peripheralPtr)?.DidModifyServices(
commaSeparatedServiceUUIDs.Split(',')
);
Expand Down