This repository has been archived by the owner on Jan 27, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #51
- Loading branch information
Showing
3 changed files
with
31 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
using Confuser.Core; | ||
using dnlib.DotNet; | ||
using dnlib.DotNet.Emit; | ||
|
||
namespace Confuser.Renamer.References { | ||
public class StringTypeReference : INameReference<TypeDef> { | ||
private readonly Instruction reference; | ||
private readonly TypeDef typeDef; | ||
|
||
public StringTypeReference(Instruction reference, TypeDef typeDef) { | ||
this.reference = reference; | ||
this.typeDef = typeDef; | ||
} | ||
|
||
public bool UpdateNameReference(ConfuserContext context, INameService service) { | ||
reference.Operand = typeDef.ReflectionFullName; | ||
return true; | ||
} | ||
|
||
public bool ShouldCancelRename() { | ||
return false; | ||
} | ||
} | ||
} |