/// <summary> /// Example of <see cref="xLogger.EnterMethod(Type[], object[], bool, string, string, int)"/> usage. /// </summary> /// <typeparam name="Tone">The first Type parameter.</typeparam> /// <typeparam name="Ttwo">The second Type parameter.</typeparam> /// <param name="one">A number.</param> /// <param name="two">Another number.</param> /// <param name="three">An instance of ExampleObject.</param> public static void EnterMethodExample <Tone, Ttwo>(int one, int two, ExampleObject three) { logger.EnterMethod(xLogger.TypeParams(typeof(Tone), typeof(Ttwo)), xLogger.Params(one, two, three)); //// method body logger.Trace("Standard log message"); }
/// <summary> /// Example of <see cref="xLogger.ExitMethod(object, Guid, string, string, int)"/> usage. /// </summary> /// <param name="one">A number.</param> /// <param name="two">Another number.</param> /// <returns>An ExampleObject instance.</returns> public static ExampleObject ExitMethodPersistentExample(int one, int two) { Guid persistedGuid = logger.EnterMethod(xLogger.Params(one, two), true); //// method body logger.Trace("Standard log message"); ExampleObject returnValue = new ExampleObject(1, "return", new double[] { 5.5 }.ToList()); logger.ExitMethod(returnValue, persistedGuid); return(returnValue); }