StructureMap:container.WhatDoIHave()两次显示同一个类?

时间:2017-12-29 11:31:56

标签: c# asp.net-web-api2 startup structuremap scanning

我有以下界面:

public interface IOneWayMapper<in TSource, out TDestination>
{
    TDestination Map(TSource source);
}

以下课程:

public class ProfileMapper : IOneWayMapper<Profile1, Profile2>
{
    public Profile2 Map(Profile1 source)
    {
        return new Profile2();
    }
}

此界面在扫描仪中注册,如:

scanner.ConnectImplementationsToTypesClosing(typeof(IOneWayMapper<,>));


在调用container.WhatDoIHave()时,我得到了这个输出:

  StructureMap : WhatDoIHave()        
  ========================================================================================
  PluginType         Namespace      Lifecycle     Description                Name       
  --------------------------------------------------------------------------------------
  ProfileMapper      Mappers        Transient     Mappers.ProfileMapper     (Default)   
  --------------------------------------------------------------------------------------
  ProfileMapper      Mappers        Transient     Mappers.ProfileMapper     (Default) 


问题
这是一个问题吗?如果是,如何解决?

0 个答案:

没有答案