Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/MongoDB.Bson/Exceptions/BsonException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/

using System;
#if NET452
#if NET452 || NETSTANDARD2_0
using System.Runtime.Serialization;
#endif

Expand All @@ -23,7 +23,7 @@ namespace MongoDB.Bson
/// <summary>
/// Represents a BSON exception.
/// </summary>
#if NET452
#if NET452 || NETSTANDARD2_0
[Serializable]
#endif
public class BsonException : Exception
Expand Down Expand Up @@ -66,7 +66,7 @@ public BsonException(string format, params object[] args)
{
}

#if NET452
#if NET452 || NETSTANDARD2_0
/// <summary>
/// Initializes a new instance of the BsonException class (this overload used by deserialization).
/// </summary>
Expand Down
6 changes: 3 additions & 3 deletions src/MongoDB.Bson/Exceptions/BsonInternalException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/

using System;
#if NET452
#if NET452 || NETSTANDARD2_0
using System.Runtime.Serialization;
#endif

Expand All @@ -23,7 +23,7 @@ namespace MongoDB.Bson
/// <summary>
/// Represents a BSON internal exception (almost surely the result of a bug).
/// </summary>
#if NET452
#if NET452 || NETSTANDARD2_0
[Serializable]
#endif
public class BsonInternalException : BsonException
Expand Down Expand Up @@ -56,7 +56,7 @@ public BsonInternalException(string message, Exception innerException)
{
}

#if NET452
#if NET452 || NETSTANDARD2_0
/// <summary>
/// Initializes a new instance of the BsonInternalException class (this overload used by deserialization).
/// </summary>
Expand Down
6 changes: 3 additions & 3 deletions src/MongoDB.Bson/Exceptions/BsonSerializationException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/

using System;
#if NET452
#if NET452 || NETSTANDARD2_0
using System.Runtime.Serialization;
#endif

Expand All @@ -23,7 +23,7 @@ namespace MongoDB.Bson
/// <summary>
/// Represents a BSON serialization exception.
/// </summary>
#if NET452
#if NET452 || NETSTANDARD2_0
[Serializable]
#endif
public class BsonSerializationException : BsonException
Expand Down Expand Up @@ -56,7 +56,7 @@ public BsonSerializationException(string message, Exception innerException)
{
}

#if NET452
#if NET452 || NETSTANDARD2_0
/// <summary>
/// Initializes a new instance of the BsonSerializationException class (this overload used by deserialization).
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace MongoDB.Bson
/// <summary>
/// Indicates that an attribute restricted to one member has been applied to multiple members.
/// </summary>
#if NET452
#if NET452 || NETSTANDARD2_0
[Serializable]
#endif
public class DuplicateBsonMemberMapAttributeException : BsonException
Expand All @@ -45,7 +45,7 @@ public DuplicateBsonMemberMapAttributeException(string message, Exception inner)
{
}

#if NET452
#if NET452 || NETSTANDARD2_0
/// <summary>
/// Initializes a new instance of the <see cref="DuplicateBsonMemberMapAttributeException" /> class.
/// </summary>
Expand Down
6 changes: 3 additions & 3 deletions src/MongoDB.Bson/Exceptions/TruncationException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/

using System;
#if NET452
#if NET452 || NETSTANDARD2_0
using System.Runtime.Serialization;
#endif

Expand All @@ -23,7 +23,7 @@ namespace MongoDB.Bson
/// <summary>
/// Represents a truncation exception.
/// </summary>
#if NET452
#if NET452 || NETSTANDARD2_0
[Serializable]
#endif
public class TruncationException : BsonException
Expand Down Expand Up @@ -56,7 +56,7 @@ public TruncationException(string message, Exception innerException)
{
}

#if NET452
#if NET452 || NETSTANDARD2_0
/// <summary>
/// Initializes a new instance of the TruncationException class (this overload used by deserialization).
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion src/MongoDB.Bson/IO/BsonBinaryReaderSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace MongoDB.Bson.IO
/// <summary>
/// Represents settings for a BsonBinaryReader.
/// </summary>
#if NET452
#if NET452 || NETSTANDARD2_0
[Serializable]
#endif
public class BsonBinaryReaderSettings : BsonReaderSettings
Expand Down
2 changes: 1 addition & 1 deletion src/MongoDB.Bson/IO/BsonBinaryWriterSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace MongoDB.Bson.IO
/// <summary>
/// Represents settings for a BsonBinaryWriter.
/// </summary>
#if NET452
#if NET452 || NETSTANDARD2_0
[Serializable]
#endif
public class BsonBinaryWriterSettings : BsonWriterSettings
Expand Down
2 changes: 1 addition & 1 deletion src/MongoDB.Bson/IO/BsonDocumentReaderSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace MongoDB.Bson.IO
/// <summary>
/// Represents settings for a BsonDocumentReader.
/// </summary>
#if NET452
#if NET452 || NETSTANDARD2_0
[Serializable]
#endif
public class BsonDocumentReaderSettings : BsonReaderSettings
Expand Down
2 changes: 1 addition & 1 deletion src/MongoDB.Bson/IO/BsonDocumentWriterSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace MongoDB.Bson.IO
/// <summary>
/// Represents settings for a BsonDocumentWriter.
/// </summary>
#if NET452
#if NET452 || NETSTANDARD2_0
[Serializable]
#endif
public class BsonDocumentWriterSettings : BsonWriterSettings
Expand Down
2 changes: 1 addition & 1 deletion src/MongoDB.Bson/IO/BsonReaderSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace MongoDB.Bson.IO
/// <summary>
/// Represents settings for a BsonReader.
/// </summary>
#if NET452
#if NET452 || NETSTANDARD2_0
[Serializable]
#endif
public abstract class BsonReaderSettings
Expand Down
10 changes: 5 additions & 5 deletions src/MongoDB.Bson/IO/BsonStreamAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public override int WriteTimeout
}

// methods
#if NET452
#if NET452 || NETSTANDARD2_0
/// <inheritdoc/>
public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
{
Expand All @@ -173,7 +173,7 @@ public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, Asy
}
#endif

#if NET452
#if NET452 || NETSTANDARD2_0
/// <inheritdoc/>
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
{
Expand All @@ -182,7 +182,7 @@ public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, As
}
#endif

#if NET452
#if NET452 || NETSTANDARD2_0
/// <inheritdoc/>
public override void Close()
{
Expand Down Expand Up @@ -214,7 +214,7 @@ protected override void Dispose(bool disposing)
base.Dispose(disposing);
}

#if NET452
#if NET452 || NETSTANDARD2_0
/// <inheritdoc/>
public override int EndRead(IAsyncResult asyncResult)
{
Expand All @@ -223,7 +223,7 @@ public override int EndRead(IAsyncResult asyncResult)
}
#endif

#if NET452
#if NET452 || NETSTANDARD2_0
/// <inheritdoc/>
public override void EndWrite(IAsyncResult asyncResult)
{
Expand Down
2 changes: 1 addition & 1 deletion src/MongoDB.Bson/IO/BsonWriterSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace MongoDB.Bson.IO
/// <summary>
/// Represents settings for a BsonWriter.
/// </summary>
#if NET452
#if NET452 || NETSTANDARD2_0
[Serializable]
#endif
public abstract class BsonWriterSettings
Expand Down
2 changes: 1 addition & 1 deletion src/MongoDB.Bson/IO/JsonReaderSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace MongoDB.Bson.IO
/// <summary>
/// Represents settings for a JsonReader.
/// </summary>
#if NET452
#if NET452 || NETSTANDARD2_0
[Serializable]
#endif
public class JsonReaderSettings : BsonReaderSettings
Expand Down
2 changes: 1 addition & 1 deletion src/MongoDB.Bson/IO/JsonWriterSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace MongoDB.Bson.IO
/// <summary>
/// Represents settings for a JsonWriter.
/// </summary>
#if NET452
#if NET452 || NETSTANDARD2_0
[Serializable]
#endif
public class JsonWriterSettings : BsonWriterSettings
Expand Down
2 changes: 1 addition & 1 deletion src/MongoDB.Bson/MongoDB.Bson.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard1.5;net452</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard1.5;net452</TargetFrameworks>
<LangVersion>7.3</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
Expand Down
2 changes: 1 addition & 1 deletion src/MongoDB.Bson/ObjectModel/BsonArray.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace MongoDB.Bson
/// <summary>
/// Represents a BSON array.
/// </summary>
#if NET452
#if NET452 || NETSTANDARD2_0
[Serializable]
#endif
public class BsonArray : BsonValue, IComparable<BsonArray>, IEquatable<BsonArray>, IList<BsonValue>
Expand Down
2 changes: 1 addition & 1 deletion src/MongoDB.Bson/ObjectModel/BsonBinaryData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace MongoDB.Bson
/// <summary>
/// Represents BSON binary data.
/// </summary>
#if NET452
#if NET452 || NETSTANDARD2_0
[Serializable]
#endif
public class BsonBinaryData : BsonValue, IComparable<BsonBinaryData>, IEquatable<BsonBinaryData>
Expand Down
2 changes: 1 addition & 1 deletion src/MongoDB.Bson/ObjectModel/BsonBinarySubType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace MongoDB.Bson
/// <summary>
/// Represents the binary data subtype of a BsonBinaryData.
/// </summary>
#if NET452
#if NET452 || NETSTANDARD2_0
[Serializable]
#endif
public enum BsonBinarySubType
Expand Down
2 changes: 1 addition & 1 deletion src/MongoDB.Bson/ObjectModel/BsonBoolean.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace MongoDB.Bson
/// <summary>
/// Represents a BSON boolean value.
/// </summary>
#if NET452
#if NET452 || NETSTANDARD2_0
[Serializable]
#endif
public class BsonBoolean : BsonValue, IComparable<BsonBoolean>, IEquatable<BsonBoolean>
Expand Down
2 changes: 1 addition & 1 deletion src/MongoDB.Bson/ObjectModel/BsonDateTime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace MongoDB.Bson
/// <summary>
/// Represents a BSON DateTime value.
/// </summary>
#if NET452
#if NET452 || NETSTANDARD2_0
[Serializable]
#endif
public class BsonDateTime : BsonValue, IComparable<BsonDateTime>, IEquatable<BsonDateTime>
Expand Down
2 changes: 1 addition & 1 deletion src/MongoDB.Bson/ObjectModel/BsonDecimal128.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace MongoDB.Bson
/// Represents a BSON Decimal128 value.
/// </summary>
/// <seealso cref="MongoDB.Bson.BsonValue" />
#if NET452
#if NET452 || NETSTANDARD2_0
[Serializable]
#endif
public class BsonDecimal128 : BsonValue, IComparable<BsonDecimal128>, IEquatable<BsonDecimal128>
Expand Down
2 changes: 1 addition & 1 deletion src/MongoDB.Bson/ObjectModel/BsonDocument.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace MongoDB.Bson
/// <summary>
/// Represents a BSON document.
/// </summary>
#if NET452
#if NET452 || NETSTANDARD2_0
[Serializable]
#endif
public class BsonDocument : BsonValue, IComparable<BsonDocument>, IConvertibleToBsonDocument, IEnumerable<BsonElement>, IEquatable<BsonDocument>
Expand Down
2 changes: 1 addition & 1 deletion src/MongoDB.Bson/ObjectModel/BsonDouble.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace MongoDB.Bson
/// Represents a BSON double value.
/// </summary>
/// <seealso cref="MongoDB.Bson.BsonValue" />
#if NET452
#if NET452 || NETSTANDARD2_0
[Serializable]
#endif
public class BsonDouble : BsonValue, IComparable<BsonDouble>, IEquatable<BsonDouble>
Expand Down
2 changes: 1 addition & 1 deletion src/MongoDB.Bson/ObjectModel/BsonElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace MongoDB.Bson
/// <summary>
/// Represents a BSON element.
/// </summary>
#if NET452
#if NET452 || NETSTANDARD2_0
[Serializable]
#endif
public struct BsonElement : IComparable<BsonElement>, IEquatable<BsonElement>
Expand Down
2 changes: 1 addition & 1 deletion src/MongoDB.Bson/ObjectModel/BsonInt32.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace MongoDB.Bson
/// <summary>
/// Represents a BSON int value.
/// </summary>
#if NET452
#if NET452 || NETSTANDARD2_0
[Serializable]
#endif
public class BsonInt32 : BsonValue, IComparable<BsonInt32>, IEquatable<BsonInt32>
Expand Down
2 changes: 1 addition & 1 deletion src/MongoDB.Bson/ObjectModel/BsonInt64.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace MongoDB.Bson
/// <summary>
/// Represents a BSON long value.
/// </summary>
#if NET452
#if NET452 || NETSTANDARD2_0
[Serializable]
#endif
public class BsonInt64 : BsonValue, IComparable<BsonInt64>, IEquatable<BsonInt64>
Expand Down
2 changes: 1 addition & 1 deletion src/MongoDB.Bson/ObjectModel/BsonJavaScript.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace MongoDB.Bson
/// <summary>
/// Represents a BSON JavaScript value.
/// </summary>
#if NET452
#if NET452 || NETSTANDARD2_0
[Serializable]
#endif
public class BsonJavaScript : BsonValue, IComparable<BsonJavaScript>, IEquatable<BsonJavaScript>
Expand Down
2 changes: 1 addition & 1 deletion src/MongoDB.Bson/ObjectModel/BsonJavaScriptWithScope.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace MongoDB.Bson
/// <summary>
/// Represents a BSON JavaScript value with a scope.
/// </summary>
#if NET452
#if NET452 || NETSTANDARD2_0
[Serializable]
#endif
public class BsonJavaScriptWithScope : BsonJavaScript, IComparable<BsonJavaScriptWithScope>, IEquatable<BsonJavaScriptWithScope>
Expand Down
2 changes: 1 addition & 1 deletion src/MongoDB.Bson/ObjectModel/BsonMaxKey.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace MongoDB.Bson
/// <summary>
/// Represents the BSON MaxKey value.
/// </summary>
#if NET452
#if NET452 || NETSTANDARD2_0
[Serializable]
#endif
public class BsonMaxKey : BsonValue, IComparable<BsonMaxKey>, IEquatable<BsonMaxKey>
Expand Down
2 changes: 1 addition & 1 deletion src/MongoDB.Bson/ObjectModel/BsonMinKey.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace MongoDB.Bson
/// <summary>
/// Represents the BSON MinKey value.
/// </summary>
#if NET452
#if NET452 || NETSTANDARD2_0
[Serializable]
#endif
public class BsonMinKey : BsonValue, IComparable<BsonMinKey>, IEquatable<BsonMinKey>
Expand Down
2 changes: 1 addition & 1 deletion src/MongoDB.Bson/ObjectModel/BsonNull.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace MongoDB.Bson
/// <summary>
/// Represents the BSON Null value.
/// </summary>
#if NET452
#if NET452 || NETSTANDARD2_0
[Serializable]
#endif
public class BsonNull : BsonValue, IComparable<BsonNull>, IEquatable<BsonNull>
Expand Down
Loading