private InnerConnectionResult(ShutdownRequest shutdownRequest)
 {
     Debug.Assert(shutdownRequest != null);
     ShutdownRequest      = shutdownRequest;
     SocketError          = null;
     Connection           = null;
     NewConnectionCreated = false;
 }
 private static string CreateExceptionMessage(ShutdownRequest shutdownRequest)
 {
     if (!string.IsNullOrEmpty(shutdownRequest.CloseDescription))
     {
         return($"Использовать этот экземпляр больше нельзя — был вызван " +
                $"Shutdown (DisconnectTimeout: {shutdownRequest.ShutdownTimeout.TotalSeconds:0.#} сек.) со следующим объяснением причины: '{shutdownRequest.CloseDescription}'.");
     }
     else
     {
         return($"Использовать этот экземпляр больше нельзя — был вызван " +
                $"Shutdown (DisconnectTimeout: {shutdownRequest.ShutdownTimeout.TotalSeconds:0.#} сек.) без объяснения причины.");
     }
 }
Exemple #3
0
 private static string CreateExceptionMessage(ShutdownRequest stopRequired)
 {
     if (!string.IsNullOrEmpty(stopRequired.CloseDescription))
     {
         return($"Использовать этот экземпляр больше нельзя — был вызван " +
                $"Shutdown (DisconnectTimeout: {stopRequired.ShutdownTimeout}) со следующим объяснением причины: '{stopRequired.CloseDescription}'.");
     }
     else
     {
         return($"Использовать этот экземпляр больше нельзя — был вызван " +
                $"Shutdown (DisconnectTimeout: {stopRequired.ShutdownTimeout}) без дополнительного объяснения причины.");
     }
 }
 internal VRpcShutdownException(ShutdownRequest shutdownRequest) : base(CreateExceptionMessage(shutdownRequest))
 {
     Debug.Assert(shutdownRequest != null);
     ShutdownRequest = shutdownRequest;
 }
Exemple #5
0
 internal static void ThrowWasShutdownException(ShutdownRequest shutdownRequired) =>
 throw new VRpcWasShutdownException(shutdownRequired);
Exemple #6
0
 internal static VRpcShutdownException ToException(this ShutdownRequest shutdownRequest)
 {
     return(new VRpcShutdownException(shutdownRequest));
 }
Exemple #7
0
 internal VRpcWasShutdownException(ShutdownRequest stopRequired) : base(CreateExceptionMessage(stopRequired))
 {
     Debug.Assert(stopRequired != null);
     StopRequiredState = stopRequired;
 }
Exemple #8
0
 public DebugProxy(ShutdownRequest self)
 {
     _self = self;
 }
 internal static ConnectResult FromShutdownRequest(ShutdownRequest shutdownRequest)
 {
     return(new ConnectResult(ConnectionState.ShutdownRequest, null, shutdownRequest));
 }
 public static InnerConnectionResult FromShutdownRequest(ShutdownRequest shutdownRequest)
 {
     return(new InnerConnectionResult(shutdownRequest));
 }