Example #1
0
        // Token: 0x06000121 RID: 289 RVA: 0x00007164 File Offset: 0x00005364
        private List <byte[]> GenerateSearchConditions()
        {
            List <byte[]> list = new List <byte[]>();

            if (this.StartDate != null)
            {
                ComplianceSearchCondition complianceSearchCondition = new ComplianceSearchCondition(ComplianceSearchCondition.ConditionName.StartDate, this.StartDate.Value.Ticks.ToString());
                list.Add(complianceSearchCondition.ToBlob());
            }
            if (this.EndDate != null)
            {
                ComplianceSearchCondition complianceSearchCondition2 = new ComplianceSearchCondition(ComplianceSearchCondition.ConditionName.EndDate, this.EndDate.Value.Ticks.ToString());
                list.Add(complianceSearchCondition2.ToBlob());
            }
            return(list);
        }
Example #2
0
        // Token: 0x06000122 RID: 290 RVA: 0x00007204 File Offset: 0x00005404
        private void ParseSearchCondtions(List <byte[]> conditions)
        {
            if (conditions == null || conditions.Count == 0)
            {
                return;
            }
            foreach (byte[] blob in conditions)
            {
                ComplianceSearchCondition complianceSearchCondition = ComplianceSerializer.DeSerialize <ComplianceSearchCondition>(ComplianceSearchCondition.Description, blob);
                if (complianceSearchCondition != null)
                {
                    switch (complianceSearchCondition.Name)
                    {
                    case ComplianceSearchCondition.ConditionName.StartDate:
                    {
                        DateTime value;
                        if (this.TryParseDateString(complianceSearchCondition.Content, out value))
                        {
                            this.StartDate = new DateTime?(value);
                        }
                        break;
                    }

                    case ComplianceSearchCondition.ConditionName.EndDate:
                    {
                        DateTime value;
                        if (this.TryParseDateString(complianceSearchCondition.Content, out value))
                        {
                            this.EndDate = new DateTime?(value);
                        }
                        break;
                    }
                    }
                }
            }
        }