Пример #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = (UniqueName != null ? UniqueName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (OperatorToken != null ? OperatorToken.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Version.GetHashCode();
         return(hashCode);
     }
 }
Пример #2
0
 public NextQueue GetQueue(IHttpContext context)
 {
     if (Type == ThreadQueueType.Single)
     {
         return(QueueGroup.Queues[0]);
     }
     else if (Type == ThreadQueueType.Multiple)
     {
         return(QueueGroup.Next());
     }
     else if (Type == ThreadQueueType.DataUnique)
     {
         string value = null;
         if (UniqueName != null)
         {
             if (string.Compare(UniqueName, "$path", true) == 0)
             {
                 value = context.Request.GetSourcePath();
             }
             else if (UniqueName.IndexOf("__") == 0)
             {
                 return(mUniqueQueueGroup.Has(UniqueName.GetHashCode()));
             }
             else
             {
                 value = context.Request.Header[UniqueName];
                 if (value == null)
                 {
                     context.Data.TryGetString(UniqueName, out value);
                 }
             }
         }
         if (value == null)
         {
             value = context.Request.GetSourceUrl();
         }
         return(mUniqueQueueGroup.Has(value.GetHashCode()));
     }
     return(QueueGroup.Next());
 }
Пример #3
0
 public override int GetHashCode()
 {
     return(UniqueName.GetHashCode());
 }
Пример #4
0
 /// <summary>
 /// override
 /// </summary>
 /// <returns></returns>
 public override int GetHashCode()
 {
     return(UniqueName.GetHashCode() ^ UpdatedTime.GetHashCode() ^ ExpirationTime.GetHashCode() ^ IsOptimized.GetHashCode());
 }