//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ public T Send(IClientContext pContext, SessionType pSessionType) { switch (pSessionType) { case SessionType.Default: vSess = pContext.ActiveSess; break; case SessionType.App: vSess = pContext.AppSess; break; case SessionType.Person: vSess = pContext.PersonSess; break; } pContext.LogDebug("SEND: " + pSessionType + " / " + vSess + " / " + pContext.AppSess); FabricResponse <T> resp = GetFabricResponse(pContext); if (resp.RespError != null) { pContext.LogError("Request Exception: " + resp.RespError.Error.Code + " / " + resp.RespError.Error.Name + " / " + resp.RespError.Error.Message); throw new FabricErrorException(resp.RespError); } if (resp.OauthError != null) { pContext.LogError("Request OAuth Exception: " + resp.OauthError.error + " / " + resp.OauthError.error_description); throw new FabricErrorException(resp.OauthError); } return(resp.Data); }