Skip to content

Commit

Permalink
Revert "Updated to the latest version of json.net 8.0.2"
Browse files Browse the repository at this point in the history
This reverts commit 0bb2bad.
  • Loading branch information
niemyjski committed Jan 22, 2016
1 parent 92bab7f commit 2ef0fe0
Show file tree
Hide file tree
Showing 149 changed files with 2,399 additions and 8,019 deletions.
138 changes: 67 additions & 71 deletions Source/Shared/Exceptionless.Portable.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,73 @@
<Compile Include="Dependency\TinyIoC.cs" />
<Compile Include="Events\EventSubmissionEventArgsBase.cs" />
<Compile Include="Events\EventSubmittedEventArgs.cs" />
<Compile Include="Plugins\Default\030_DuplicateCheckerPlugin.cs" />
<Compile Include="Plugins\ContextData.cs" />
<Compile Include="Plugins\Default\1000_CancelSessionsWithNoUserPlugin.cs" />
<Compile Include="Plugins\Default\100_HeartbeatPlugin.cs" />
<Compile Include="Plugins\Default\ActionPlugin.cs" />
<Compile Include="Plugins\Default\010_ConfigurationDefaultsPlugin.cs" />
<Compile Include="Plugins\Default\090_SubmissionMethodPlugin.cs" />
<Compile Include="Plugins\Default\040_ReferenceIdPlugin.cs" />
<Compile Include="Plugins\Default\020_SimpleErrorPlugin.cs" />
<Compile Include="Plugins\Default\050_EnvironmentInfoPlugin.cs" />
<Compile Include="Plugins\PriortyAttribute.cs" />
<Compile Include="EventBuilder.cs" />
<Compile Include="Events\ConfigurationUpdatedEventArgs.cs" />
<Compile Include="Events\EventSubmittingEventArgs.cs" />
<Compile Include="ExceptionlessClient.cs" />
<Compile Include="Extensions\EventBuilderExtensions.cs" />
<Compile Include="Extensions\ExceptionlessConfigurationExtensions.cs" />
<Compile Include="Extensions\EnumerableExtensions.cs" />
<Compile Include="Extensions\DataDictionaryExtensions.cs" />
<Compile Include="Extensions\EventExtensions.cs" />
<Compile Include="Extensions\ExceptionExtensions.cs" />
<Compile Include="Extensions\ClientExtensions.cs" />
<Compile Include="Extensions\FileStorageExtensions.cs" />
<Compile Include="Extensions\NumberExtensions.cs" />
<Compile Include="Extensions\TaskExtensions.cs" />
<Compile Include="Extensions\TaskFactoryExtensions.cs" />
<Compile Include="Extensions\ToSimpleErrorModelExtensions.cs" />
<Compile Include="Extensions\TypeExtensions.cs" />
<Compile Include="Extensions\WebResponseExtensions.cs" />
<Compile Include="Extensions\JsonSerializerExtensions.cs" />
<Compile Include="Extensions\StringExtensions.cs" />
<Compile Include="Extensions\WebRequestExtensions.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="LastReferenceIdManager\DefaultLastReferenceIdManager.cs" />
<Compile Include="LastReferenceIdManager\ILastReferenceIdManager.cs" />
<Compile Include="Logging\DebugExceptionlessLog.cs" />
<Compile Include="Logging\InMemoryExceptionlessLog.cs" />
<Compile Include="Logging\LogLevel.cs" />
<Compile Include="Plugins\EventPluginManager.cs" />
<Compile Include="Plugins\EventPluginContext.cs" />
<Compile Include="Plugins\IEventPlugin.cs" />
<Compile Include="Models\Client\ClientConfiguration.cs" />
<Compile Include="Models\Client\Data\EnvironmentInfo.cs" />
<Compile Include="Models\Client\Data\Error.cs" />
<Compile Include="Models\Client\Data\InnerError.cs" />
<Compile Include="Models\Client\Data\Method.cs" />
<Compile Include="Models\Client\Data\Module.cs" />
<Compile Include="Models\Client\Data\Parameter.cs" />
<Compile Include="Models\Client\Data\RequestInfo.cs" />
<Compile Include="Models\Client\Data\SimpleError.cs" />
<Compile Include="Models\Client\Data\StackFrame.cs" />
<Compile Include="Models\Client\Data\UserDescription.cs" />
<Compile Include="Models\Client\Data\UserInfo.cs" />
<Compile Include="Models\Client\Event.cs" />
<Compile Include="Models\Collections\DataDictionary.cs" />
<Compile Include="Models\Collections\GenericArguments.cs" />
<Compile Include="Models\Collections\ModuleCollection.cs" />
<Compile Include="Models\Collections\ObservableDictionary.cs" />
<Compile Include="Models\Collections\ParameterCollection.cs" />
<Compile Include="Models\Collections\SettingsDictionary.cs" />
<Compile Include="Models\Collections\StackFrameCollection.cs" />
<Compile Include="Models\Collections\TagSet.cs" />
<Compile Include="Extensions\MethodExtensions.cs" />
<Compile Include="Extensions\ParameterExtensions.cs" />
<Compile Include="Extensions\RequestInfoExtensions.cs" />
<Compile Include="Models\Interfaces\IData.cs" />
<Compile Include="Newtonsoft.Json\Bson\BsonBinaryType.cs" />
<Compile Include="Newtonsoft.Json\Bson\BsonBinaryWriter.cs" />
<Compile Include="Newtonsoft.Json\Bson\BsonObjectId.cs" />
Expand Down Expand Up @@ -92,7 +159,6 @@
<Compile Include="Newtonsoft.Json\FloatParseHandling.cs" />
<Compile Include="Newtonsoft.Json\FormatterAssemblyStyle.cs" />
<Compile Include="Newtonsoft.Json\Formatting.cs" />
<Compile Include="Newtonsoft.Json\IArrayPool.cs" />
<Compile Include="Newtonsoft.Json\IJsonLineInfo.cs" />
<Compile Include="Newtonsoft.Json\JsonArrayAttribute.cs" />
<Compile Include="Newtonsoft.Json\JsonConstructorAttribute.cs" />
Expand All @@ -110,7 +176,6 @@
<Compile Include="Newtonsoft.Json\JsonPropertyAttribute.cs" />
<Compile Include="Newtonsoft.Json\JsonReader.cs" />
<Compile Include="Newtonsoft.Json\JsonReaderException.cs" />
<Compile Include="Newtonsoft.Json\JsonRequiredAttribute.cs" />
<Compile Include="Newtonsoft.Json\JsonSerializationException.cs" />
<Compile Include="Newtonsoft.Json\JsonSerializer.cs" />
<Compile Include="Newtonsoft.Json\JsonSerializerSettings.cs" />
Expand All @@ -120,7 +185,6 @@
<Compile Include="Newtonsoft.Json\JsonValidatingReader.cs" />
<Compile Include="Newtonsoft.Json\JsonWriter.cs" />
<Compile Include="Newtonsoft.Json\JsonWriterException.cs" />
<Compile Include="Newtonsoft.Json\Linq\CommentHandling.cs" />
<Compile Include="Newtonsoft.Json\Linq\Extensions.cs" />
<Compile Include="Newtonsoft.Json\Linq\IJEnumerable.cs" />
<Compile Include="Newtonsoft.Json\Linq\JArray.cs" />
Expand All @@ -132,7 +196,6 @@
<Compile Include="Newtonsoft.Json\Linq\JPropertyDescriptor.cs" />
<Compile Include="Newtonsoft.Json\Linq\JPropertyKeyedCollection.cs" />
<Compile Include="Newtonsoft.Json\Linq\JRaw.cs" />
<Compile Include="Newtonsoft.Json\Linq\JsonLoadSettings.cs" />
<Compile Include="Newtonsoft.Json\Linq\JsonMergeSettings.cs" />
<Compile Include="Newtonsoft.Json\Linq\JsonPath\ArrayIndexFilter.cs" />
<Compile Include="Newtonsoft.Json\Linq\JsonPath\ArrayMultipleIndexFilter.cs" />
Expand Down Expand Up @@ -254,73 +317,6 @@
<Compile Include="Newtonsoft.Json\Utilities\TypeExtensions.cs" />
<Compile Include="Newtonsoft.Json\Utilities\ValidationUtils.cs" />
<Compile Include="Newtonsoft.Json\WriteState.cs" />
<Compile Include="Plugins\Default\030_DuplicateCheckerPlugin.cs" />
<Compile Include="Plugins\ContextData.cs" />
<Compile Include="Plugins\Default\1000_CancelSessionsWithNoUserPlugin.cs" />
<Compile Include="Plugins\Default\100_HeartbeatPlugin.cs" />
<Compile Include="Plugins\Default\ActionPlugin.cs" />
<Compile Include="Plugins\Default\010_ConfigurationDefaultsPlugin.cs" />
<Compile Include="Plugins\Default\090_SubmissionMethodPlugin.cs" />
<Compile Include="Plugins\Default\040_ReferenceIdPlugin.cs" />
<Compile Include="Plugins\Default\020_SimpleErrorPlugin.cs" />
<Compile Include="Plugins\Default\050_EnvironmentInfoPlugin.cs" />
<Compile Include="Plugins\PriortyAttribute.cs" />
<Compile Include="EventBuilder.cs" />
<Compile Include="Events\ConfigurationUpdatedEventArgs.cs" />
<Compile Include="Events\EventSubmittingEventArgs.cs" />
<Compile Include="ExceptionlessClient.cs" />
<Compile Include="Extensions\EventBuilderExtensions.cs" />
<Compile Include="Extensions\ExceptionlessConfigurationExtensions.cs" />
<Compile Include="Extensions\EnumerableExtensions.cs" />
<Compile Include="Extensions\DataDictionaryExtensions.cs" />
<Compile Include="Extensions\EventExtensions.cs" />
<Compile Include="Extensions\ExceptionExtensions.cs" />
<Compile Include="Extensions\ClientExtensions.cs" />
<Compile Include="Extensions\FileStorageExtensions.cs" />
<Compile Include="Extensions\NumberExtensions.cs" />
<Compile Include="Extensions\TaskExtensions.cs" />
<Compile Include="Extensions\TaskFactoryExtensions.cs" />
<Compile Include="Extensions\ToSimpleErrorModelExtensions.cs" />
<Compile Include="Extensions\TypeExtensions.cs" />
<Compile Include="Extensions\WebResponseExtensions.cs" />
<Compile Include="Extensions\JsonSerializerExtensions.cs" />
<Compile Include="Extensions\StringExtensions.cs" />
<Compile Include="Extensions\WebRequestExtensions.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="LastReferenceIdManager\DefaultLastReferenceIdManager.cs" />
<Compile Include="LastReferenceIdManager\ILastReferenceIdManager.cs" />
<Compile Include="Logging\DebugExceptionlessLog.cs" />
<Compile Include="Logging\InMemoryExceptionlessLog.cs" />
<Compile Include="Logging\LogLevel.cs" />
<Compile Include="Plugins\EventPluginManager.cs" />
<Compile Include="Plugins\EventPluginContext.cs" />
<Compile Include="Plugins\IEventPlugin.cs" />
<Compile Include="Models\Client\ClientConfiguration.cs" />
<Compile Include="Models\Client\Data\EnvironmentInfo.cs" />
<Compile Include="Models\Client\Data\Error.cs" />
<Compile Include="Models\Client\Data\InnerError.cs" />
<Compile Include="Models\Client\Data\Method.cs" />
<Compile Include="Models\Client\Data\Module.cs" />
<Compile Include="Models\Client\Data\Parameter.cs" />
<Compile Include="Models\Client\Data\RequestInfo.cs" />
<Compile Include="Models\Client\Data\SimpleError.cs" />
<Compile Include="Models\Client\Data\StackFrame.cs" />
<Compile Include="Models\Client\Data\UserDescription.cs" />
<Compile Include="Models\Client\Data\UserInfo.cs" />
<Compile Include="Models\Client\Event.cs" />
<Compile Include="Models\Collections\DataDictionary.cs" />
<Compile Include="Models\Collections\GenericArguments.cs" />
<Compile Include="Models\Collections\ModuleCollection.cs" />
<Compile Include="Models\Collections\ObservableDictionary.cs" />
<Compile Include="Models\Collections\ParameterCollection.cs" />
<Compile Include="Models\Collections\SettingsDictionary.cs" />
<Compile Include="Models\Collections\StackFrameCollection.cs" />
<Compile Include="Models\Collections\TagSet.cs" />
<Compile Include="Extensions\MethodExtensions.cs" />
<Compile Include="Extensions\ParameterExtensions.cs" />
<Compile Include="Extensions\RequestInfoExtensions.cs" />
<Compile Include="Models\Interfaces\IData.cs" />
<Compile Include="Polyfill\ConcurrentQueue.cs" />
<Compile Include="Polyfill\ObjectPool.cs" />
<Compile Include="Queue\IEventQueue.cs" />
Expand Down
14 changes: 4 additions & 10 deletions Source/Shared/Newtonsoft.Json/Bson/BsonBinaryWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void Flush()

public void Close()
{
#if !(DOTNET || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
_writer.Close();
#else
_writer.Dispose();
Expand Down Expand Up @@ -142,13 +142,9 @@ private void WriteTokenInternal(BsonToken t)
{
DateTime dateTime = (DateTime)value.Value;
if (DateTimeKindHandling == DateTimeKind.Utc)
{
dateTime = dateTime.ToUniversalTime();
}
else if (DateTimeKindHandling == DateTimeKind.Local)
{
dateTime = dateTime.ToLocalTime();
}

ticks = DateTimeUtils.ConvertDateTimeToJavaScriptTicks(dateTime, false);
}
Expand Down Expand Up @@ -190,16 +186,14 @@ private void WriteTokenInternal(BsonToken t)
}
break;
default:
throw new ArgumentOutOfRangeException(nameof(t), "Unexpected token when writing BSON: {0}".FormatWith(CultureInfo.InvariantCulture, t.Type));
throw new ArgumentOutOfRangeException("t", "Unexpected token when writing BSON: {0}".FormatWith(CultureInfo.InvariantCulture, t.Type));
}
}

private void WriteString(string s, int byteCount, int? calculatedlengthPrefix)
{
if (calculatedlengthPrefix != null)
{
_writer.Write(calculatedlengthPrefix.GetValueOrDefault());
}
_writer.Write(calculatedlengthPrefix.Value);

WriteUtf8Bytes(s, byteCount);

Expand Down Expand Up @@ -324,7 +318,7 @@ private int CalculateSize(BsonToken t)
return value.CalculatedSize;
}
default:
throw new ArgumentOutOfRangeException(nameof(t), "Unexpected token when writing BSON: {0}".FormatWith(CultureInfo.InvariantCulture, t.Type));
throw new ArgumentOutOfRangeException("t", "Unexpected token when writing BSON: {0}".FormatWith(CultureInfo.InvariantCulture, t.Type));
}
}
}
Expand Down
6 changes: 2 additions & 4 deletions Source/Shared/Newtonsoft.Json/Bson/BsonObjectId.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,9 @@ public class BsonObjectId
/// <param name="value">The Oid value.</param>
public BsonObjectId(byte[] value)
{
ValidationUtils.ArgumentNotNull(value, nameof(value));
ValidationUtils.ArgumentNotNull(value, "value");
if (value.Length != 12)
{
throw new ArgumentException("An ObjectId must be 12 bytes", nameof(value));
}
throw new ArgumentException("An ObjectId must be 12 bytes", "value");

Value = value;
}
Expand Down
Loading

0 comments on commit 2ef0fe0

Please sign in to comment.