本文整理汇总了C#中System.Web.SessionState.HttpSessionState类的典型用法代码示例。如果您正苦于以下问题:C# HttpSessionState类的具体用法?C# HttpSessionState怎么用?C# HttpSessionState使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HttpSessionState类属于System.Web.SessionState命名空间,在下文中一共展示了HttpSessionState类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: getRecentSearchJobs
public static IList<ISearchJobDto> getRecentSearchJobs(HttpSessionState session)
{
SessionKey key = SessionKey.SearchJobs;
if(get(key, session) == null)
set(key, session, new List<ISearchJobDto>());
return get(key, session) as IList<ISearchJobDto>;
}
示例2: Invoke
public void Invoke(HttpSessionState session, DataInputStream input)
{
_result = HttpProcessor.GetClient<CommentServiceSoapClient>(session).GetComment(
input.ReadString(),
input.ReadString(),
input.ReadInt32());
}
示例3: CreateSessionWrapper
internal static HttpSessionStateWrapper CreateSessionWrapper(HttpSessionState httpSessionState)
{
HttpSessionStateWrapper httpSessionStateWrapper = new HttpSessionStateWrapper(httpSessionState);
//if (httpSessionState.IsNewSession)
// httpSessionStateWrapper.NotifyCreated();
return httpSessionStateWrapper;
}
示例4: Dump
public List<Node> Dump(HttpSessionState session)
{
return session.Keys.Cast<string>()
.OrderBy(x => x)
.Select(x => Process("item", x, session[x], 0))
.ToList();
}
示例5: InvokeServiceHandler
/// <summary>
/// Invokes the appropriate service handler (registered using a ServiceAttribute)
/// </summary>
public void InvokeServiceHandler(Message request, Message response, HttpSessionState session, HttpResponse httpresponse)
{
if (request.Type.Equals(this.Request))
{
try
{
Message temp_response = response;
Object[] parameters = new Object[] { request, temp_response };
Object declaringTypeInstance = Activator.CreateInstance(this.MethodInfo.DeclaringType);
this.MethodInfo.Invoke(declaringTypeInstance, parameters);
temp_response = (Message)parameters[1];
temp_response.Type = this.Response;
temp_response.Scope = request.Scope;
temp_response.Version = request.Version;
temp_response.RequestDetails = request.RequestDetails;
Logger.Instance.Debug("Invoked service for request: " + request.Type);
Dispatcher.Instance.EnqueueOutgoingMessage(temp_response, session.SessionID);
}
catch (Exception e)
{
String err = "";
err+="Exception while invoking service handler - " + this.MethodInfo.Name + " in " + this.MethodInfo.DeclaringType.Name + "\n";
err += "Request Message - " + request.Type + "\n";
err += "Response Message - " + response.Type + "\n";
err += "Message - " + e.Message + "\n";
err += "Stacktrace - " + e.StackTrace + "\n";
Logger.Instance.Error(err);
}
}
}
示例6: Invoke
public void Invoke(HttpSessionState session, DataInputStream input)
{
HttpProcessor.GetClient<AskServiceSoapClient>(session).CompleteQuestion(
input.ReadString(),
input.ReadString(),
input.ReadString());
}
示例7: HandleIdPSSORequest
/// <summary>
/// Handles the id PSSO request.
/// </summary>
/// <param name="context">The context.</param>
/// <param name="request">The request.</param>
/// <param name="response">The response.</param>
/// <param name="session">The session.</param>
private void HandleIdPSSORequest(HttpContext context, HttpRequest request, HttpResponse response, HttpSessionState session)
{
if (request.Cookies[FormsAuthentication.FormsCookieName] == null) return;
var cookiestr = request.Cookies[FormsAuthentication.FormsCookieName].Value;
var tkt = FormsAuthentication.Decrypt(cookiestr);
if (tkt == null) return;
var attributes = new MultiStringDictionary
{
{Constants.SUBJECT, tkt.Name},
{"NickName", "defaultNickName"},
{"Role", "Admin"}
};
if (request[Constants.RESUME_PATH] == null) return;
var attributesToSend = new MultiStringDictionary();
foreach (var pair in attributes)
{
var key = pair.Key;
foreach (string value in pair.Value)
{
attributesToSend.Add(key, value);
}
}
var strRedirect = "https://" + ConfigurationManager.AppSettings["PFHost"] + request[Constants.RESUME_PATH];
strRedirect = SetOpenToken(context, strRedirect, attributesToSend);
response.Redirect(strRedirect, true);
}
示例8: Invoke
public void Invoke(HttpSessionState session, DataInputStream input)
{
_result = HttpProcessor.GetClient<PhotoServiceSoapClient>(session).GetPhotosForCollection(
input.ReadString(),
input.ReadString(),
input.ReadInt32());
}
示例9: HttpSessionStateWrapper
public HttpSessionStateWrapper(HttpSessionState httpSessionState)
{
if (httpSessionState == null) {
throw new ArgumentNullException("httpSessionState");
}
_session = httpSessionState;
}
示例10: Invoke
public void Invoke(HttpSessionState session, DataInputStream input)
{
_result = HttpProcessor.GetClient<TagServiceSoapClient>(session).UploadTags(
input.ReadString(),
input.ReadString(),
input.ReadTagUpdate());
}
示例11: CarregarValores
public void CarregarValores(HttpSessionState Session, string sWhere = "")
{
if (this.DataSource == null)
{
string sDataTable = "DataTable" + this.ID;
DataTable dtValores = (DataTable)Session[sDataTable];
//if (dtValores == null)
{
Tabela oTabelas = ((UsuarioWeb)Session["ObjetoUsuario"]).oTabelas;
StringBuilder strExpressao = new StringBuilder();
strExpressao.Append(sExpressaoSqlDadosConsulta);
strExpressao.Replace("<CD_EMPRESA>", "'" + oTabelas.sEmpresa + "'");
strExpressao.Replace("<CD_VEND>", "'" + oTabelas.CdVendedorAtual + "'");
if (sWhere != "")
{
strExpressao.Append(" Where " + sWhere);
}
dtValores = oTabelas.hlpDbFuncoes.qrySeekRet(strExpressao.ToString());
Session[sDataTable] = dtValores;
}
this.DataSource = dtValores;
this.DataBind();
}
}
示例12: Invoke
public void Invoke(HttpSessionState session, DataInputStream input)
{
_result = HttpProcessor.GetClient<DashboardServiceSoapClient>(session).GetThumbnail(
input.ReadString(),
input.ReadString(),
input.ReadString());
}
示例13: RaiseOnEnd
internal void RaiseOnEnd(HttpSessionState sessionState) {
Debug.Trace("SessionOnEnd", "Firing OnSessionEnd for " + sessionState.SessionID);
if (_sessionEndEventHandlerCount > 0) {
HttpApplicationFactory.EndSession(sessionState, this, EventArgs.Empty);
}
}
示例14: GetMessageForUser
public static string GetMessageForUser(HttpSessionState session)
{
if (UserHaveMessage(session))
return session[USER_MESSAGE].ToString();
else
return string.Empty;
}
示例15: FCKClearTempStore
internal static void FCKClearTempStore(HttpSessionState session)
{
if (session == null)
return;
var uploads = session["tempFCKUploads"] as List<FCKTempUploadsInfo>;
if (uploads == null) return;
IDataStore store = null;
foreach (var u in uploads.Where(u => u.Files.Count > 0))
{
if (store == null)
store = StorageFactory.GetStorage(u.TenantID.ToString(), "fckuploaders");
if (u.IsEdit)
{
foreach (var fileName in u.Files)
store.DeleteFiles(u.StoreDomain, u.FolderID, fileName.ToLower(), false);
}
else
{
store.DeleteFiles(u.StoreDomain, u.FolderID, "*", false);
}
}
}