예제 #1
0
 internal ConnectionCallback(Reference ir, IGetConnectionCallback cb, bool cached)
 {
     Debug.Assert(!ir.IsFixed);
     _ir     = ir;
     _cb     = cb;
     _cached = cached;
 }
예제 #2
0
 internal CreateConnectionCallback(Reference rr, IReadOnlyList <Endpoint>?endpoints,
                                   IGetConnectionCallback cb)
 {
     Debug.Assert(!rr.IsFixed);
     _rr        = rr;
     _endpoints = endpoints;
     if (_endpoints != null)
     {
         Debug.Assert(_endpoints.Count > 1); // at least 2 endpoints, and we always skip the first one
         _endpointEnumerator = _endpoints.GetEnumerator();
         _hasMoreEndpoints   = _endpointEnumerator.MoveNext();
         Debug.Assert(_hasMoreEndpoints);
         _hasMoreEndpoints = _endpointEnumerator.MoveNext();
         Debug.Assert(_hasMoreEndpoints);
     }
     else
     {
         _hasMoreEndpoints = false;
     }
     _callback = cb;
 }
예제 #3
0
 internal LocatorEndpointsCallback(Reference ir, IGetConnectionCallback cb)
 {
     Debug.Assert(!ir.IsFixed);
     _ir = ir;
     _cb = cb;
 }