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


C# Web.HttpApplicationState类代码示例

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


HttpApplicationState类属于System.Web命名空间,在下文中一共展示了HttpApplicationState类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: HttpApplicationStateWrapper

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

示例2: Parent

 // 12/22/2007 Paul.  Inside the timer event, there is no current context, so we need to pass the application.
 public static DataTable Parent(HttpApplicationState Application, string sPARENT_TYPE, Guid gPARENT_ID)
 {
     DataTable dt = new DataTable();
     string sTABLE_NAME = Sql.ToString(Application["Modules." + sPARENT_TYPE + ".TableName"]);
     if ( !Sql.IsEmptyString(sTABLE_NAME) )
     {
         DbProviderFactory dbf = DbProviderFactories.GetFactory(Application);
         using ( IDbConnection con = dbf.CreateConnection() )
         {
             con.Open();
             string sSQL;
             sSQL = "select *"                + ControlChars.CrLf
                  + "  from vw" + sTABLE_NAME + ControlChars.CrLf
                  + " where ID = @ID"         + ControlChars.CrLf;
             using ( IDbCommand cmd = con.CreateCommand() )
             {
                 cmd.CommandText = sSQL;
                 Sql.AddParameter(cmd, "@ID", gPARENT_ID);
                 using ( DbDataAdapter da = dbf.CreateDataAdapter() )
                 {
                     ((IDbDataAdapter)da).SelectCommand = cmd;
                     da.Fill(dt);
                 }
             }
         }
     }
     return dt;
 }
开发者ID:NALSS,项目名称:splendidcrm-99885,代码行数:29,代码来源:Crm.cs

示例3: GetRoles

        public static List<Bubis.Andika.DAL.EF.Roles> GetRoles(HttpApplicationState application)
        {
            if (!RolesIsLoaded(application))
                LoadRoles(application);

            return application[ROLES_PAGES] as List<Bubis.Andika.DAL.EF.Roles>;
        }
开发者ID:BoccaDamian,项目名称:bubis,代码行数:7,代码来源:ApplicationHelper.cs

示例4: Broker

        public Broker(HttpApplicationState app)
        {
            this._app = app;
            LogUtil.Setup();
            StartSuperWebSocketByConfig();

        }
开发者ID:herohut,项目名称:elab,代码行数:7,代码来源:Server.Broker.cs

示例5: HttpApplicationStateWrapper

 public HttpApplicationStateWrapper(System.Web.HttpApplicationState httpApplicationState)
 {
     if (httpApplicationState == null)
     {
         throw new ArgumentNullException("httpApplicationState");
     }
     this._application = httpApplicationState;
 }
开发者ID:netcasewqs,项目名称:nlite.web,代码行数:8,代码来源:HttpApplicationStateWrapper.cs

示例6: OnStart

 public static void OnStart( HttpApplicationState appState )
 {
     // Uncomment to debug bootstrapping process.
     // Note: IIS 7 starts up far too fast for Visual Studio to attach.  If you need to
     //       Debug the bootstrapping process then you need to uncomment this line of code,
     //       connect to Rem through the browser.  This statement will force a debugger to
     //       attach to the worker process and enable you to debug.
     //System.Diagnostics.Debugger.Launch();
     new Bootstrapper().Run ( appState );
 }
开发者ID:divyang4481,项目名称:REM,代码行数:10,代码来源:Global.asax.cs

示例7: GetSessionId

 private string GetSessionId(HttpApplicationState Application)
 {
     if (Application["sessionId"] == null)
     {
         Application.Lock();
         Application["sessionId"] = opentok.CreateSession().Id;
         Application.UnLock();
     }
     return (string)Application["sessionId"];
 }
开发者ID:jeffswartz,项目名称:OpenTok-DotNet,代码行数:10,代码来源:HomeController.cs

示例8: initAssociationManager

 // todo: serialize access to this method
 private SingularAssociationManager initAssociationManager(HttpApplicationState application)
 {
     SingularAssociationManager returnValue = (SingularAssociationManager)application["dossia.openid.associationManager"];
     if (returnValue == null)
     {
         returnValue = new SingularAssociationManager();
         application["dossia.openid.associationManager"] = returnValue;
     }
     return returnValue;
 }
开发者ID:bewest,项目名称:dossia.org-examples,代码行数:11,代码来源:DossiaOpenID.cs

示例9: Term

		// 08/17/2005   Special Term function that helps with a list. 
		public static object Term(HttpApplicationState Application, string sCultureName, string sListName, object oField)
		{
			// 01/11/2008   Protect against uninitialized variables. 
			if ( String.IsNullOrEmpty(sListName) )
				return String.Empty;

			if ( oField == null || oField == DBNull.Value )
				return oField;
			// 11/28/2005   Convert field to string instead of cast.  Cast will not work for integer fields. 
			return Term(Application, sCultureName, sListName + oField.ToString());
		}
开发者ID:huamouse,项目名称:Taoqi,代码行数:12,代码来源:L10n.cs

示例10: BootcampCore

        public BootcampCore([NotNull] HttpServerUtility server, [NotNull] HttpApplicationState application, [CanBeNull] HttpResponse response, BootcampMode mode, bool noisy)
        {
            Assert.ArgumentNotNull(server, "server");
              Assert.ArgumentNotNull(application, "application");

              this.Server = server;
              this.Application = application;
              this.Response = response;
              this.Mode = mode;
              this.Noisy = noisy;
        }
开发者ID:Sitecore,项目名称:Sitecore-Bootcamp,代码行数:11,代码来源:BootcampCore.cs

示例11: Process

        public static void Process(HttpApplicationState Application)
        {
            if ( !bInsideWorkflow )
            {
                bInsideWorkflow = true;
                try
                {
                    //SplendidError.SystemMessage(Application, "Warning", new StackTrace(true).GetFrame(0), "WorkflowUtils.Process Begin");

                    spWORKFLOW_EVENTS_ProcessAll(Application);
                    /*
                    DbProviderFactory dbf = DbProviderFactories.GetFactory(Application);
                    using ( IDbConnection con = dbf.CreateConnection() )
                    {
                        string sSQL ;
                        sSQL = "select *                " + ControlChars.CrLf
                             + "  from vwWORKFLOW_EVENTS" + ControlChars.CrLf
                             + " order by AUDIT_VERSION " + ControlChars.CrLf;
                        using ( IDbCommand cmd = con.CreateCommand() )
                        {
                            cmd.CommandText = sSQL;
                            con.Open();

                            using ( DbDataAdapter da = dbf.CreateDataAdapter() )
                            {
                                ((IDbDataAdapter)da).SelectCommand = cmd;
                                using ( DataTable dt = new DataTable() )
                                {
                                    da.Fill(dt);
                                    if ( dt.Rows.Count > 0 )
                                        SplendidError.SystemMessage(Application, "Warning", new StackTrace(true).GetFrame(0), "Processing " + dt.Rows.Count.ToString() + " workflow events");
                                    foreach ( DataRow row in dt.Rows )
                                    {
                                        Guid gID = Sql.ToGuid(row["ID"]);
                                        // 12/30/2007 Paul.  We are not going to do anything yet, but we do need to clean up the table.
                                        spWORKFLOW_EVENTS_Delete(Application, gID);
                                    }
                                }
                            }
                        }
                    }
                    */
                }
                catch(Exception ex)
                {
                    SplendidError.SystemMessage(Application, "Error", new StackTrace(true).GetFrame(0), Utils.ExpandException(ex));
                }
                finally
                {
                    bInsideWorkflow = false;
                }
            }
        }
开发者ID:NALSS,项目名称:splendidcrm-99885,代码行数:53,代码来源:WorkflowUtils.cs

示例12: Culture

 // 12/22/2007 Paul.  Inside the timer event, there is no current context, so we need to pass the application.
 public static string Culture(HttpApplicationState Application)
 {
     string sCulture = Sql.ToString(Application["CONFIG.default_language"]);
     // 12/22/2007 Paul.  The cache is not available when we are inside the timer event.
     if ( HttpContext.Current != null && HttpContext.Current.Cache != null )
     {
         DataView vwLanguages = new DataView(SplendidCache.Languages());
         vwLanguages.RowFilter = "NAME = '" + sCulture +"'";
         if ( vwLanguages.Count > 0 )
             sCulture = Sql.ToString(vwLanguages[0]["NAME"]);
     }
     if ( Sql.IsEmptyString(sCulture) )
         sCulture = "en-US";
     return L10N.NormalizeCulture(sCulture);
 }
开发者ID:NALSS,项目名称:splendidcrm-99885,代码行数:16,代码来源:SplendidDefaults.cs

示例13: Culture

		// 12/22/2007   Inside the timer event, there is no current context, so we need to pass the application. 
		public static string Culture(HttpApplicationState Application)
		{
			string sCulture = Sql.ToString(Application["CONFIG.default_language"]);
			// 12/22/2007   The cache is not available when we are inside the timer event. 
			// 02/18/2008   The Languages function is now thread safe, so it can be called from the timer. 
			//if ( HttpContext.Current != null && HttpContext.Current.Cache != null )
			{
				DataView vwLanguages = new DataView(SplendidCache.Languages(Application));
				// 05/20/2008   Normalize culture before lookup. 
				vwLanguages.RowFilter = "NAME = '" + L10N.NormalizeCulture(sCulture) +"'";
				if ( vwLanguages.Count > 0 )
					sCulture = Sql.ToString(vwLanguages[0]["NAME"]);
			}
			if ( Sql.IsEmptyString(sCulture) )
				sCulture = "en-US";
			return L10N.NormalizeCulture(sCulture);
		}
开发者ID:huamouse,项目名称:Taoqi,代码行数:18,代码来源:SplendidDefaults.cs

示例14: CompileApplication

 private void CompileApplication()
 {
     this._theApplicationType = BuildManager.GetGlobalAsaxType();
     BuildResultCompiledGlobalAsaxType globalAsaxBuildResult = BuildManager.GetGlobalAsaxBuildResult();
     if (globalAsaxBuildResult != null)
     {
         if (globalAsaxBuildResult.HasAppOrSessionObjects)
         {
             this.GetAppStateByParsingGlobalAsax();
         }
         this._fileDependencies = globalAsaxBuildResult.VirtualPathDependencies;
     }
     if (this._state == null)
     {
         this._state = new HttpApplicationState();
     }
     this.ReflectOnApplicationType();
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:18,代码来源:HttpApplicationFactory.cs

示例15: CheckForUpdates

        internal static async void CheckForUpdates(HttpApplicationState application)
        {
            bool autoSuggestUpdate =
                Conversion.TryCastBoolean(ConfigurationHelper.GetUpdaterParameter("AutoSuggestUpdate"));

            if (autoSuggestUpdate)
            {
                try
                {
                    Updater.UpdateManager updater = new Updater.UpdateManager();
                    Release release = await updater.GetLatestReleaseAsync();

                    if (release != null)
                    {
                        application["UpdateAvailable"] = true;
                    }
                }
                catch (Exception ex)
                {
                    Log.Error("Exception occurred. {Exception}.", ex);
                }
            }
        }
开发者ID:njmube,项目名称:mixerp,代码行数:23,代码来源:UpdateManager.cs


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