예제 #1
0
 public Dictionary <string, int> SearchIndexHash(SiteSettings ss)
 {
     if (AccessStatus != Databases.AccessStatuses.Selected)
     {
         return(null);
     }
     else
     {
         var searchIndexHash = new Dictionary <string, int>();
         SiteInfo.TenantCaches[Sessions.TenantId()]
         .SiteMenu.Breadcrumb(SiteId).SearchIndexes(searchIndexHash, 100);
         SiteId.SearchIndexes(searchIndexHash, 200);
         UpdatedTime.SearchIndexes(searchIndexHash, 200);
         WikiId.SearchIndexes(searchIndexHash, 1);
         Title.SearchIndexes(searchIndexHash, 4);
         Body.SearchIndexes(searchIndexHash, 200);
         Comments.SearchIndexes(searchIndexHash, 200);
         Creator.SearchIndexes(searchIndexHash, 100);
         Updator.SearchIndexes(searchIndexHash, 100);
         CreatedTime.SearchIndexes(searchIndexHash, 200);
         SearchIndexExtensions.OutgoingMailsSearchIndexes(
             searchIndexHash, "Wikis", WikiId);
         return(searchIndexHash);
     }
 }
예제 #2
0
 public Dictionary <string, int> SearchIndexHash(Context context, SiteSettings ss)
 {
     if (AccessStatus != Databases.AccessStatuses.Selected)
     {
         return(null);
     }
     else
     {
         var searchIndexHash = new Dictionary <string, int>();
         SiteInfo.TenantCaches.Get(context.TenantId)?
         .SiteMenu
         .Breadcrumb(context: context, siteId: SiteId)
         .SearchIndexes(context, searchIndexHash, 100);
         SiteId.SearchIndexes(context, searchIndexHash, 200);
         UpdatedTime.SearchIndexes(context, searchIndexHash, 200);
         WikiId.SearchIndexes(context, searchIndexHash, 1);
         Title.SearchIndexes(context, searchIndexHash, 4);
         Body.SearchIndexes(context, searchIndexHash, 200);
         Comments.SearchIndexes(context, searchIndexHash, 200);
         Creator.SearchIndexes(context, searchIndexHash, 100);
         Updator.SearchIndexes(context, searchIndexHash, 100);
         CreatedTime.SearchIndexes(context, searchIndexHash, 200);
         SearchIndexExtensions.OutgoingMailsSearchIndexes(
             context: context,
             searchIndexHash: searchIndexHash,
             referenceType: "Wikis",
             referenceId: WikiId);
         return(searchIndexHash);
     }
 }
예제 #3
0
        public string FullText(
            SiteSettings ss, bool backgroundTask = false, bool onCreating = false)
        {
            if (Parameters.Search.Provider != "FullText")
            {
                return(null);
            }
            if (!Parameters.Search.CreateIndexes && !backgroundTask)
            {
                return(null);
            }
            if (AccessStatus == Databases.AccessStatuses.NotFound)
            {
                return(null);
            }
            var fullText = new List <string>();

            SiteInfo.TenantCaches[Sessions.TenantId()]
            .SiteMenu.Breadcrumb(SiteId).FullText(fullText);
            SiteId.FullText(fullText);
            ss.EditorColumns.ForEach(columnName =>
            {
                switch (columnName)
                {
                case "WikiId":
                    WikiId.FullText(fullText);
                    break;

                case "Title":
                    Title.FullText(fullText);
                    break;

                case "Body":
                    Body.FullText(fullText);
                    break;

                case "Comments":
                    Comments.FullText(fullText);
                    break;
                }
            });
            Creator.FullText(fullText);
            Updator.FullText(fullText);
            CreatedTime.FullText(fullText);
            UpdatedTime.FullText(fullText);
            if (!onCreating)
            {
                FullTextExtensions.OutgoingMailsFullText(fullText, "Wikis", WikiId);
            }
            return(fullText
                   .Where(o => !o.IsNullOrEmpty())
                   .Select(o => o.Trim())
                   .Distinct()
                   .Join(" "));
        }
예제 #4
0
 public void UpdateTimerTime()
 {
     if (_isNeedSchedule)
     {
         if (_isPause)
         {
             _timeForSchedule += Time.deltaTime;
         }
         else if (Time.timeSinceLevelLoad >= _timeForSchedule)
         {
             _isNeedSchedule = _isRepeat;
             UpdatedTime.SafeRaise();
             if (_isRepeat)
             {
                 RunTimer(_timeScheduleInterval, _isRepeat);
             }
         }
     }
 }
예제 #5
0
        private void ExecuteUpdate()
        {
            UpdatedTime = DateTime.Now;

            _eventAggregator.GetEvent <UpdateEvent>().Publish(UpdatedTime.ToString());
        }
예제 #6
0
 public override string ToString()
 {
     return("UserId = " + UserId.ToString() + ",Name = " + Name + ",Password = "******",FirstName = " + FirstName + ",LastName = " + LastName + ",Email = " + Email + ",IsLoggedIn = " + IsLoggedIn.ToString() + ",HasAdminRight = " + HasAdminRight.ToString() + ",HasRefundright = " + HasRefundright.ToString() + ",HasDiscountRight = " + HasDiscountRight.ToString() + ",EnteredBy = " + EnteredBy.ToString() + ",EnteredTime = " + EnteredTime.ToString() + ",UpdatedBy = " + UpdatedBy.ToString() + ",UpdatedTime = " + UpdatedTime.ToString() + ",DeactivatedTime = " + DeactivatedTime.ToString());
 }
예제 #7
0
 private DateTime CalculateExpirationDate() => UpdatedTime.AddMinutes(VerificationRequestTimeout);
예제 #8
0
 /// <summary>
 /// override
 /// </summary>
 /// <returns></returns>
 public override int GetHashCode()
 {
     return(UniqueName.GetHashCode() ^ UpdatedTime.GetHashCode() ^ ExpirationTime.GetHashCode() ^ IsOptimized.GetHashCode());
 }