public static ComposablePartDefinition CreatePartDefinition(Type type, ICompositionElement?origin, bool ensureIsDiscoverable)
 {
     Requires.NotNull(type, nameof(type));
     if (ensureIsDiscoverable)
     {
         return(AttributedModelDiscovery.CreatePartDefinitionIfDiscoverable(type, origin) !);
     }
     else
     {
         return(AttributedModelDiscovery.CreatePartDefinition(type, null, false, origin));
     }
 }
 public static ReflectionComposablePartDefinition CreateAttributed(Type type)
 {
     return(AttributedModelDiscovery.CreatePartDefinition(type, null, false, (ICompositionElement)null));
 }