コード例 #1
0
        /// <summary>
        /// The main view of the home page.
        /// </summary>
        public ActionResult Index()
        {
            using (var logTimer = new FAutoScopedLogTimer(this.GetType().ToString(), bCreateNewLog: true))
            {
                var result = new CrashesViewModel();
                using (var entitile = new CrashReportEntities())
                {
                    var unitOfWork = new UnitOfWork(entitile);

                    result.BranchNames = unitOfWork.CrashRepository.GetBranchesAsListItems();
                    result.BranchNames.ForEach(data => data.Selected = false);
                    result.VersionNames = unitOfWork.CrashRepository.GetVersionsAsListItems();
                    result.VersionNames.ForEach(data => data.Selected = false);
                    result.PlatformNames = unitOfWork.CrashRepository.GetPlatformsAsListItems();
                    result.PlatformNames.ForEach(data => data.Selected = false);
                    result.EngineModes = unitOfWork.CrashRepository.GetEngineModesAsListItems();
                    result.EngineModes.ForEach(data => data.Selected = false);
                    result.EngineVersions = unitOfWork.CrashRepository.GetEngineVersionsAsListItems();
                    result.EngineVersions.ForEach(data => data.Selected = false);
                    result.IsVanilla      = null;
                    result.GenerationTime = logTimer.GetElapsedSeconds().ToString("F2");
                }

                return(View("Index", result));
            }
        }
コード例 #2
0
ファイル: UnitOfWork.cs プロジェクト: nicklinesla/4.21-arcore
 /// <summary>
 ///
 /// </summary>
 /// <param name="disposing"></param>
 protected virtual void Dispose(bool disposing)
 {
     _entityContext.Database.Connection.Close();
     _CrashRepository        = null;
     _buggRepository         = null;
     _functionRepository     = null;
     _userRepository         = null;
     _callstackRepository    = null;
     _userGroupRepository    = null;
     _errorMessageRepository = null;
     _entityContext.Dispose();
     _entityContext = null;
 }
コード例 #3
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="entityContext">A reference to the *single* instance of the data context.</param>
 public UserRepository(CrashReportEntities entityContext)
 {
     _entityContext = entityContext;
 }
コード例 #4
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="entityContext">A reference to the *single* instance of the data context.</param>
 public ErrorMessageRepository(CrashReportEntities entityContext)
 {
     _entityContext = entityContext;
 }
コード例 #5
0
ファイル: DataRepository.cs プロジェクト: eriser/epicgames
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="entityContext">A reference to the *single* instance of the data context.</param>
 public DataRepository(CrashReportEntities entityContext)
 {
     _entityContext = entityContext;
 }
コード例 #6
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="entityContext">A reference to the *single* instance of the data context.</param>
 public CallStackRepository(CrashReportEntities entityContext)
 {
     _entityContext = entityContext;
 }
コード例 #7
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="entityContext">An entity context object</param>
 public UnitOfWork(CrashReportEntities entityContext)
 {
     this._entityContext = entityContext;
 }
コード例 #8
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="entityContext">A reference to the *single* instance of the data context.</param>
 public FunctionRepository(CrashReportEntities entityContext)
 {
     _entityContext = entityContext;
 }
コード例 #9
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="entityContext">A reference to the *single* instance of the data context.</param>
 public ErrorMessageRepository(CrashReportEntities entityContext)
 {
     _entityContext = entityContext;
 }
コード例 #10
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="entityContext">A reference to the *single* instance of the data context.</param>
 public CrashRepository(CrashReportEntities entityContext)
 {
     _entityContext = entityContext;
     _entityContext.Database.CommandTimeout = 1200;
 }
コード例 #11
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="entityContext">A reference to the *single* instance of the data context.</param>
 public CallStackRepository(CrashReportEntities entityContext)
 {
     _entityContext = entityContext;
 }
コード例 #12
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="entityContext">A reference to the *single* instance of the data context.</param>
 public FunctionRepository(CrashReportEntities entityContext)
 {
     _entityContext = entityContext;
 }
コード例 #13
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="entityContext">A reference to the *single* instance of the data context.</param>
 public CrashRepository(CrashReportEntities entityContext)
 {
     _entityContext = entityContext;
     _entityContext.Database.CommandTimeout = 1200;
 }
コード例 #14
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="entityContext">A reference to the *single* instance of the data context.</param>
 public UserGroupRepository(CrashReportEntities entityContext)
 {
     _entityContext = entityContext;
 }
コード例 #15
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="entityContext">An entity context object</param>
 public UnitOfWork(CrashReportEntities entityContext)
 {
     this._entityContext = entityContext;
     _entityContext.Database.CommandTimeout = 600;
 }
コード例 #16
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="entityContext">An entity context object</param>
 public UnitOfWork(CrashReportEntities entityContext)
 {
     this._entityContext = entityContext;
 }