• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# SessionState.HttpSessionState类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Web.SessionState.HttpSessionState的典型用法代码示例。如果您正苦于以下问题:C# HttpSessionState类的具体用法?C# HttpSessionState怎么用?C# HttpSessionState使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



HttpSessionState类属于System.Web.SessionState命名空间,在下文中一共展示了HttpSessionState类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: 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


示例5: 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


示例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


示例16: GetUser

 public static Bubis.Andika.DAL.EF.Users GetUser(HttpSessionState session)
 {
     if (UserIsAuthenticated(session))
         return session[SESSION_USER] as Bubis.Andika.DAL.EF.Users;
     else
         throw new Bubis.Andika.Core.Exceptions.SessionExpiredException();
 }
开发者ID:BoccaDamian,项目名称:bubis,代码行数:7,代码来源:SessionHelper.cs


示例17: GameServiceProxy

        /// <summary>
        /// A constructor.
        /// </summary>
        /// <param name="e_game_type">A type of a game</param>
        /// <param name="queryString">URL query string</param>
        /// <param name="userSessionID">User's session ID from Session object</param>
        /// <param name="gameSessionID">Game session ID</param>
        public GameServiceProxy(EGameType e_game_type, string queryString, string userSessionID, string gameSessionID, HttpSessionState Session)
        {
            if (GS == null)
            {
                GS = new com.sanuko.www.GameService();
            }

            if (gameSessionID == null)
            {
                this.gameSessionID = "";
            }
            else
            {
                this.gameSessionID = gameSessionID;
            }

            this.Session = Session;

            this.e_game_type = e_game_type;
            this.queryString = queryString.Replace("?", "").Replace("&", ";");
            if (userSessionID == null)
            {
                this.userSessionID = "";
            }
            else
            {
                this.userSessionID = userSessionID;
            }
        }
开发者ID:eur00t,项目名称:JS-web-games,代码行数:36,代码来源:GameServiceProxy.cs


示例18: SaveIntegrationSession

 public static void SaveIntegrationSession(HttpSessionState session, string endpointUri, string apiKey, string dataServiceEndpoint, string activeUserName)
 {
     session[Constants.SessionApiKey] = apiKey;
     session[Constants.SessionLodEndpoint] = endpointUri;
     session[Constants.SessionDataServiceEndpoint] = dataServiceEndpoint;
     session[Constants.SessionActiveUserName] = activeUserName;
 }
开发者ID:LearnOnDemandSystems,项目名称:APIDemo,代码行数:7,代码来源:SessionManager.cs


示例19: NotifyObserver

 public void NotifyObserver(HttpSessionState currentSession, bool isFinised)
 {
     const string message = "finished.";
     if (NotifyLogger != null) NotifyLogger(message); //+ "\n"
     var args = new NotificationEventArgs(currentSession, message, isFinised);
     OnAsyncNotificationEvent(args);//for web
 }
开发者ID:Letractively,项目名称:henoch,代码行数:7,代码来源:SubjectBase.cs


示例20: RaiseOnEnd

 internal void RaiseOnEnd(HttpSessionState sessionState)
 {
     if (this._sessionEndEventHandlerCount > 0)
     {
         HttpApplicationFactory.EndSession(sessionState, this, EventArgs.Empty);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:SessionOnEndTarget.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# SessionState.SessionStateItemCollection类代码示例发布时间:2022-05-26
下一篇:
C# Protocols.LogicalMethodInfo类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap