In Cheat Sheet, we explained that how a replacement target method will be represented as Indirection Delegate. However, when you use actually, you probably can't notice soon the little difference -- the case that non-public signature type exists, the difference between an instance method and a static method and so on -- even if it is wrong. To avoid that, I think it is better that an empty mock implementation is proposed at the same time as getting Indirection Stub Setting. For example, the following are our expected results:
public static DateTime Now { get; } of System.DateTime in mscorlib
In Cheat Sheet, we explained that how a replacement target method will be represented as Indirection Delegate. However, when you use actually, you probably can't notice soon the little difference -- the case that non-public signature type exists, the difference between an instance method and a static method and so on -- even if it is wrong. To avoid that, I think it is better that an empty mock implementation is proposed at the same time as getting Indirection Stub Setting. For example, the following are our expected results:
public static DateTime Now { get; }
ofSystem.DateTime
inmscorlib
This is one of the most simple result.
public static T Exchange<T>(ref T location1, T value) where T : class
ofSystem.Threading.Interlocked
inmscorlib
Generic parameter will be proposed as it is, because Prig cannot know that it will be replaced to another.
internal unsafe static bool TryParse(string s, DateTimeFormatInfo dtfi, DateTimeStyles styles, ref DateTimeResult result)
ofSystem.DateTimeParse
inmscorlib
Non-public signature will be proposed by comment, because they cause a build failure.
internal virtual string InternalToString()
ofSystem.Exception
inmscorlib
This is the example of a instance method of a class.
public Nullable(T value)
ofSystem.Nullable<T>
inmscorlib
This is the example of a instance method of a structure.