Skip to content
Open
Show file tree
Hide file tree
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
15 changes: 5 additions & 10 deletions DotNetAutomationBinding/Part.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,22 @@
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace DotNetAutomationBinding
{
public class Part
{
//TODO to setup the PINVOKE for save




[DllImport("DotNetAutomationNative", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
static extern void DotNet_automationapi_Part_Save(int guid);
public void Save()
{
//TODO

DotNet_automationapi_Part_Save(m_guid);
}

public Part(int guid)
{
m_guid = guid;
}

private int m_guid;

}
}
}
10 changes: 1 addition & 9 deletions DotNetAutomationBinding/Session.cs
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
using System;
using System.Runtime.InteropServices;

namespace DotNetAutomationBinding
{
public class Session

{

[DllImport("DotNetAutomationNative", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
static extern void DotNet_automationapi_Session_InitializeSession();

[DllImport("DotNetAutomationNative", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
static extern int DotNet_automationapi_Session_MakePart(string partPath);


private Session()
{
DotNet_automationapi_Session_InitializeSession();
}


private static readonly Lazy<Session> lazy = new Lazy<Session>(() => new Session());
public static Session GetSession
{
Expand All @@ -29,12 +21,12 @@ public static Session GetSession
}
}


public Part MakePart(string pathName)
{
Part partpart = null;


Part partpart = new Part(DotNet_automationapi_Session_MakePart(pathName));
return partpart;
}

Expand Down