我有以下界面:
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)
的问题
这是一个问题吗?如果是,如何解决?