From cc0af2318660ff292868e9f14cf0d61dd5d6ac00 Mon Sep 17 00:00:00 2001 From: adam Date: Fri, 14 Jun 2013 13:13:21 +0700 Subject: [PATCH] #24 --- nejdb/Ejdb.BS/BSONMarshaller.cs | 11 -------- nejdb/{Ejdb.SON => Ejdb.BSON}/BSONArray.cs | 2 +- nejdb/{Ejdb.SON => Ejdb.BSON}/BSONBinData.cs | 2 +- nejdb/{Ejdb.SON => Ejdb.BSON}/BSONCodeWScope.cs | 2 +- nejdb/{Ejdb.SON => Ejdb.BSON}/BSONConstants.cs | 2 +- nejdb/{Ejdb.SON => Ejdb.BSON}/BSONDocument.cs | 16 +++++------ nejdb/{Ejdb.SON => Ejdb.BSON}/BSONIterator.cs | 2 +- nejdb/{Ejdb.SON => Ejdb.BSON}/BSONOid.cs | 2 +- nejdb/{Ejdb.SON => Ejdb.BSON}/BSONRegexp.cs | 2 +- nejdb/{Ejdb.SON => Ejdb.BSON}/BSONTimestamp.cs | 2 +- nejdb/{Ejdb.SON => Ejdb.BSON}/BSONType.cs | 2 +- nejdb/{Ejdb.SON => Ejdb.BSON}/BSONValue.cs | 2 +- nejdb/{Ejdb.SON => Ejdb.BSON}/IBSONValue.cs | 2 +- .../InvalidBSONDataException.cs | 2 +- nejdb/Ejdb.Bson/BSONMarshaller.cs | 11 -------- nejdb/Ejdb.Db/EJDB.cs | 11 -------- nejdb/Ejdb.JSON/JSONReader.cs | 25 +++++++++++++++++ nejdb/Ejdb.Tests/TestBSON.cs | 2 +- nejdb/NEJDB.BSON/BSONMarshaller.cs | 10 ------- nejdb/NEJDB.DB/EJDB.cs | 10 ------- nejdb/nejdb.csproj | 31 ++++++++++++---------- nejdb/nejdb.userprefs | 31 +++++++--------------- 22 files changed, 72 insertions(+), 110 deletions(-) delete mode 100644 nejdb/Ejdb.BS/BSONMarshaller.cs rename nejdb/{Ejdb.SON => Ejdb.BSON}/BSONArray.cs (99%) rename nejdb/{Ejdb.SON => Ejdb.BSON}/BSONBinData.cs (98%) rename nejdb/{Ejdb.SON => Ejdb.BSON}/BSONCodeWScope.cs (98%) rename nejdb/{Ejdb.SON => Ejdb.BSON}/BSONConstants.cs (98%) rename nejdb/{Ejdb.SON => Ejdb.BSON}/BSONDocument.cs (97%) rename nejdb/{Ejdb.SON => Ejdb.BSON}/BSONIterator.cs (99%) rename nejdb/{Ejdb.SON => Ejdb.BSON}/BSONOid.cs (99%) rename nejdb/{Ejdb.SON => Ejdb.BSON}/BSONRegexp.cs (98%) rename nejdb/{Ejdb.SON => Ejdb.BSON}/BSONTimestamp.cs (98%) rename nejdb/{Ejdb.SON => Ejdb.BSON}/BSONType.cs (98%) rename nejdb/{Ejdb.SON => Ejdb.BSON}/BSONValue.cs (99%) rename nejdb/{Ejdb.SON => Ejdb.BSON}/IBSONValue.cs (98%) rename nejdb/{Ejdb.SON => Ejdb.BSON}/InvalidBSONDataException.cs (98%) delete mode 100644 nejdb/Ejdb.Bson/BSONMarshaller.cs delete mode 100644 nejdb/Ejdb.Db/EJDB.cs create mode 100644 nejdb/Ejdb.JSON/JSONReader.cs delete mode 100644 nejdb/NEJDB.BSON/BSONMarshaller.cs delete mode 100644 nejdb/NEJDB.DB/EJDB.cs diff --git a/nejdb/Ejdb.BS/BSONMarshaller.cs b/nejdb/Ejdb.BS/BSONMarshaller.cs deleted file mode 100644 index 72a890c..0000000 --- a/nejdb/Ejdb.BS/BSONMarshaller.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; - -namespace Ejdb.Bson { - - public class BSONMarshaller { - - public BSONMarshaller() { - } - } -} - diff --git a/nejdb/Ejdb.SON/BSONArray.cs b/nejdb/Ejdb.BSON/BSONArray.cs similarity index 99% rename from nejdb/Ejdb.SON/BSONArray.cs rename to nejdb/Ejdb.BSON/BSONArray.cs index 1fd10ed..f03f63d 100644 --- a/nejdb/Ejdb.SON/BSONArray.cs +++ b/nejdb/Ejdb.BSON/BSONArray.cs @@ -15,7 +15,7 @@ // ============================================================================================ using System; -namespace Ejdb.SON { +namespace Ejdb.BSON { [Serializable] public class BSONArray : BSONDocument { diff --git a/nejdb/Ejdb.SON/BSONBinData.cs b/nejdb/Ejdb.BSON/BSONBinData.cs similarity index 98% rename from nejdb/Ejdb.SON/BSONBinData.cs rename to nejdb/Ejdb.BSON/BSONBinData.cs index f47b2b4..7aa9e45 100644 --- a/nejdb/Ejdb.SON/BSONBinData.cs +++ b/nejdb/Ejdb.BSON/BSONBinData.cs @@ -16,7 +16,7 @@ using System; using System.IO; -namespace Ejdb.SON { +namespace Ejdb.BSON { [Serializable] public sealed class BSONBinData { diff --git a/nejdb/Ejdb.SON/BSONCodeWScope.cs b/nejdb/Ejdb.BSON/BSONCodeWScope.cs similarity index 98% rename from nejdb/Ejdb.SON/BSONCodeWScope.cs rename to nejdb/Ejdb.BSON/BSONCodeWScope.cs index a5ebd4c..8ece275 100644 --- a/nejdb/Ejdb.SON/BSONCodeWScope.cs +++ b/nejdb/Ejdb.BSON/BSONCodeWScope.cs @@ -15,7 +15,7 @@ // ============================================================================================ using System; -namespace Ejdb.SON { +namespace Ejdb.BSON { [Serializable] public sealed class BSONCodeWScope : BSONDocument { diff --git a/nejdb/Ejdb.SON/BSONConstants.cs b/nejdb/Ejdb.BSON/BSONConstants.cs similarity index 98% rename from nejdb/Ejdb.SON/BSONConstants.cs rename to nejdb/Ejdb.BSON/BSONConstants.cs index daf47b5..a686af2 100644 --- a/nejdb/Ejdb.SON/BSONConstants.cs +++ b/nejdb/Ejdb.BSON/BSONConstants.cs @@ -15,7 +15,7 @@ // ============================================================================================ using System; -namespace Ejdb.SON { +namespace Ejdb.BSON { /// /// Various BSON processing constants and shared values. diff --git a/nejdb/Ejdb.SON/BSONDocument.cs b/nejdb/Ejdb.BSON/BSONDocument.cs similarity index 97% rename from nejdb/Ejdb.SON/BSONDocument.cs rename to nejdb/Ejdb.BSON/BSONDocument.cs index f347ad6..55e46f7 100644 --- a/nejdb/Ejdb.SON/BSONDocument.cs +++ b/nejdb/Ejdb.BSON/BSONDocument.cs @@ -19,11 +19,11 @@ using System.IO; using System.Text; using System.Diagnostics; using Ejdb.IO; -using Ejdb.SON; +using Ejdb.BSON; using Ejdb.Utils; using System.Reflection; -namespace Ejdb.SON { +namespace Ejdb.BSON { /// /// BSON document deserialized data wrapper. @@ -64,7 +64,7 @@ namespace Ejdb.SON { /// BSON Type this document. /// /// - /// Type can be either or + /// Type can be either or /// /// The type of the BSON. public virtual BSONType BSONType { @@ -154,7 +154,7 @@ namespace Ejdb.SON { /// Gets the field value. /// /// The BSON value. - /// + /// /// Document field name public BSONValue GetBSONValue(string key) { CheckFields(); @@ -170,21 +170,21 @@ namespace Ejdb.SON { /// Gets the field value object. /// /// The object value. - /// + /// /// Key. /// Key object or null if the key is not exists or value type is either - /// or + /// or public object GetObjectValue(string key) { var bv = GetBSONValue(key); return bv != null ? bv.Value : null; } /// - /// Gets the with the specified key. + /// Gets the with the specified key. /// /// Key. /// Key object or null if the key is not exists or value type is either - /// or + /// or public object this[string key] { get { return GetObjectValue(key); diff --git a/nejdb/Ejdb.SON/BSONIterator.cs b/nejdb/Ejdb.BSON/BSONIterator.cs similarity index 99% rename from nejdb/Ejdb.SON/BSONIterator.cs rename to nejdb/Ejdb.BSON/BSONIterator.cs index afd9460..615a48f 100644 --- a/nejdb/Ejdb.SON/BSONIterator.cs +++ b/nejdb/Ejdb.BSON/BSONIterator.cs @@ -19,7 +19,7 @@ using System.Diagnostics; using System.IO; using Ejdb.IO; -namespace Ejdb.SON { +namespace Ejdb.BSON { public class BSONIterator : IDisposable { diff --git a/nejdb/Ejdb.SON/BSONOid.cs b/nejdb/Ejdb.BSON/BSONOid.cs similarity index 99% rename from nejdb/Ejdb.SON/BSONOid.cs rename to nejdb/Ejdb.BSON/BSONOid.cs index 42289ec..0afe745 100644 --- a/nejdb/Ejdb.SON/BSONOid.cs +++ b/nejdb/Ejdb.BSON/BSONOid.cs @@ -17,7 +17,7 @@ using System; using System.Text; using System.IO; -namespace Ejdb.SON { +namespace Ejdb.BSON { [Serializable] public sealed class BSONOid : IComparable, IBSONValue { diff --git a/nejdb/Ejdb.SON/BSONRegexp.cs b/nejdb/Ejdb.BSON/BSONRegexp.cs similarity index 98% rename from nejdb/Ejdb.SON/BSONRegexp.cs rename to nejdb/Ejdb.BSON/BSONRegexp.cs index 23ee8e4..a66cafb 100644 --- a/nejdb/Ejdb.SON/BSONRegexp.cs +++ b/nejdb/Ejdb.BSON/BSONRegexp.cs @@ -15,7 +15,7 @@ // ============================================================================================ using System; -namespace Ejdb.SON { +namespace Ejdb.BSON { /// /// BSON Regexp complex value. diff --git a/nejdb/Ejdb.SON/BSONTimestamp.cs b/nejdb/Ejdb.BSON/BSONTimestamp.cs similarity index 98% rename from nejdb/Ejdb.SON/BSONTimestamp.cs rename to nejdb/Ejdb.BSON/BSONTimestamp.cs index 763acf8..e0cf39a 100644 --- a/nejdb/Ejdb.SON/BSONTimestamp.cs +++ b/nejdb/Ejdb.BSON/BSONTimestamp.cs @@ -15,7 +15,7 @@ // ============================================================================================ using System; -namespace Ejdb.SON { +namespace Ejdb.BSON { /// /// BSON Timestamp complex value. diff --git a/nejdb/Ejdb.SON/BSONType.cs b/nejdb/Ejdb.BSON/BSONType.cs similarity index 98% rename from nejdb/Ejdb.SON/BSONType.cs rename to nejdb/Ejdb.BSON/BSONType.cs index 692449d..e7c7498 100644 --- a/nejdb/Ejdb.SON/BSONType.cs +++ b/nejdb/Ejdb.BSON/BSONType.cs @@ -13,7 +13,7 @@ // if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, // Boston, MA 02111-1307 USA. // ============================================================================================ -namespace Ejdb.SON { +namespace Ejdb.BSON { /** BSON types according to the bsonspec (http://bsonspec.org/) */ diff --git a/nejdb/Ejdb.SON/BSONValue.cs b/nejdb/Ejdb.BSON/BSONValue.cs similarity index 99% rename from nejdb/Ejdb.SON/BSONValue.cs rename to nejdb/Ejdb.BSON/BSONValue.cs index 9f3c77f..c8a6183 100644 --- a/nejdb/Ejdb.SON/BSONValue.cs +++ b/nejdb/Ejdb.BSON/BSONValue.cs @@ -15,7 +15,7 @@ // ============================================================================================ using System; -namespace Ejdb.SON { +namespace Ejdb.BSON { /// /// BSON field value. diff --git a/nejdb/Ejdb.SON/IBSONValue.cs b/nejdb/Ejdb.BSON/IBSONValue.cs similarity index 98% rename from nejdb/Ejdb.SON/IBSONValue.cs rename to nejdb/Ejdb.BSON/IBSONValue.cs index b4eb490..0c426f9 100644 --- a/nejdb/Ejdb.SON/IBSONValue.cs +++ b/nejdb/Ejdb.BSON/IBSONValue.cs @@ -14,7 +14,7 @@ // Boston, MA 02111-1307 USA. // ============================================================================================ -namespace Ejdb.SON { +namespace Ejdb.BSON { /// /// Base interface of any BSON complex values like Regexp or BSON Timestamp. diff --git a/nejdb/Ejdb.SON/InvalidBSONDataException.cs b/nejdb/Ejdb.BSON/InvalidBSONDataException.cs similarity index 98% rename from nejdb/Ejdb.SON/InvalidBSONDataException.cs rename to nejdb/Ejdb.BSON/InvalidBSONDataException.cs index d832a8e..067ab4a 100644 --- a/nejdb/Ejdb.SON/InvalidBSONDataException.cs +++ b/nejdb/Ejdb.BSON/InvalidBSONDataException.cs @@ -15,7 +15,7 @@ // ============================================================================================ using System; -namespace Ejdb.SON { +namespace Ejdb.BSON { /** Invalid BSON binary data. */ diff --git a/nejdb/Ejdb.Bson/BSONMarshaller.cs b/nejdb/Ejdb.Bson/BSONMarshaller.cs deleted file mode 100644 index 78014a0..0000000 --- a/nejdb/Ejdb.Bson/BSONMarshaller.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; - -namespace NEJDB.BSON { - - public class BSONMarshaller { - - public BSONMarshaller() { - } - } -} - diff --git a/nejdb/Ejdb.Db/EJDB.cs b/nejdb/Ejdb.Db/EJDB.cs deleted file mode 100644 index 3aa69ab..0000000 --- a/nejdb/Ejdb.Db/EJDB.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; - -namespace NEJDB.DB { - - public class EJDB { - - public EJDB() { - } - } -} - diff --git a/nejdb/Ejdb.JSON/JSONReader.cs b/nejdb/Ejdb.JSON/JSONReader.cs new file mode 100644 index 0000000..7fc3fd2 --- /dev/null +++ b/nejdb/Ejdb.JSON/JSONReader.cs @@ -0,0 +1,25 @@ +// ============================================================================================ +// .NET API for EJDB database library http://ejdb.org +// Copyright (C) 2012-2013 Softmotions Ltd +// +// This file is part of EJDB. +// EJDB is free software; you can redistribute it and/or modify it under the terms of +// the GNU Lesser General Public License as published by the Free Software Foundation; either +// version 2.1 of the License or any later version. EJDB is distributed in the hope +// that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +// License for more details. +// You should have received a copy of the GNU Lesser General Public License along with EJDB; +// if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, +// Boston, MA 02111-1307 USA. +// ============================================================================================ +using System; + +namespace Ejdb.JSON { + + public class JSONReader { + public JSONReader() { + } + } +} + diff --git a/nejdb/Ejdb.Tests/TestBSON.cs b/nejdb/Ejdb.Tests/TestBSON.cs index dbda582..b376c11 100644 --- a/nejdb/Ejdb.Tests/TestBSON.cs +++ b/nejdb/Ejdb.Tests/TestBSON.cs @@ -15,7 +15,7 @@ // ============================================================================================ using System; using NUnit.Framework; -using Ejdb.SON; +using Ejdb.BSON; using System.IO; namespace Ejdb.Tests { diff --git a/nejdb/NEJDB.BSON/BSONMarshaller.cs b/nejdb/NEJDB.BSON/BSONMarshaller.cs deleted file mode 100644 index 9908ba8..0000000 --- a/nejdb/NEJDB.BSON/BSONMarshaller.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; - -namespace nejdb { - - public class BSONMarshaller { - public BSONMarshaller() { - } - } -} - diff --git a/nejdb/NEJDB.DB/EJDB.cs b/nejdb/NEJDB.DB/EJDB.cs deleted file mode 100644 index 8d964da..0000000 --- a/nejdb/NEJDB.DB/EJDB.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; - -namespace nejdb { - - public class EJDB { - public EJDB() { - } - } -} - diff --git a/nejdb/nejdb.csproj b/nejdb/nejdb.csproj index f1df5fd..a374e15 100644 --- a/nejdb/nejdb.csproj +++ b/nejdb/nejdb.csproj @@ -37,35 +37,38 @@ False + - - - - - - - - - - - - - + + + + + + + + + + + + + + - + + diff --git a/nejdb/nejdb.userprefs b/nejdb/nejdb.userprefs index ac691f6..e1007b3 100644 --- a/nejdb/nejdb.userprefs +++ b/nejdb/nejdb.userprefs @@ -1,14 +1,10 @@  - + - - - - - - - + + + @@ -16,12 +12,13 @@ + - - - + + + @@ -35,17 +32,7 @@ - - - - - - - - - - - + -- 2.7.4