2222
2323namespace DotOpenDAL ;
2424
25- public class BlockingOperator
25+ public partial class BlockingOperator
2626{
2727 public IntPtr Op { get ; }
2828
@@ -41,24 +41,12 @@ public string Read(string path)
4141 return blocking_operator_read ( Op , path ) ;
4242 }
4343
44- [ DllImport (
45- "opendal_dotnet" ,
46- EntryPoint = "blocking_operator_construct" ,
47- CallingConvention = CallingConvention . Cdecl ,
48- CharSet = CharSet . Auto ) ]
49- private static extern IntPtr blocking_operator_construct ( string scheme ) ;
44+ [ LibraryImport ( "opendal_dotnet" , EntryPoint = "blocking_operator_construct" , StringMarshalling = StringMarshalling . Utf8 ) ]
45+ private static partial IntPtr blocking_operator_construct ( string scheme ) ;
5046
51- [ DllImport (
52- "opendal_dotnet" ,
53- EntryPoint = "blocking_operator_write" ,
54- CallingConvention = CallingConvention . Cdecl ,
55- CharSet = CharSet . Auto ) ]
56- private static extern void blocking_operator_write ( IntPtr op , string path , string content ) ;
47+ [ LibraryImport ( "opendal_dotnet" , EntryPoint = "blocking_operator_write" , StringMarshalling = StringMarshalling . Utf8 ) ]
48+ private static partial void blocking_operator_write ( IntPtr op , string path , string content ) ;
5749
58- [ DllImport (
59- "opendal_dotnet" ,
60- EntryPoint = "blocking_operator_read" ,
61- CallingConvention = CallingConvention . Cdecl ,
62- CharSet = CharSet . Auto ) ]
63- private static extern string blocking_operator_read ( IntPtr op , string path ) ;
50+ [ LibraryImport ( "opendal_dotnet" , EntryPoint = "blocking_operator_read" , StringMarshalling = StringMarshalling . Utf8 ) ]
51+ private static partial string blocking_operator_read ( IntPtr op , string path ) ;
6452}
0 commit comments