Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@khalidabuhakmeh
Copy link
Contributor

@khalidabuhakmeh khalidabuhakmeh commented Apr 23, 2018

Previous behavior caused issues of ambiguous reference around
PushStreamContent when both Refit and System.Net.Http.Formatting are
included in a project. This is essentially a show stopper to upgrading
to the latest Refit.

The solution is to change the internal implementation of PushStreamContent
namespace from System.Net.Http -> Refit.Net.Http and to update
the usages internally. Note this may be a breaking change to those who
have taken a dependency on PushStreamContent in their own projects from
the Refit assemblies.

image

Previous behavior caused issues of �mbiguous reference around
PushStreamContent when both Refit and System.Net.Http.Formatting are
included in a project. This is essentially a show stopper to upgrading
to the latest Refit.

The solution is to change the internal implementation of PushStreamContent
namespace from System.Net.Http -> Refit.Net.Http and to update
the usages internally. Note this may be a breaking change to those who
have taken a dependency on PushStreamContent in their own projects from
the Refit assemblies.
@khalidabuhakmeh
Copy link
Contributor Author

Setting an assembly Alias allows you to build your project. If you need to access the PushStreamContent from Refit you will need to include the following at the top of your class file.

extern Refit;

This will allow you to access the version of PushStreamContent for your purposes.

Feel free to merge or close this depending on your thoughts.

@khalidabuhakmeh
Copy link
Contributor Author

@onovotny I would say that this should probably make its way into the Readme.md. I'd be glad to submit a PR to update the documentation if you like.

@clairernovotny
Copy link
Member

TBD...we may want to still rename since aliases aren't very easy to use with PackageReference currently. I don't really see the harm in renaming the types internally.

@dnfclas
Copy link

dnfclas commented May 4, 2018

CLA assistant check
All CLA requirements met.

@bennor
Copy link
Contributor

bennor commented May 4, 2018

Should we be moving to a different namespace, or can we just use the one from System.Net.Formatting and delete our shim? (Not sure if System.Net.Fomatting is netstandard 2 or not.)

@Cheesebaron
Copy link
Contributor

Cheesebaron commented May 7, 2018

@bennor System.Net.Formatting is part of ASP.NET and does not seem to be .NET Standard: https://github.com/aspnet/AspNetWebStack/blob/master/src/System.Net.Http.Formatting/System.Net.Http.Formatting.csproj

It is not even released as a NuGet.

GitHub
AspNetWebStack - ASP.NET MVC 5.x, Web API 2.x, and Web Pages 3.x (not ASP.NET Core)

@bennor
Copy link
Contributor

bennor commented May 7, 2018

In that case we don't have a lot of choice, do we. 😂

using System.Net.Http;

namespace System.Net.Http
namespace Refit.Net.Http
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why change the namespace? Why not just make the types internal?

@clairernovotny clairernovotny merged commit 3e8d4a8 into reactiveui:master May 15, 2018
@lock lock bot locked and limited conversation to collaborators Jun 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants