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); }
public void OnEntry(MethodBase method) { TestMessages.Record(string.Format("OnEntry: {0}", method.DeclaringType.FullName + "." + method.Name)); }
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)); }