// Token: 0x06000938 RID: 2360 RVA: 0x00024D44 File Offset: 0x00022F44
        private static void FillHitData(ConditionalMetadataResult result, ConditionalRegistrationLog.ConditionalRegistrationHitMetadata hit)
        {
            result.Cookie = hit.Cookie;
            if (hit == null || hit.HitFiles.Length <= 0)
            {
                result.Files       = null;
                result.CurrentHits = 0;
                return;
            }
            FileInfo    fileInfo    = hit.HitFiles[0];
            XmlDocument xmlDocument = new XmlDocument();

            using (StreamReader streamReader = fileInfo.OpenText())
            {
                xmlDocument.LoadXml(streamReader.ReadToEnd());
            }
            result.Created      = ((xmlDocument.SelectSingleNode("Registration/CreationDate") != null) ? DateTime.Parse(xmlDocument.SelectSingleNode("Registration/CreationDate").InnerText) : DateTime.MinValue);
            result.Description  = ((xmlDocument.SelectSingleNode("Registration/Description") != null) ? xmlDocument.SelectSingleNode("Registration/Description").InnerText : string.Empty);
            result.WhereClause  = ((xmlDocument.SelectSingleNode("Registration/OriginalFilter") != null) ? xmlDocument.SelectSingleNode("Registration/OriginalFilter").InnerText : string.Empty);
            result.SelectClause = ((xmlDocument.SelectSingleNode("Registration/Fetch") != null) ? xmlDocument.SelectSingleNode("Registration/Fetch").InnerText : string.Empty);
            result.CurrentHits  = hit.HitFiles.Length;
            result.MaxHits      = ((xmlDocument.SelectSingleNode("Registration/MaxHits") != null) ? int.Parse(xmlDocument.SelectSingleNode("Registration/MaxHits").InnerText) : 10);
            result.Files        = new string[hit.HitFiles.Length];
            for (int i = 0; i < result.Files.Length; i++)
            {
                result.Files[i] = hit.HitFiles[i].Name;
            }
            result.CurrentHits = hit.HitFiles.Length;
        }
 // Token: 0x06000937 RID: 2359 RVA: 0x00024C4C File Offset: 0x00022E4C
 private void FillCorrectResultType(BaseConditionalRegistration reg, ConditionalRegistrationLog.ConditionalRegistrationHitMetadata hit, out ActiveConditionalMetadataResult active, out ConditionalMetadataResult expired)
 {
     if (reg != null)
     {
         expired = null;
         active  = new ActiveConditionalMetadataResult();
         if (hit != null)
         {
             GetConditionMetadataHandler.FillHitData(active, hit);
         }
         active.Created      = (DateTime)reg.Created;
         active.Cookie       = reg.Cookie;
         active.Description  = reg.Description;
         active.SelectClause = reg.OriginalPropertiesToFetch;
         active.WhereClause  = reg.OriginalFilter;
         ConditionalRegistration conditionalRegistration = reg as ConditionalRegistration;
         if (conditionalRegistration != null)
         {
             active.MaxHits       = conditionalRegistration.MaxHits;
             active.TimeRemaining = ((DateTime)reg.Created.Add(conditionalRegistration.TimeToLive) - DateTime.UtcNow).ToString();
             return;
         }
         active.MaxHits       = int.MaxValue;
         active.TimeRemaining = "Persistent";
         return;
     }
     else
     {
         if (hit != null)
         {
             active  = null;
             expired = new ConditionalMetadataResult();
             GetConditionMetadataHandler.FillHitData(expired, hit);
             return;
         }
         active  = null;
         expired = null;
         return;
     }
 }