Exemple #1
0
        public SchemaComponentsCacheDependency(int pollTime, string[] schemaUris)
        {
            timer = new Timer(
                new TimerCallback(CheckDependencyCallback),
                this, 0, pollTime);
            SchemaUris = schemaUris;
            IComponentFactory componentFactory = FactoryService.ComponentFactory;

            LastPublishDate = componentFactory.LastPublished(schemaUris);
        }
Exemple #2
0
        private void CheckDependencyCallback(object sender)
        {
            IComponentFactory componentFactory  = FactoryService.ComponentFactory;
            DateTime          lastPublishedDate = componentFactory.LastPublished(SchemaUris);

            if (lastPublishedDate > LastPublishDate)
            {
                base.NotifyDependencyChanged(this, EventArgs.Empty);
                timer.Dispose();
            }
        }