Skip to content

Commit

Permalink
Correct method names (nanoframework#44)
Browse files Browse the repository at this point in the history
- minor code improvements in calls
- bump NuGet package to 0.4.0-preview022

Signed-off-by: José Simões <jose.simoes@eclo.solutions>
  • Loading branch information
josesimoes authored Sep 11, 2017
1 parent e36b8d9 commit f888d2e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 19 deletions.
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 0.21.{build}
version: 0.22.{build}

pull_requests:
do_not_increment_build_number: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<PackageId>nanoFramework.Tools.Debugger.Net</PackageId>
<PackageVersion>0.4.0-preview021</PackageVersion>
<PackageVersion>0.4.0-preview02</PackageVersion>
<Description>This .NET library provides a debug client for nanoFramework devices using USB or Serial connection to a board.</Description>
<Authors>nanoFramework project contributors</Authors>
<Title>nanoFramework debug library for .NET</Title>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1230,25 +1230,25 @@ public async Task<bool> ResumeThreadAsync(uint pid)
return IncomingMessage.IsPositiveAcknowledge(await PerformRequestAsync(Commands.c_Debugging_Thread_Resume, 0, cmd));
}

public async Task<RuntimeValue> GetThreadException(uint pid)
public Task<RuntimeValue> GetThreadExceptionAsync(uint pid)
{
Commands.Debugging_Thread_GetException cmd = new Commands.Debugging_Thread_GetException();

cmd.m_pid = pid;

return await GetRuntimeValueAsync(Commands.c_Debugging_Thread_GetException, cmd);
return GetRuntimeValueAsync(Commands.c_Debugging_Thread_GetException, cmd);
}

public async Task<RuntimeValue> GetThreadAsync(uint pid)
public Task<RuntimeValue> GetThreadAsync(uint pid)
{
Commands.Debugging_Thread_Get cmd = new Commands.Debugging_Thread_Get();

cmd.m_pid = pid;

return await GetRuntimeValueAsync(Commands.c_Debugging_Thread_Get, cmd);
return GetRuntimeValueAsync(Commands.c_Debugging_Thread_Get, cmd);
}

public async Task<bool> UnwindThreadAsync(uint pid, uint depth)
public Task<bool> UnwindThreadAsync(uint pid, uint depth)
{
Commands.Debugging_Thread_Unwind cmd = new Commands.Debugging_Thread_Unwind();

Expand Down Expand Up @@ -1547,23 +1547,23 @@ internal async Task<bool> SetArrayElementAsync(uint heapblock, uint index, byte[
return IncomingMessage.IsPositiveAcknowledge(await PerformRequestAsync(Commands.c_Debugging_Value_SetArray, 0, cmd));
}

public async Task<RuntimeValue> GetScratchPadValue(int index)
public Task<RuntimeValue> GetScratchPadValueAsync(int index)
{
Commands.Debugging_Value_GetScratchPad cmd = new Commands.Debugging_Value_GetScratchPad();

cmd.m_index = index;

return await GetRuntimeValueAsync(Commands.c_Debugging_Value_GetScratchPad, cmd);
return GetRuntimeValueAsync(Commands.c_Debugging_Value_GetScratchPad, cmd);
}

public async Task<RuntimeValue> AllocateObjectAsync(int scratchPadLocation, uint td)
public Task<RuntimeValue> AllocateObjectAsync(int scratchPadLocation, uint td)
{
Commands.Debugging_Value_AllocateObject cmd = new Commands.Debugging_Value_AllocateObject();

cmd.m_index = scratchPadLocation;
cmd.m_td = td;

return await GetRuntimeValueAsync(Commands.c_Debugging_Value_AllocateObject, cmd);
return GetRuntimeValueAsync(Commands.c_Debugging_Value_AllocateObject, cmd);
}

public async Task<RuntimeValue> AllocateStringAsync(int scratchPadLocation, string val)
Expand All @@ -1583,7 +1583,7 @@ public async Task<RuntimeValue> AllocateStringAsync(int scratchPadLocation, stri
return rtv;
}

public async Task<RuntimeValue> AllocateArrayAsync(int scratchPadLocation, uint td, int depth, int numOfElements)
public Task<RuntimeValue> AllocateArrayAsync(int scratchPadLocation, uint td, int depth, int numOfElements)
{
Commands.Debugging_Value_AllocateArray cmd = new Commands.Debugging_Value_AllocateArray();

Expand All @@ -1592,7 +1592,7 @@ public async Task<RuntimeValue> AllocateArrayAsync(int scratchPadLocation, uint
cmd.m_depth = (uint)depth;
cmd.m_numOfElements = (uint)numOfElements;

return await GetRuntimeValueAsync(Commands.c_Debugging_Value_AllocateArray, cmd);
return GetRuntimeValueAsync(Commands.c_Debugging_Value_AllocateArray, cmd);
}

public async Task<Commands.Debugging_Resolve_Type.Result> ResolveTypeAsync(uint td)
Expand Down Expand Up @@ -1628,7 +1628,6 @@ public async Task<RuntimeValue> AllocateArrayAsync(int scratchPadLocation, uint
public async Task<Commands.Debugging_Resolve_Method.Result> ResolveMethodAsync(uint md)
{
Commands.Debugging_Resolve_Method.Result result = (Commands.Debugging_Resolve_Method.Result)m_typeSysLookup.Lookup(TypeSysLookup.Type.Method, md);
;

if (result == null)
{
Expand Down Expand Up @@ -1660,7 +1659,6 @@ public async Task<RuntimeValue> AllocateArrayAsync(int scratchPadLocation, uint
public async Task<Commands.Debugging_Resolve_Field.Result> ResolveFieldAsync(uint fd)
{
Commands.Debugging_Resolve_Field.Result result = (Commands.Debugging_Resolve_Field.Result)m_typeSysLookup.Lookup(TypeSysLookup.Type.Field, fd);
;

if (result == null)
{
Expand Down Expand Up @@ -1952,14 +1950,14 @@ public async Task<uint> GetVirtualMethodAsync(uint md, RuntimeValue obj)
// //return bmp;
//}

public async Task InjectButtonsAsync(uint pressed, uint released)
public Task InjectButtonsAsync(uint pressed, uint released)
{
Commands.Debugging_Button_Inject cmd = new Commands.Debugging_Button_Inject();

cmd.m_pressed = pressed;
cmd.m_released = released;

await PerformRequestAsync(Commands.c_Debugging_Button_Inject, 0, cmd);
return PerformRequestAsync(Commands.c_Debugging_Button_Inject, 0, cmd);
}

public async Task<List<ThreadStatus>> GetThreadsAsync()
Expand Down Expand Up @@ -2037,7 +2035,7 @@ public async Task<List<ThreadStatus>> GetThreadsAsync()
return cmdReply;
}

public async Task<bool> Info_SetJMCAsyn(bool fJMC, ReflectionDefinition.Kind kind, uint index)
public async Task<bool> Info_SetJMCAsync(bool fJMC, ReflectionDefinition.Kind kind, uint index)
{
Commands.Debugging_Info_SetJMC cmd = new Commands.Debugging_Info_SetJMC();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<PackageId>nanoFramework.Tools.Debugger.UWP</PackageId>
<PackageVersion>0.4.0-preview021</PackageVersion>
<PackageVersion>0.4.0-preview022</PackageVersion>
<Description>This UWP library provides a debug client for nanoFramework devices using USB or Serial connection to a board.</Description>
<Authors>nanoFramework project contributors</Authors>
<Title>nanoFramework debug library for UWP</Title>
Expand Down

0 comments on commit f888d2e

Please sign in to comment.