public SimpleConstructor()
 {
     TestMessages.Record("InterceptingConstructors+SimpleConstructor: .ctor");
 }
 public string ReturnsString()
 {
     TestMessages.Record("ReturnsString: Body");
     return("hello world");
 }
 public int ReturnsNumber()
 {
     TestMessages.Record("ReturnsNumber: Body");
     return(42);
 }
Ejemplo n.º 4
0
 public void OnEntry(MethodBase method)
 {
     TestMessages.Record(string.Format("OnEntry: {0}", method.DeclaringType.FullName + "." + method.Name));
 }
Ejemplo n.º 5
0
 public void OnException(MethodBase method, Exception exception)
 {
     TestMessages.Record(string.Format("OnException: {0} - {1}: {2}", method.DeclaringType.FullName + "." + method.Name, exception.GetType(), exception.Message));
 }
 public void WithoutArgs()
 {
     TestMessages.Record("VoidMethodWithoutArgs: Body");
 }
 public void ThrowingInvalidOperationException()
 {
     TestMessages.Record("VoidMethodThrowingInvalidOperationException: Body");
     throw new InvalidOperationException("Ooops");
 }
 public static string ToTitleCase(this string value)
 {
     TestMessages.Record("ToTitleCase: In extension method");
     return(new CultureInfo("en-GB", false).TextInfo.ToTitleCase(value));
 }