Skip to content

Add the idea of TryAs(Type, out bool success) #44

Closed

Description

@ipjohnson
bool success;

c.Export(typeof(BasicService)).TryAs(typeof(IBasicService), out success);

Only exports BasicService if no other IBasicService exist.

Also need to add a TryByInterface and TryByInterfaces to ExportTypeSetConfiguration

Activity

  1. added this to the 5.0 milestone on Jul 12, 2016
  2. removed this from the 5.0 milestone on Dec 9, 2016
  3. changed the title [-]Add the idea of TryExport[/-] [+]Add the idea of TryAs(Type, out bool success)[/+] on Feb 11, 2017
  4. added this to the 6.2.0 milestone on May 20, 2017
  5. ipjohnson commented on May 28, 2017

    @ipjohnson
    OwnerAuthor

    I'm going to move this back to 6.3.0 and rethink the method to be more like Autofac

  6. modified the milestones: 6.3.0, 6.2.0 on May 28, 2017
  7. ipjohnson commented on Jun 10, 2017

    @ipjohnson
    OwnerAuthor

    After looking at the implementation for autofac I'm going to mirror the IfNotRegistered and OnlyIf methods

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions