forked from yck1509/ConfuserEx
-
-
Notifications
You must be signed in to change notification settings - Fork 389
/
Copy pathINameReference.cs
50 lines (45 loc) · 1.68 KB
/
INameReference.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using Confuser.Core;
using dnlib.DotNet;
namespace Confuser.Renamer {
public interface INameReference {
/// <summary>
/// Check if the element with this reference attached should be
/// renamed at all.
/// </summary>
bool ShouldCancelRename { get; }
/// <summary>
/// Check if the renaming has to be delayed, because the referenced objects are not handled yet.
/// </summary>
/// <param name="service">The naming service</param>
/// <returns>
/// <see langword="true" /> in case the reference can't be resolved yet;
/// otherwise <see langword="false" />.</returns>
bool DelayRenaming(INameService service, IDnlibDef currentDef);
/// <summary>
/// Update the name reference.
/// </summary>
/// <param name="context">The confuser context</param>
/// <param name="service">The name service</param>
/// <returns>
/// <see langword="true" /> in case the name was updated;
/// otherwise <see langword="false" />.
/// </returns>
/// <exception cref="ArgumentNullException">
/// <paramref name="context" /> is <see langword="null" />
/// <br />- or -<br />
/// <paramref name="service" /> is <see langword="null" />
/// </exception>
bool UpdateNameReference(ConfuserContext context, INameService service);
/// <summary>
/// Get a description of this reference, containing the original
/// names of the referenced objects.
/// </summary>
/// <param name="nameService">
/// The name service used to get the original names;
/// or <see langword="null"/>
/// </param>
/// <returns>Description of this reference.</returns>
string ToString(INameService nameService);
}
public interface INameReference<out T> : INameReference { }
}