// Token: 0x0600004C RID: 76 RVA: 0x0000364C File Offset: 0x0000264C private Subscription EstablishSubscription(Subscription template) { Subscription subscription = new Subscription(this, ((IServer)this.m_server).CreateSubscription(template.State)); subscription.SetResultFilters(template.Filters); try { subscription.AddItems(template.Items); } catch { subscription.Dispose(); subscription = null; } return(subscription); }
//====================================================================== // Private Methods /// <summary> /// Establishes a subscription based on the template provided. /// </summary> private Subscription EstablishSubscription(Subscription template) { // create subscription. Subscription subscription = new Subscription(this, ((IServer)m_server).CreateSubscription(template.State)); // set filters. subscription.SetResultFilters(template.Filters); // add items. try { subscription.AddItems(template.Items); } catch { subscription.Dispose(); subscription = null; } // return new subscription. return(subscription); }