Example #1
0
 /// <summary>
 /// Set any null-valued properties on <paramref name="instance"/> that can be
 /// resolved by the container.
 /// </summary>
 /// <typeparam name="TService">Type of instance. Used only to provide method chaining.</typeparam>
 /// <param name="context">The context from which to resolve the service.</param>
 /// <param name="instance">The instance to inject properties into.</param>
 /// <returns><paramref name="instance"/>.</returns>
 public static TService InjectUnsetProperties <TService>(this IComponentContext context, TService instance)
 {
     AutowiringPropertyInjector.InjectProperties(context, instance, false);
     return(instance);
 }