Exemplo n.º 1
0
 public void SetFilters(SubscriptionFilters filters)
 {
     if (this.m_subscription == null)
     {
         throw new NotConnectedException();
     }
     this.m_subscription.SetFilters(filters);
     this.GetFilters();
 }
Exemplo n.º 2
0
        public virtual object Clone()
        {
            SubscriptionFilters filters = (SubscriptionFilters)base.MemberwiseClone();

            filters.m_categories = (CategoryCollection)this.m_categories.Clone();
            filters.m_areas      = (StringCollection)this.m_areas.Clone();
            filters.m_sources    = (StringCollection)this.m_sources.Clone();
            return(filters);
        }
Exemplo n.º 3
0
 public SubscriptionFilters GetFilters()
 {
     if (this.m_subscription == null)
     {
         throw new NotConnectedException();
     }
     this.m_filters    = this.m_subscription.GetFilters();
     this.m_categories = new CategoryCollection(this.m_filters.Categories.ToArray());
     this.m_areas      = new StringCollection(this.m_filters.Areas.ToArray());
     this.m_sources    = new StringCollection(this.m_filters.Sources.ToArray());
     return((SubscriptionFilters)this.m_filters.Clone());
 }
Exemplo n.º 4
0
 protected Subscription(SerializationInfo info, StreamingContext context)
 {
     this.m_server       = null;
     this.m_subscription = null;
     this.m_state        = new SubscriptionState();
     this.m_name         = null;
     this.m_filters      = new SubscriptionFilters();
     this.m_categories   = new CategoryCollection();
     this.m_areas        = new StringCollection();
     this.m_sources      = new StringCollection();
     this.m_attributes   = new AttributeDictionary();
     this.m_state        = (SubscriptionState)info.GetValue("ST", typeof(SubscriptionState));
     this.m_filters      = (SubscriptionFilters)info.GetValue("FT", typeof(SubscriptionFilters));
     this.m_attributes   = (AttributeDictionary)info.GetValue("AT", typeof(AttributeDictionary));
     this.m_name         = this.m_state.Name;
     this.m_categories   = new CategoryCollection(this.m_filters.Categories.ToArray());
     this.m_areas        = new StringCollection(this.m_filters.Areas.ToArray());
     this.m_sources      = new StringCollection(this.m_filters.Sources.ToArray());
 }
Exemplo n.º 5
0
 public Subscription(Opc.Ae.Server server, ISubscription subscription, SubscriptionState state)
 {
     this.m_server       = null;
     this.m_subscription = null;
     this.m_state        = new SubscriptionState();
     this.m_name         = null;
     this.m_filters      = new SubscriptionFilters();
     this.m_categories   = new CategoryCollection();
     this.m_areas        = new StringCollection();
     this.m_sources      = new StringCollection();
     this.m_attributes   = new AttributeDictionary();
     if (server == null)
     {
         throw new ArgumentNullException("server");
     }
     if (subscription == null)
     {
         throw new ArgumentNullException("subscription");
     }
     this.m_server       = server;
     this.m_subscription = subscription;
     this.m_state        = (SubscriptionState)state.Clone();
     this.m_name         = state.Name;
 }