Exemplo n.º 1
0
            public void Inspect <T>(T strategy) where T : class, IActivationStrategy
            {
                if (strategy is ICompiledExportStrategy exportStrategy)
                {
                    foreach (var propertyInfo in strategy.ActivationType.GetProperties())
                    {
                        if (propertyInfo.CanWrite &&
                            propertyInfo.SetMethod.IsPublic &&
                            !propertyInfo.SetMethod.IsStatic)
                        {
                            var injectionInfo = new MemberInjectionInfo {
                                MemberInfo = propertyInfo
                            };

                            exportStrategy.MemberInjectionSelector(new KnownMemberInjectionSelector(injectionInfo));
                        }
                    }
                }
            }
 /// <summary>
 /// Default constructor
 /// </summary>
 /// <param name="strategy"></param>
 /// <param name="memberInjectionInfo"></param>
 public FluentImportPropertyConfiguration(IFluentExportStrategyConfiguration <T> strategy, MemberInjectionInfo memberInjectionInfo) : base(strategy)
 {
     _memberInjectionInfo = memberInjectionInfo;
 }