Source/NFX/Glue/Implementation/ServerHandler.cs
/// <summary>
/// Handles request synchronously in the context of the calling thread. Returns NULL for one-way calls
/// </summary>
Handles request synchronously in the context of the calling thread. Returns NULL for one-way calls
Handles request synchronously in the context of the calling thread . Returns NULL for one - way calls
public ResponseMsg HandleRequestSynchronously(RequestMsg request)
        {
              try
              {
                 return inspectAndHandleRequest(request);
              }
              catch(Exception error) 
              {
                 if (request.OneWay)
                 {
                    this.WriteLog(LogSrc.Server,
                                 MessageType.Error,
                                 string.Format(StringConsts.GLUE_SERVER_ONE_WAY_CALL_ERROR + error.ToMessageWithType()),
                                 from: "SrvrHndlr.HandleRequestSynchronously(ReqMsg)",
                                 exception: error
                                );
                     return null;
                 }
                 else
                 {
                     var response = Glue.ServerHandleRequestFailure(request.RequestID, request.OneWay, error, request.BindingSpecificContext);
                     return response;
                 }
              }
              finally
              {
                 NFX.ApplicationModel.ExecutionContext.__SetThreadLevelContext(null, null, null);
              }
        }
public ResponseMsg HandleRequestSynchronously ( RequestMsg request ) { try { return inspectAndHandleRequest ( request ) ; } catch ( Exception error ) { if ( request . OneWay ) { this . WriteLog ( LogSrc . Server , MessageType . Error , string . Format ( StringConsts . GLUE_SERVER_ONE_WAY_CALL_ERROR + error . ToMessageWithType ( ) ) , from : " " , exception : error ) ; return null ; } else { var response = Glue . ServerHandleRequestFailure ( request . RequestID , request . OneWay , error , request . BindingSpecificContext ) ; return response ; } } finally { NFX . ApplicationModel . ExecutionContext . __SetThreadLevelContext ( null , null , null ) ; } }
Handles request synchronously in the context of the calling thread.
Handles request synchronously in the context of the calling thread .
//nothing may leak //because it is one-way, the caller will never know about it //call goes via Glue because there may be some global event handlers
request
RequestMsg