Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

Conversation

@Lxiamail
Copy link
Contributor

@Lxiamail Lxiamail commented Jul 22, 2019

This PR includes the following changes:
Make ApiPort to be Global tool (issue #668).
Updated ApiPort console apps to .NET Core 2.1 standalone app and removed desktop app support;
Updated ApiPort libraries to remove NET standard1.3 support and only support .NET standard2.0;
Update VS extensions to target .net4.6.1 to support .NET standard.
Fixed some warnings to call some APIs with specific cultureInfo.

…NET standard1.3 support and only support .NET standard2.0; updated ApiPort console apps to .NET Core 2.1 standalone app and removed desktop app support; update VS extensions to target .net4.6.1. Also fixed some warnings to call some APIs with specific cultureInfo.
@Lxiamail
Copy link
Contributor Author

@twsouthwick Do you have any additional feedback?

if (!_hashComputed)
{
_hashCode = ((DefinedInAssemblyIdentity?.ToString() ?? string.Empty) + (MemberDocId ?? string.Empty) + IsPrimitive.ToString()).GetHashCode() ^ CallingAssembly.GetHashCode();
_hashCode = ((DefinedInAssemblyIdentity?.ToString() ?? string.Empty) + (MemberDocId ?? string.Empty) + IsPrimitive.ToString((IFormatProvider)CultureInfo.CurrentUICulture)).GetHashCode() ^ CallingAssembly.GetHashCode();
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a blocker, but I don't think CurrentUICulture is appropriate for a hashcode. We should use Invariant here. As a point of preference, this seems like a somewhat iffy way to construct a hashcode. I think we have some hashcode helpers now. I'll see if I can find them.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Use InvariantCulture

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

if (!_hashComputed)
{
_hashCode = ((DefinedInAssemblyIdentity?.ToString() ?? string.Empty) + (MemberDocId ?? string.Empty) + IsPrimitive.ToString()).GetHashCode() ^ CallingAssembly.GetHashCode();
_hashCode = ((DefinedInAssemblyIdentity?.ToString() ?? string.Empty) + (MemberDocId ?? string.Empty) + IsPrimitive.ToString((IFormatProvider)CultureInfo.CurrentUICulture)).GetHashCode() ^ CallingAssembly.GetHashCode();
Copy link
Contributor

Choose a reason for hiding this comment

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

Use InvariantCulture

@Lxiamail
Copy link
Contributor Author

Test failures due to missing ilasm is an known SDK issue and fixed in SDK 3.0. more details at https://github.com/dotnet/cli/issues/12341. we can ignore the failures for now.

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