public void OnCommand(ITransport sender, Command command)
{
if(command != null)
{
if(command.IsResponse)
{
Object oo = null;
lock(((ICollection) requestMap).SyncRoot)
{
int v = ((Response) command).CorrelationId;
try
{
if(requestMap.ContainsKey(v))
{
oo = requestMap[v];
requestMap.Remove(v);
}
}
catch
{
}
}
Tracked t = oo as Tracked;
if(t != null)
{
t.onResponses();
}
}
if(!initialized)
{
initialized = true;
}
if(command.IsConnectionControl)
{
this.HandleConnectionControl(command as ConnectionControl);
}
}
this.Command(sender, command);
}