void FindActivationConstructor()
        {
            var tt = type.GetTypeInfo();

            if (tt.IsAbstract)
            {
                // Composable providers can be abstract
                if (type.IsProviderType() && tt.IsDefined(typeof(ComposableAttribute), false))
                {
                    var composeMember = App.GetProviderMember(type, "compose");
                    if (composeMember == null)
                    {
                        throw new NotImplementedException();
                    }

                    activationConstructor = ReflectedProviderFactoryDefinitionBase.Create(type, composeMember);
                }
            }
            else
            {
                MethodBase ctor = TypeHelper.FindActivationConstructor(type);
                if (ctor != null)
                {
                    activationConstructor = ReflectedPropertyTreeFactoryDefinition.Create(null, ctor);
                }
            }
        }
 private static void ApplyFilters(ReflectedPropertyTreeDefinition def)
 {
     // TODO This should be structured instead
     if (typeof(NameValueCollection) == def.SourceClrType)
     {
         // Make sure that Add(string,string) is the addon, and not Add(NameValueCollection) which isn't useful
         var mi = typeof(NameValueCollection).GetMethod("Add", new[] { typeof(string), typeof(string) });
         def.Operators.RemoveInternal(NamespaceUri.Default + "Add");
         def.Operators.Add(ReflectedPropertyTreeFactoryDefinition.Create(null, mi));
     }
 }