// Native functions refs
//.//////////////////////////////////////////////////////////////////
#region NativeRefs
- [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbnew")]
+ [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbnew", CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr _ejdbnew();
- [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbdel")]
+ [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbdel", CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr _ejdbdel([In] IntPtr db);
- [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbopen")]
+ [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbopen", CallingConvention = CallingConvention.Cdecl)]
internal static extern bool _ejdbopen([In] IntPtr db, [In] IntPtr path, int mode);
internal static bool _ejdbopen(IntPtr db, string path, int mode) {
}
}
- [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbclose")]
+ [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbclose", CallingConvention = CallingConvention.Cdecl)]
internal static extern bool _ejdbclose([In] IntPtr db);
- [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbisopen")]
+ [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbisopen", CallingConvention = CallingConvention.Cdecl)]
internal static extern bool _ejdbisopen([In] IntPtr db);
- [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbecode")]
+ [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbecode", CallingConvention = CallingConvention.Cdecl)]
internal static extern int _ejdbecode([In] IntPtr db);
- [DllImport(EJDB_LIB_NAME, EntryPoint="ejdberrmsg")]
+ [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdberrmsg", CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr _ejdberrmsg(int ecode);
- [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbgetcoll")]
+ [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbgetcoll", CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr _ejdbgetcoll([In] IntPtr db, [In] IntPtr cname);
internal static IntPtr _ejdbgetcoll(IntPtr db, string cname) {
}
}
- [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbcreatecoll")]
+ [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbcreatecoll", CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr _ejdbcreatecoll([In] IntPtr db, [In] IntPtr cname, IntPtr opts);
- [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbcreatecoll")]
+ [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbcreatecoll", CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr _ejdbcreatecoll([In] IntPtr db, [In] IntPtr cname, ref EJDBCollectionOptionsN opts);
internal static IntPtr _ejdbcreatecoll(IntPtr db, String cname, EJDBCollectionOptionsN? opts) {
}
}
//EJDB_EXPORT bool ejdbrmcoll(EJDB *jb, const char *colname, bool unlinkfile);
- [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbrmcoll")]
+ [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbrmcoll", CallingConvention = CallingConvention.Cdecl)]
internal static extern bool _ejdbrmcoll([In] IntPtr db, [In] IntPtr cname, bool unlink);
internal static bool _ejdbrmcoll(IntPtr db, string cname, bool unlink) {
}
}
//EJDB_EXPORT bson* ejdbcommand(EJDB *jb, bson *cmd);
- [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbcommand2")]
+ [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbcommand2", CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr _ejdbcommand([In] IntPtr db, [In] byte[] cmd);
//EJDB_EXPORT bool ejdbsavebson3(EJCOLL *jcoll, void *bsdata, bson_oid_t *oid, bool merge);
- [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbsavebson3")]
+ [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbsavebson3", CallingConvention = CallingConvention.Cdecl)]
internal static extern bool _ejdbsavebson([In] IntPtr coll, [In] byte[] bsdata, [Out] byte[] oid, [In] bool merge);
//EJDB_EXPORT bson* ejdbloadbson(EJCOLL *coll, const bson_oid_t *oid);
- [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbloadbson")]
+ [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbloadbson", CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr _ejdbloadbson([In] IntPtr coll, [In] byte[] oid);
//EJDB_EXPORT const char* bson_data2(const bson *b, int *bsize);
- [DllImport(EJDB_LIB_NAME, EntryPoint="bson_data2")]
+ [DllImport(EJDB_LIB_NAME, EntryPoint = "bson_data2", CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr _bson_data2([In] IntPtr bsptr, out int size);
//EJDB_EXPORT void bson_del(bson *b);
- [DllImport(EJDB_LIB_NAME, EntryPoint="bson_del")]
+ [DllImport(EJDB_LIB_NAME, EntryPoint = "bson_del", CallingConvention = CallingConvention.Cdecl)]
internal static extern void _bson_del([In] IntPtr bsptr);
//EJDB_EXPORT bool ejdbrmbson(EJCOLL *coll, bson_oid_t *oid);
- [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbrmbson")]
+ [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbrmbson", CallingConvention = CallingConvention.Cdecl)]
internal static extern bool _ejdbrmbson([In] IntPtr cptr, [In] byte[] oid);
//EJDB_EXPORT bool ejdbsyncdb(EJDB *jb)
- [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbsyncdb")]
+ [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbsyncdb", CallingConvention = CallingConvention.Cdecl)]
internal static extern bool _ejdbsyncdb([In] IntPtr db);
//EJDB_EXPORT bool ejdbsyncoll(EJDB *jb)
- [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbsyncoll")]
+ [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbsyncoll", CallingConvention = CallingConvention.Cdecl)]
internal static extern bool _ejdbsyncoll([In] IntPtr coll);
//EJDB_EXPORT bool ejdbsetindex(EJCOLL *coll, const char *ipath, int flags);
- [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbsetindex")]
+ [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbsetindex", CallingConvention = CallingConvention.Cdecl)]
internal static extern bool _ejdbsetindex([In] IntPtr coll, [In] IntPtr ipathptr, int flags);
//EJDB_EXPORT bson* ejdbmeta(EJDB *jb)
- [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbmeta")]
+ [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbmeta", CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr _ejdbmeta([In] IntPtr db);
//EJDB_EXPORT bool ejdbtranbegin(EJCOLL *coll);
- [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbtranbegin")]
+ [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbtranbegin", CallingConvention = CallingConvention.Cdecl)]
internal static extern bool _ejdbtranbegin([In] IntPtr coll);
//EJDB_EXPORT bool ejdbtrancommit(EJCOLL *coll);
- [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbtrancommit")]
+ [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbtrancommit", CallingConvention = CallingConvention.Cdecl)]
internal static extern bool _ejdbtrancommit([In] IntPtr coll);
//EJDB_EXPORT bool ejdbtranabort(EJCOLL *coll);
- [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbtranabort")]
+ [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbtranabort", CallingConvention = CallingConvention.Cdecl)]
internal static extern bool _ejdbtranabort([In] IntPtr coll);
//EJDB_EXPORT bool ejdbtranstatus(EJCOLL *jcoll, bool *txactive);
- [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbtranstatus")]
+ [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbtranstatus", CallingConvention = CallingConvention.Cdecl)]
internal static extern bool _ejdbtranstatus([In] IntPtr coll, out bool txactive);
//EJDB_EXPORT const char *ejdbversion();
- [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbversion")]
+ [DllImport(EJDB_LIB_NAME, EntryPoint = "ejdbversion", CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr _ejdbversion();
internal static bool _ejdbsetindex(IntPtr coll, string ipath, int flags) {
//Pointer to the result set list
IntPtr _qresptr;
//EJDB_EXPORT void ejdbqresultdispose(EJQRESULT qr);
- [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint="ejdbqresultdispose")]
+ [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint = "ejdbqresultdispose", CallingConvention = CallingConvention.Cdecl)]
static extern void _ejdbqresultdispose([In] IntPtr qres);
//const void* ejdbqresultbsondata(EJQRESULT qr, int pos, int *size)
- [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint="ejdbqresultbsondata")]
+ [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint = "ejdbqresultbsondata", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr _ejdbqresultbsondata([In] IntPtr qres, [In] int pos, out int size);
/// <summary>
//
#region NativeRefs
//EJDB_EXPORT void ejdbquerydel(EJQ *q);
- [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint="ejdbquerydel")]
+ [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint = "ejdbquerydel", CallingConvention = CallingConvention.Cdecl)]
static extern void _ejdbquerydel([In] IntPtr qptr);
//EJDB_EXPORT EJQ* ejdbcreatequery2(EJDB *jb, void *qbsdata);
- [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint="ejdbcreatequery2")]
+ [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint = "ejdbcreatequery2", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr _ejdbcreatequery([In] IntPtr jb, [In] byte[] bsdata);
//EJDB_EXPORT EJQ* ejdbqueryhints(EJDB *jb, EJQ *q, void *hintsbsdata)
- [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint="ejdbqueryhints")]
+ [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint = "ejdbqueryhints", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr _ejdbqueryhints([In] IntPtr jb, [In] IntPtr qptr, [In] byte[] bsdata);
//EJDB_EXPORT EJQ* ejdbqueryaddor(EJDB *jb, EJQ *q, void *orbsdata)
- [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint="ejdbqueryaddor")]
+ [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint = "ejdbqueryaddor", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr _ejdbqueryaddor([In] IntPtr jb, [In] IntPtr qptr, [In] byte[] bsdata);
//EJDB_EXPORT EJQRESULT ejdbqryexecute(EJCOLL *jcoll, const EJQ *q, uint32_t *count, int qflags, TCXSTR *log)
- [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint="ejdbqryexecute")]
+ [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint = "ejdbqryexecute", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr _ejdbqryexecute([In] IntPtr jcoll, [In] IntPtr q, out int count, [In] int qflags, [In] IntPtr logxstr);
//EJDB_EXPORT TCXSTR *tcxstrnew(void)
- [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint="tcxstrnew")]
+ [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint = "tcxstrnew", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr _tcxstrnew();
//EJDB_EXPORT void tcxstrdel(TCXSTR *xstr);
- [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint="tcxstrdel")]
+ [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint = "tcxstrdel", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr _tcxstrdel([In] IntPtr strptr);
//EJDB_EXPORT int tcxstrsize(const TCXSTR *xstr);
- [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint="tcxstrsize")]
+ [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint = "tcxstrsize", CallingConvention = CallingConvention.Cdecl)]
static extern int _tcxstrsize([In] IntPtr strptr);
//EJDB_EXPORT int tcxstrptr(const TCXSTR *xstr);
- [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint="tcxstrptr")]
+ [DllImport(EJDB.EJDB_LIB_NAME, EntryPoint = "tcxstrptr", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr _tcxstrptr([In] IntPtr strptr);
#endregion
/// <summary>
--- /dev/null
+//------------------------------------------------------------------------------
+// <auto-generated>
+// Этот код создан программой.
+// Исполняемая версия:4.0.30319.18052
+//
+// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+// повторной генерации кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Ejdb.Properties {
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default {
+ get {
+ return defaultInstance;
+ }
+ }
+ }
+}
--- /dev/null
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
+ <Profiles />
+ <Settings />
+</SettingsFile>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+ <configSections>
+ </configSections>
+</configuration>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">DebugUnix</Configuration>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
+ <PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseWindows|AnyCPU' ">
<DebugType>none</DebugType>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<DefineConstants>EJDBDLL;</DefineConstants>
+ <PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<ItemGroup>
+ <Reference Include="nunit.framework">
+ <HintPath>lib\nunit.framework.dll</HintPath>
+ </Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="Mono.Posix" />
- <Reference Include="nunit.framework, Version=2.6.0.12051, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
- <Private>False</Private>
- </Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="Ejdb.DB\EJDBQCursor.cs" />
<Compile Include="Ejdb.BSON\BSONull.cs" />
<Compile Include="Ejdb.BSON\BSONUndefined.cs" />
+ <Compile Include="Properties\Settings.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTimeSharedInput>True</DesignTimeSharedInput>
+ <DependentUpon>Settings.settings</DependentUpon>
+ </Compile>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
- <Folder Include="Ejdb.DB\" />
- <Folder Include="Ejdb.Tests\" />
- <Folder Include="Ejdb.IO\" />
- <Folder Include="Ejdb.Utils\" />
- <Folder Include="Ejdb.BSON\" />
+ <None Include="app.config" />
+ <None Include="Properties\Settings.settings">
+ <Generator>SettingsSingleFileGenerator</Generator>
+ <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+ </None>
</ItemGroup>
<ProjectExtensions>
<MonoDevelop>
}
q.Dispose();
jb.Dispose();
+ Console.ReadKey();
}
}
}
--- /dev/null
+//------------------------------------------------------------------------------
+// <auto-generated>
+// Этот код создан программой.
+// Исполняемая версия:4.0.30319.18052
+//
+// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+// повторной генерации кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace sample.Properties {
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default {
+ get {
+ return defaultInstance;
+ }
+ }
+ }
+}
--- /dev/null
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
+ <Profiles />
+ <Settings />
+</SettingsFile>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+ <configSections>
+ </configSections>
+</configuration>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">DebugWindows</Configuration>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Externalconsole>true</Externalconsole>
+ <PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseWindows|AnyCPU' ">
<DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Externalconsole>true</Externalconsole>
+ <PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugUnix|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Properties\Settings.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTimeSharedInput>True</DesignTimeSharedInput>
+ <DependentUpon>Settings.settings</DependentUpon>
+ </Compile>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<Name>nejdb</Name>
</ProjectReference>
</ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ <None Include="Properties\Settings.settings">
+ <Generator>SettingsSingleFileGenerator</Generator>
+ <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+ </None>
+ </ItemGroup>
</Project>
\ No newline at end of file