所有的拳头,我使用simpleInjector。
i= imread('path');
imgG= rgb2gray(i);
PSF = fspecial('gaussian',7,7);
Blurred = imfilter(imgG,PSF,'symmetric','conv');
figure ,imshow(Blurred)
edgeimg = edge(Blurred , 'canny');
figure ,imshow(edgeimg)
我有
private static readonly Container Container = new Container();
和
public interface ILine
{
Guid LineId { get; set; }
void Run();
}
现在也:
public class CallFlowApplication : ICallFlowApplication
{
private ILine _lineApi;
public CallFlowApplication(ILine line)
{
_lineApi = line;
}
public void HandleCall()
{
throw new NotImplementedException();
}
}
当我播放应用程序时,我在代码static void RegisterDependencies()
{
VoiceElementsCallFlowService.Container = Container;
Container.Register<ICallFlowService, VoiceElementsCallFlowService>();
Container.Register<ICallFlowApplication, CallFlowApplication>();
// TODO: Register your application here
Container.Register<IApplicationFactory>(() => new ApplicationFactory
{
{ 1, () => Container.GetInstance<CallFlowApplication>() }
}, Lifestyle.Singleton);
}
配置无效。为类型ICallFlowApplication创建实例失败。 CallFlowApplication类型的构造函数包含名称为&#39; line&#39;的参数。并键入未注册的ILine。请确保ILine已注册,或更改CallFlowApplication的构造函数。
我的问题是我不确定如何在这里处理Container.Verify();
。
答案 0 :(得分:0)
使用您对netstat -a -n | find "SYN"
,ILine
的具体实施方式注册ILine
:
VoiceElementsLine
当容器尝试实例化Container.Register<ILine, VoiceElementsLine>();
Container.Register<ICallFlowApplication, CallFlowApplication>();
时,其构造函数为CallFlowApplication
,但您尚未注册ILine
,因此它没有任何内容给它这就是它失败的原因。您需要告诉容器&#34;嘿,当某事要求ILine
给它ILine
时。&#34;