Пример #1
0
 /// <summary>
 /// Set public properties decorated with the <see cref="ImportAttribute"/>.
 /// </summary>
 /// <remarks>Uses reflection, is slow - caching would help here.</remarks>
 /// <param name="conventions">Conventions to apply when satisfying loose imports.</param>
 /// <param name="objectWithLooseImports">An object with decorated with import attributes.</param>
 /// <param name="compositionContext">Export provider that will supply imported values.</param>
 public static void SatisfyImports(this CompositionContext compositionContext, object objectWithLooseImports, AttributedModelProvider conventions)
 {
     SatisfyImportsInternal(compositionContext, objectWithLooseImports, conventions);
 }
Пример #2
0
 /// <summary>
 /// Set public properties decorated with the <see cref="ImportAttribute"/>.
 /// </summary>
 /// <remarks>Uses reflection, is slow - caching would help here.</remarks>
 /// <param name="objectWithLooseImports">An object with decorated with import attributes.</param>
 /// <param name="compositionContext">Export provider that will supply imported values.</param>
 public static void SatisfyImports(this CompositionContext compositionContext, object objectWithLooseImports)
 {
     SatisfyImportsInternal(compositionContext, objectWithLooseImports, s_directAttributeContext);
 }