Beispiel #1
0
        private SelectedProperty CreateSelectedProperty(IBuilderContext context, IPolicyList resolverPolicyDestination, PropertyInfo property)
        {
            string           key    = Guid.NewGuid().ToString();
            SelectedProperty result = new SelectedProperty(property, key);

            resolverPolicyDestination.Set <IDependencyResolverPolicy>(CreateResolver(property), key);
            DependencyResolverTrackerPolicy.TrackKey(context.PersistentPolicies,
                                                     context.BuildKey,
                                                     key);
            return(result);
        }
 private static SelectedProperty CreateSelectedProperty(IBuilderContext context, PropertyInfo property)
 {
     string key = Guid.NewGuid().ToString();
      SelectedProperty result = new SelectedProperty(property, key);
      context.PersistentPolicies.Set<IDependencyResolverPolicy>(new OptionalFixedTypeResolverPolicy(property.PropertyType), key);
      DependencyResolverTrackerPolicy.TrackKey(context.PersistentPolicies,
      context.BuildKey,
      key);
      return result;
 }