Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
var serviceLocator = ServiceLocator.Default;
serviceLocator.ConfigureInterceptionForType<ITestService, TestService>()
              .InterceptSetter(fservice => fservice.Name)
              .OnBefore(() => Console.WriteLine("Setting Property Intercepted"));

var testService = serviceLocator.ResolveType<ITestService>();
testService.Name = "testValue";
var name = testService.Name;

...

Code Block
var serviceLocator = ServiceLocator.Default;
serviceLocator.ConfigureInterceptionForType<ITestService, TestService>()
              .InterceptGetter(fservice => fservice.Name)
              .OnBefore(() => Console.WriteLine("Getting Property Intercepted"));

var testService = serviceLocator.ResolveType<ITestService>();
testService.Name = "testValue";
var name = testService.Name;

...