zerg78
07-10-2006, 11:05 AM
Hello all!
I have 2 classes declarations:
using System;
using System.Collections.Generic;
using System.Text;
namespace FrontController
{
public class ControllerMapper : IControllerMapper
{
private IDictionary<string, string> handleDictionary = new Dictionary<string, string>();
public string this[string key]
{
get
{
return handleDictionary[key];
}
set
{
handleDictionary.Add(key, value);
}
}
}
}
/////////////////////////////////////////////////
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
namespace FrontController
{
public class SimpleDispatcher : IDispatcher
{
private IControllerMapper handlerMapper;
public void Dispatch(HttpContext Context)
{
}
#region IoC
public IControllerMapper HandlerMapper
{
get
{
return handlerMapper;
}
set
{
handlerMapper = value;
}
}
#endregion
}
}
also I have web.xml declaration, presented below:
<object id="ControllerMapper" type="FrontController.ControllerMapper, FrontController">
<property name="Item[0]" value="value" />
</object>
<object id="Dispatcher" type="FrontController.SimpleDispatcher, FrontController">
<property name="ControllerMapper" ref="ControllerMapper"/>
</object>
after build and deploy I have message "Parameter count mismatch."
Where is problem? Help please.
I have 2 classes declarations:
using System;
using System.Collections.Generic;
using System.Text;
namespace FrontController
{
public class ControllerMapper : IControllerMapper
{
private IDictionary<string, string> handleDictionary = new Dictionary<string, string>();
public string this[string key]
{
get
{
return handleDictionary[key];
}
set
{
handleDictionary.Add(key, value);
}
}
}
}
/////////////////////////////////////////////////
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
namespace FrontController
{
public class SimpleDispatcher : IDispatcher
{
private IControllerMapper handlerMapper;
public void Dispatch(HttpContext Context)
{
}
#region IoC
public IControllerMapper HandlerMapper
{
get
{
return handlerMapper;
}
set
{
handlerMapper = value;
}
}
#endregion
}
}
also I have web.xml declaration, presented below:
<object id="ControllerMapper" type="FrontController.ControllerMapper, FrontController">
<property name="Item[0]" value="value" />
</object>
<object id="Dispatcher" type="FrontController.SimpleDispatcher, FrontController">
<property name="ControllerMapper" ref="ControllerMapper"/>
</object>
after build and deploy I have message "Parameter count mismatch."
Where is problem? Help please.