Skip to content

Commit

Permalink
Remove System.Collections.Immutable dependency (#1615)
Browse files Browse the repository at this point in the history
  • Loading branch information
ob-stripe committed May 21, 2019
1 parent 5dd837b commit b6f1930
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/Stripe.net/Infrastructure/FormEncoding/MimeTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ namespace Stripe.Infrastructure.FormEncoding
{
using System;
using System.Collections.Generic;
using System.Collections.Immutable;

internal static class MimeTypes
{
Expand All @@ -22,7 +21,7 @@ private static readonly IDictionary<string, string> MimeTypeMap
{ ".png", "image/png" },
{ ".xls", "application/vnd.ms-excel" },
{ ".xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" },
}.ToImmutableDictionary();
};

/// <summary>Gets the content type for a given file extension.</summary>
/// <param name="extension">The file extension.</param>
Expand Down
5 changes: 2 additions & 3 deletions src/Stripe.net/Infrastructure/StripeTypeRegistry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ namespace Stripe.Infrastructure
{
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Reflection;

internal static class StripeTypeRegistry
Expand All @@ -11,7 +10,7 @@ internal static class StripeTypeRegistry
/// Dictionary mapping the values contained in the `object` key of JSON payloads returned
/// by Stripe's API to concrete types of model classes.
/// </summary>
public static readonly ImmutableDictionary<string, Type> ObjectsToTypes = new Dictionary<string, Type>
public static readonly IDictionary<string, Type> ObjectsToTypes = new Dictionary<string, Type>
{
{ "account", typeof(Account) },
{ "account_link", typeof(AccountLink) },
Expand Down Expand Up @@ -85,7 +84,7 @@ internal static class StripeTypeRegistry
{ "usage_record", typeof(UsageRecord) },
{ "usage_record_summary", typeof(UsageRecordSummary) },
{ "webhook_endpoint", typeof(WebhookEndpoint) },
}.ToImmutableDictionary();
};

/// <summary>
/// Returns the concrete type to use, given a potential type and the value of the `object`
Expand Down
1 change: 0 additions & 1 deletion src/Stripe.net/Stripe.net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="System.Collections.Immutable" Version="1.5.0" />
</ItemGroup>

<PropertyGroup>
Expand Down

0 comments on commit b6f1930

Please sign in to comment.