コード例 #1
0
        public DebugCoordinationManager(DebugConnection debugConnection, ILogger <DebugCoordinationManager> logger = null)
        {
            if (debugConnection == null)
            {
                throw new ArgumentNullException(nameof(debugConnection));
            }

            _debugConnection = debugConnection;
            _logger          = logger;

            _proxyLazy = new DisposableAsyncLazy <IProxy <CoordinationManagerSkeleton> >(
                factory: CreateProxyAsync,
                disposal: p => p.DisposeAsync(),
                options: DisposableAsyncLazyOptions.Autostart | DisposableAsyncLazyOptions.ExecuteOnCallingThread);

            _sessionLazy = new DisposableAsyncLazy <Session>(
                factory: GetSessionInternalAsync,
                options: DisposableAsyncLazyOptions.ExecuteOnCallingThread | DisposableAsyncLazyOptions.RetryOnFailure);
        }
コード例 #2
0
        public DebugLogicalEndPoint(DebugConnection debugConnection, EndPointAddress endPoint, ILogger <DebugLogicalEndPoint> logger = null)
        {
            if (debugConnection == null)
            {
                throw new ArgumentNullException(nameof(debugConnection));
            }

            if (endPoint == default)
            {
                throw new ArgumentDefaultException(nameof(endPoint));
            }

            _debugConnection = debugConnection;
            EndPoint         = endPoint;
            _logger          = logger;

            _proxyLazy = new DisposableAsyncLazy <IProxy <LogicalEndPointSkeleton> >(
                factory: CreateProxyAsync,
                disposal: p => p.DisposeAsync(),
                options: DisposableAsyncLazyOptions.Autostart | DisposableAsyncLazyOptions.ExecuteOnCallingThread);
        }