summaryrefslogtreecommitdiff
path: root/nejdb
diff options
context:
space:
mode:
authoradam <anton@adamansky.com>2013-06-21 16:26:30 +0700
committeradam <anton@adamansky.com>2013-06-21 16:26:30 +0700
commit7eb53795347bca328f5f03a0fe6e6ac0b4aaf79e (patch)
tree8f9b60c168e99822cad333f617e79b1c94a8bd0d /nejdb
parent3cd041f3099235533e5d85419c00199f125874a4 (diff)
downloadejdb-7eb53795347bca328f5f03a0fe6e6ac0b4aaf79e.tar.gz
ejdb-7eb53795347bca328f5f03a0fe6e6ac0b4aaf79e.tar.bz2
ejdb-7eb53795347bca328f5f03a0fe6e6ac0b4aaf79e.zip
#24
Diffstat (limited to 'nejdb')
-rw-r--r--nejdb/Ejdb.DB/EJDB.cs16
-rw-r--r--nejdb/nejdb.csproj5
-rw-r--r--nejdb/nejdb.userprefs16
3 files changed, 20 insertions, 17 deletions
diff --git a/nejdb/Ejdb.DB/EJDB.cs b/nejdb/Ejdb.DB/EJDB.cs
index 3f6e005..be03d99 100644
--- a/nejdb/Ejdb.DB/EJDB.cs
+++ b/nejdb/Ejdb.DB/EJDB.cs
@@ -138,11 +138,11 @@ namespace Ejdb.DB {
/// <summary>
/// Name if EJDB library
/// </summary>
- #if EJDBDLL
+#if EJDBDLL
public const string EJDB_LIB_NAME = "tcejdbdll";
#else
public const string EJDB_LIB_NAME = "tcejdb";
- #endif
+#endif
/// <summary>
/// Pointer to the native EJDB instance.
/// </summary>
@@ -194,12 +194,20 @@ namespace Ejdb.DB {
}
[DllImport(EJDB_LIB_NAME, EntryPoint="ejdbcreatecoll")]
- internal static extern IntPtr _ejdbcreatecoll([In] IntPtr db, [In] IntPtr cname, ref EJDBCollectionOptionsN? opts);
+ internal static extern IntPtr _ejdbcreatecoll([In] IntPtr db, [In] IntPtr cname, IntPtr opts);
+
+ [DllImport(EJDB_LIB_NAME, EntryPoint="ejdbcreatecoll")]
+ internal static extern IntPtr _ejdbcreatecoll([In] IntPtr db, [In] IntPtr cname, ref EJDBCollectionOptionsN opts);
internal static IntPtr _ejdbcreatecoll(IntPtr db, String cname, EJDBCollectionOptionsN? opts) {
IntPtr cptr = UnixMarshal.StringToHeap(cname, Encoding.UTF8);
try {
- return _ejdbcreatecoll(db, cptr, ref opts);
+ if (opts == null) {
+ return _ejdbcreatecoll(db, cptr, IntPtr.Zero);
+ } else {
+ EJDBCollectionOptionsN nopts = (EJDBCollectionOptionsN) opts;
+ return _ejdbcreatecoll(db, cptr, ref nopts);
+ }
} finally {
UnixMarshal.FreeHeap(cptr);
}
diff --git a/nejdb/nejdb.csproj b/nejdb/nejdb.csproj
index 4d4b040..15b1787 100644
--- a/nejdb/nejdb.csproj
+++ b/nejdb/nejdb.csproj
@@ -54,10 +54,11 @@
<Reference Include="System" />
<Reference Include="nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
<Private>False</Private>
+ <SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="System.Core" />
- <Reference Include="Mono.Posix">
- <HintPath>lib\Mono.Posix.dll</HintPath>
+ <Reference Include="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756">
+ <Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
diff --git a/nejdb/nejdb.userprefs b/nejdb/nejdb.userprefs
index 6afa03e..8605c13 100644
--- a/nejdb/nejdb.userprefs
+++ b/nejdb/nejdb.userprefs
@@ -1,13 +1,10 @@
<Properties>
- <MonoDevelop.Ide.Workspace ActiveConfiguration="DebugUnix" />
- <MonoDevelop.Ide.Workbench ActiveDocument="Ejdb.DB/EJDB.cs">
+ <MonoDevelop.Ide.Workspace ActiveConfiguration="DebugWindows" />
+ <MonoDevelop.Ide.Workbench ActiveDocument="Ejdb.DB\EJDB.cs">
<Files>
- <File FileName="Ejdb.DB/EJDB.cs" Line="356" Column="17" />
- <File FileName="Ejdb.BSON/BSONDocument.cs" Line="1" Column="1" />
- <File FileName="Ejdb.Tests/TestEJDB.cs" Line="28" Column="19" />
- <File FileName="Ejdb.BSON/BSONType.cs" Line="1" Column="1" />
- <File FileName="Ejdb.IO/ExtBinaryReader.cs" Line="48" Column="12" />
- <File FileName="Ejdb.IO/ExtBinaryWriter.cs" Line="41" Column="4" />
+ <File FileName="Ejdb.DB\EJDB.cs" Line="199" Column="58" />
+ <File FileName="c:\Projects\ejdb\nejdb\Ejdb.Tests\TestBSON.cs" Line="1" Column="1" />
+ <File FileName="Ejdb.Tests\TestEJDB.cs" Line="1" Column="1" />
</Files>
<Pads>
<Pad Id="ProjectPad">
@@ -33,9 +30,6 @@
<Pad Id="MonoDevelop.Debugger.WatchPad">
<State />
</Pad>
- <Pad Id="ConnectionManagerPad">
- <State selected="True" />
- </Pad>
<Pad Id="MonoDevelop.NUnit.TestPad">
<State expanded="True" selected="True">
<Node name="nejdb" expanded="True">