forked from dnSpy/dnSpy
-
-
Notifications
You must be signed in to change notification settings - Fork 464
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #229 from dnSpyEx/feature/debugger-custom-type-dis…
…play
- Loading branch information
Showing
26 changed files
with
451 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
dnSpy/Roslyn/dnSpy.Roslyn/Debugger/Formatters/AdditionalTypeInfoState.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
Copyright (C) 2023 ElektroKill | ||
This file is part of dnSpy | ||
dnSpy is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
dnSpy is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with dnSpy. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
namespace dnSpy.Roslyn.Debugger.Formatters { | ||
struct AdditionalTypeInfoState { | ||
internal readonly IAdditionalTypeInfoProvider? TypeInfoProvider; | ||
|
||
internal int DynamicTypeIndex; | ||
internal int NativeIntTypeIndex; | ||
internal int TupleNameIndex; | ||
|
||
public AdditionalTypeInfoState(IAdditionalTypeInfoProvider? typeInfoProvider) => TypeInfoProvider = typeInfoProvider; | ||
|
||
public override bool Equals(object? obj) { | ||
if (obj is not AdditionalTypeInfoState other) | ||
return false; | ||
if (!Equals(TypeInfoProvider, other.TypeInfoProvider)) | ||
return false; | ||
if (DynamicTypeIndex != other.DynamicTypeIndex) | ||
return false; | ||
if (NativeIntTypeIndex != other.NativeIntTypeIndex) | ||
return false; | ||
if (TupleNameIndex != other.TupleNameIndex) | ||
return false; | ||
return true; | ||
} | ||
|
||
public override int GetHashCode() { | ||
unchecked { | ||
int hashCode = TypeInfoProvider is not null ? TypeInfoProvider.GetHashCode() : 0; | ||
hashCode = hashCode * 397 ^ DynamicTypeIndex; | ||
hashCode = hashCode * 397 ^ NativeIntTypeIndex; | ||
hashCode = hashCode * 397 ^ TupleNameIndex; | ||
return hashCode; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.