protected override IEnumerable <ClassificationRulePackage> Read(IConfigurationSession session)
        {
            ADPagedReader <TransportRule> adpagedReader = session.FindPaged <TransportRule>(PerTenantClassificationDefinitionCollection.GetClassificationDefinitionsContainerId(session), QueryScope.SubTree, null, PerTenantClassificationDefinitionCollection.PriorityOrder, 0);

            TransportRule[]      source = adpagedReader.ReadAllPages();
            ClassificationParser parser = ClassificationParser.Instance;

            return((from rule in source.Select(delegate(TransportRule adRule)
            {
                try
                {
                    ClassificationRulePackage rulePackage = parser.GetRulePackage(adRule.ReplicationSignature);
                    rulePackage.Version = (adRule.WhenChangedUTC ?? (adRule.WhenCreatedUTC ?? DateTime.MinValue));
                    rulePackage.ID = adRule.Name;
                    return rulePackage;
                }
                catch (ParserException ex)
                {
                    PerTenantClassificationDefinitionCollection.Tracer.TraceError <ADObjectId, Exception>((long)this.GetHashCode(), "Rule with identity {0} is corrupted and will not be returned to clients.  Details: {1}", adRule.Id, ex);
                    CachedOrganizationConfiguration.Logger.LogEvent(InfoWorkerEventLogConstants.Tuple_CorruptClassificationDefinition, adRule.Id.ToString(), new object[]
                    {
                        adRule.Id,
                        ex
                    });
                }
                return null;
            })
                    where rule != null
                    select rule).ToList <ClassificationRulePackage>());
        }
 protected override ADNotificationRequestCookie Register(IConfigurationSession session)
 {
     return(ADNotificationAdapter.RegisterChangeNotification <TransportRule>(PerTenantClassificationDefinitionCollection.GetClassificationDefinitionsContainerId(session), new ADNotificationCallback(base.ChangeCallback), session));
 }