public void Source(IDescribeMappableProperty[] destinationProperties)
 {
     var cacheable = destinationProperties.Where(WillResolve).ToArray();
     foreach (var property in cacheable)
     {
         cachedResolvers[property]=TryGetCandidate(property);
     }
 }
예제 #2
0
 /// <summary>
 /// Sets the destination context for this source. This selects <paramref name="destinationProperties"/> which are pertinent to this instance's
 /// <c>SourceType</c>. This selection is based upon matching property names. Use a Redirecting call in configuration to get around this.
 /// </summary>
 /// <param name="destinationProperties">The destination properties.</param>
 public void SetDestinationContext(IDescribeMappableProperty[] destinationProperties)
 {
     var sourcePropertyNames = sourceProperties.Select(its => its.Name);
     foreach (var destinationProperty in destinationProperties.Where(its => sourcePropertyNames.Contains(its.Name)))
     {
         destinationProperty2Resolver[destinationProperty] = CreateDefaultResolver(destinationProperty);
     }
 }