void ISettingsServiceInternal.SetSetting(string identifier, string name, SettingItem value) { try { Assertions.AssertNotEmpty(identifier, "identifier"); Assertions.AssertNotEmpty(name, "name"); IEnumerable <SettingKey> savedSettings = null; lock (SyncRoot) { SettingKey key = SettingKey.Create(identifier, name); List <KeyValuePair <SettingKey, SettingItem> > settings = new List <KeyValuePair <SettingKey, SettingItem> >(); settings.Add(new KeyValuePair <SettingKey, SettingItem>(key, value)); savedSettings = SaveSettings(settings); } if (savedSettings != null && savedSettings.Any()) { OnSettingChanged(new SettingChangedEventArgs(savedSettings)); } } catch (Exception ex) { throw AlarmWorkflowFaultDetails.CreateFault(ex); } }
SettingsDisplayConfiguration ISettingsServiceInternal.GetDisplayConfiguration() { try { return(_settings.SettingsDisplayConfiguration); } catch (Exception ex) { throw AlarmWorkflowFaultDetails.CreateFault(ex); } }
IList <AddressBookEntry> IAddressingService.GetAllEntries() { try { return(ServiceProvider.GetService <IAddressingServiceInternal>().GetAllEntries()); } catch (Exception ex) { throw AlarmWorkflowFaultDetails.CreateFault(ex); } }
Stream IFileTransferService.GetFileStream(string path) { try { return(this.ServiceProvider.GetService <IFileTransferServiceInternal>().GetFileStream(path)); } catch (Exception ex) { throw AlarmWorkflowFaultDetails.CreateFault(ex); } }
void IDispositioningService.Recall(int operationId, string emkResourceId) { try { InternalService.Recall(operationId, emkResourceId); } catch (Exception ex) { throw AlarmWorkflowFaultDetails.CreateFault(ex); } }
IList <OperationResource> IEmkService.GetFilteredResources(IList <OperationResource> resources) { try { return(ServiceProvider.GetService <IEmkServiceInternal>().GetFilteredResources(resources).ToList()); } catch (Exception ex) { throw AlarmWorkflowFaultDetails.CreateFault(ex); } }
string[] IDispositioningService.GetDispatchedResources(int operationId) { try { return(InternalService.GetDispatchedResources(operationId)); } catch (Exception ex) { throw AlarmWorkflowFaultDetails.CreateFault(ex); } }
void ISettingsService.SetSettings(ICollection <KeyValuePair <SettingKey, SettingItem> > values) { try { this.ServiceProvider.GetService <ISettingsServiceInternal>().SetSettings(values); } catch (Exception ex) { throw AlarmWorkflowFaultDetails.CreateFault(ex); } }
IList <EmkResource> IEmkService.GetAllResources() { try { return(ServiceProvider.GetService <IEmkServiceInternal>().GetAllResources().ToList()); } catch (Exception ex) { throw AlarmWorkflowFaultDetails.CreateFault(ex); } }
SettingItem ISettingsService.GetSetting(SettingKey key) { try { return(this.ServiceProvider.GetService <ISettingsServiceInternal>().GetSetting(key)); } catch (Exception ex) { throw AlarmWorkflowFaultDetails.CreateFault(ex); } }
void ISettingsService.SetSetting(SettingKey key, SettingItem value) { try { this.ServiceProvider.GetService <ISettingsServiceInternal>().SetSetting(key.Identifier, key.Name, value); } catch (Exception ex) { throw AlarmWorkflowFaultDetails.CreateFault(ex); } }
/// <summary> /// Gets an IEnumerable of printer names of installed printers on this system /// </summary> /// <returns>A collection of printer names</returns> public IEnumerable <string> GetPrinters() { try { return(ServiceProvider.GetService <IPrintingServiceInternal>().GetPrinters()); } catch (Exception ex) { throw AlarmWorkflowFaultDetails.CreateFault(ex); } }
SettingsDisplayConfiguration ISettingsService.GetDisplayConfiguration() { try { return(this.ServiceProvider.GetService <ISettingsServiceInternal>().GetDisplayConfiguration()); } catch (Exception ex) { throw AlarmWorkflowFaultDetails.CreateFault(ex); } }
void IOperationService.AcknowledgeOperation(int operationId) { try { InternalService.AcknowledgeOperation(operationId); } catch (Exception ex) { throw AlarmWorkflowFaultDetails.CreateFault(ex); } }
Operation IOperationService.GetOperationById(int operationId) { try { return(InternalService.GetOperationById(operationId)); } catch (Exception ex) { throw AlarmWorkflowFaultDetails.CreateFault(ex); } }
IList <int> IOperationService.GetOperationIds(int maxAge, bool onlyNonAcknowledged, int limitAmount) { try { return(InternalService.GetOperationIds(maxAge, onlyNonAcknowledged, limitAmount)); } catch (Exception ex) { throw AlarmWorkflowFaultDetails.CreateFault(ex); } }
SettingItem ISettingsServiceInternal.GetSetting(SettingKey key) { try { Assertions.AssertNotNull(key, "key"); SettingItem item = _settings.GetSetting(key.Identifier, key.Name); lock (SyncRoot) { ApplySettingValue(key.Identifier, key.Name, item); } return(item); } catch (Exception ex) { throw AlarmWorkflowFaultDetails.CreateFault(ex); } }
SettingItem ISettingsServiceInternal.GetSetting(string identifier, string name) { try { Assertions.AssertNotEmpty(identifier, "identifier"); Assertions.AssertNotEmpty(name, "name"); SettingItem item = _settings.GetSetting(identifier, name); lock (SyncRoot) { ApplySettingValue(identifier, name, item); } return(item); } catch (Exception ex) { throw AlarmWorkflowFaultDetails.CreateFault(ex); } }
void ISettingsServiceInternal.SetSettings(IEnumerable <KeyValuePair <SettingKey, SettingItem> > values) { try { Assertions.AssertNotNull(values, "values"); IEnumerable <SettingKey> savedSettings = null; lock (SyncRoot) { savedSettings = SaveSettings(values); } if (savedSettings != null && savedSettings.Any()) { OnSettingChanged(new SettingChangedEventArgs(savedSettings)); } } catch (Exception ex) { throw AlarmWorkflowFaultDetails.CreateFault(ex); } }