private void SetNodeDead(IMemcachedNode n1, List<IMemcachedNode> activeNodes) { // Having to use reflection to set a private field var prop = n1.GetType().GetField("internalPoolImpl", BindingFlags.NonPublic | BindingFlags.Instance); var internalPoolImpl = prop.GetValue(n1); var prop2 = internalPoolImpl.GetType().GetField("isAlive", BindingFlags.NonPublic | BindingFlags.Instance); prop2.SetValue(internalPoolImpl, false); locator = new SessionNodeLocator(); locator.Initialize(activeNodes); }
public void Setup() { locator = new SessionNodeLocator(); locator.Reset(); }