private void LoadSubscriptions(ReportItem item) { var subscriptions = _Service.ListSubscriptions(item.Path, Username); foreach (var subscription in subscriptions) { ExtensionSettings extensionSettings; string description; ActiveState active; string status; string eventType; string matchData; ParameterValue[] values; var result = _Service.GetSubscriptionProperties(subscription.SubscriptionID, out extensionSettings, out description, out active, out status, out eventType, out matchData, out values); var subscriptionItem = new SubscriptionItem { ExtensionSettings = extensionSettings, Description = description, ActiveState = active, Status = status, EventType = eventType, MatchData = matchData, ParameterValues = values }; item.Subscriptions.Add(subscriptionItem); var schedule = Schedules.Select(s => s.Value) .FirstOrDefault(s => s.ScheduleID == matchData); if (schedule != null) { subscriptionItem.ScheduleName = schedule.Name; } } }
private void UploadSubscription(ReportItem item, SubscriptionItem subscription) { try { var schedule = Schedules.Select(s => s.Value) .FirstOrDefault(s => String.Equals(s.Name, subscription.ScheduleName, StringComparison.InvariantCultureIgnoreCase)); if (schedule == null) { return; } _Service.CreateSubscription(item.Path, subscription.ExtensionSettings, subscription.Description, subscription.EventType, schedule.ScheduleID, subscription.ParameterValues); } catch (Exception) { // Suppress } }
private void UploadSubscription(ReportItem item, SubscriptionItem subscription) { try { var schedule = Schedules.Select(s => s.Value) .FirstOrDefault(s => String.Equals(s.Name, subscription.ScheduleName, StringComparison.InvariantCultureIgnoreCase)); if (schedule == null) { return; } _Service.CreateSubscription(item.Path, subscription.ExtensionSettings, subscription.Description, subscription.EventType, schedule.ScheduleID, subscription.ParameterValues); } catch (Exception) { // Suppress } }
private void LoadSubscriptions(ReportItem item) { var subscriptions = _Service.ListSubscriptions(item.Path, Username); foreach (var subscription in subscriptions) { ExtensionSettings extensionSettings; string description; ActiveState active; string status; string eventType; string matchData; ParameterValue[] values; var result = _Service.GetSubscriptionProperties(subscription.SubscriptionID, out extensionSettings, out description, out active, out status, out eventType, out matchData, out values); var subscriptionItem = new SubscriptionItem { ExtensionSettings = extensionSettings, Description = description, ActiveState = active, Status = status, EventType = eventType, MatchData = matchData, ParameterValues = values }; item.Subscriptions.Add(subscriptionItem); var schedule = Schedules.Select(s => s.Value) .FirstOrDefault(s => s.ScheduleID == matchData); if (schedule != null) { subscriptionItem.ScheduleName = schedule.Name; } } }