当前位置: 首页>>代码示例>>C#>>正文


C# SessionState.HttpSessionState类代码示例

本文整理汇总了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>;
 }
开发者ID:bjornebjornson,项目名称:Gema2008,代码行数:7,代码来源:HttpSessionStateTask.cs

示例2: Invoke

 public void Invoke(HttpSessionState session, DataInputStream input)
 {
     _result = HttpProcessor.GetClient<CommentServiceSoapClient>(session).GetComment(
         input.ReadString(),
         input.ReadString(),
         input.ReadInt32());
 }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:7,代码来源:GetCommentGateway.cs

示例3: CreateSessionWrapper

 internal static HttpSessionStateWrapper CreateSessionWrapper(HttpSessionState httpSessionState)
 {
     HttpSessionStateWrapper httpSessionStateWrapper = new HttpSessionStateWrapper(httpSessionState);
     //if (httpSessionState.IsNewSession)
     //    httpSessionStateWrapper.NotifyCreated();
     return httpSessionStateWrapper;
 }
开发者ID:apakian,项目名称:fluorinefx,代码行数:7,代码来源:HttpSessionStateWrapper.cs

示例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();
 }
开发者ID:ByteCarrot,项目名称:Aspy,代码行数:7,代码来源:ObjectDumper.cs

示例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);
                }
            }
        }
开发者ID:appcelerator,项目名称:entourage,代码行数:34,代码来源:Service.cs

示例6: Invoke

 public void Invoke(HttpSessionState session, DataInputStream input)
 {
     HttpProcessor.GetClient<AskServiceSoapClient>(session).CompleteQuestion(
        input.ReadString(),
        input.ReadString(),
        input.ReadString());
 }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:7,代码来源:CompleteQuestionGateway.cs

示例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);
        }
开发者ID:shaileshpandey,项目名称:TRB-ServiceProvider,代码行数:35,代码来源:OTIdPHttpModule.cs

示例8: Invoke

 public void Invoke(HttpSessionState session, DataInputStream input)
 {
     _result = HttpProcessor.GetClient<PhotoServiceSoapClient>(session).GetPhotosForCollection(
         input.ReadString(),
         input.ReadString(),
         input.ReadInt32());
 }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:7,代码来源:GetPhotosForCollectionGateway.cs

示例9: HttpSessionStateWrapper

 public HttpSessionStateWrapper(HttpSessionState httpSessionState)
 {
     if (httpSessionState == null) {
         throw new ArgumentNullException("httpSessionState");
     }
     _session = httpSessionState;
 }
开发者ID:frenzypeng,项目名称:securityswitch,代码行数:7,代码来源:HttpSessionStateWrapper.cs

示例10: Invoke

 public void Invoke(HttpSessionState session, DataInputStream input)
 {
     _result = HttpProcessor.GetClient<TagServiceSoapClient>(session).UploadTags(
         input.ReadString(),
         input.ReadString(),
         input.ReadTagUpdate());
 }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:7,代码来源:UploadTagsGateway.cs

示例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();
            }
        }
开发者ID:dramosti,项目名称:Web,代码行数:25,代码来源:HlpWebDropDownList.cs

示例12: Invoke

 public void Invoke(HttpSessionState session, DataInputStream input)
 {
     _result = HttpProcessor.GetClient<DashboardServiceSoapClient>(session).GetThumbnail(
         input.ReadString(),
         input.ReadString(),
         input.ReadString());
 }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:7,代码来源:GetThumbnailGateway.cs

示例13: RaiseOnEnd

        internal void RaiseOnEnd(HttpSessionState sessionState) {
            Debug.Trace("SessionOnEnd", "Firing OnSessionEnd for " + sessionState.SessionID);

            if (_sessionEndEventHandlerCount > 0) {
                HttpApplicationFactory.EndSession(sessionState, this, EventArgs.Empty);
            }
        }
开发者ID:JianwenSun,项目名称:cc,代码行数:7,代码来源:SessionStateModule.cs

示例14: GetMessageForUser

 public static string GetMessageForUser(HttpSessionState session)
 {
     if (UserHaveMessage(session))
         return session[USER_MESSAGE].ToString();
     else
         return string.Empty;
 }
开发者ID:BoccaDamian,项目名称:bubis,代码行数:7,代码来源:SessionHelper.cs

示例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);
                }
            }
        }
开发者ID:vipwan,项目名称:CommunityServer,代码行数:25,代码来源:CommonControlsConfigurer.cs


注:本文中的System.Web.SessionState.HttpSessionState类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。