public static bool UnRegisterProtocolFactory(BaseProtocolFactory pFactory)
{
if (pFactory == null)
{
Logger.WARN("pFactory is null");
return true;
}
if (!_factoriesById.ContainsKey(pFactory.Id))
{
Logger.WARN("Factory id not found: {0}",pFactory.Id);
return true;
}
pFactory.HandledProtocolChains.AsParallel().ForAll(x => _factoriesByChainName.Remove(x));
pFactory.HandledProtocols.AsParallel().ForAll(x => _factoriesByProtocolId.Remove(x));
_factoriesById.Remove(pFactory.Id);
return true;
}