public override RouterConfig WithFallback(RouterConfig routerConfig)
{
if (routerConfig is FromConfig || routerConfig is NoRouter)
{
return OverrideUnsetConfig(routerConfig);
}
else if (routerConfig is ConsistentHashingPool)
{
var other = routerConfig as ConsistentHashingPool;
return WithHashMapping(other._hashMapping).OverrideUnsetConfig(other);
}
else
{
throw new ArgumentException(string.Format("Expected ConsistentHashingPool, got {0}", routerConfig),
"routerConfig");
}
}