Closed
Description
I am getting an exception "FilePathMarshaler must be used on a FilePath"
Which is coming from here
public override IntPtr MarshalManagedToNative(object managedObj)
{
if (managedObj == null)
{
return IntPtr.Zero;
}
if (!(managedObj is FilePath))
{
throw new MarshalDirectiveException("FilePathMarshaler must be used on a FilePath.");
}
return StringToNative(((FilePath)managedObj).Posix);
}
The interesting thing is if i set a breakpoint in that method and use the immediate window I can do the following
managedObj is FilePath
is true
managedObj.GetType().FullName
is "LibGit2Sharp.Core.FilePath"
So I have no idea why it is throwing an exception.