public RevitShareAgregator(IObjectsRepository repository, IPersonalSettings personalSettings, IEventAggregator eventAggregator)
 {
     _repository      = repository;
     _currentPersonId = _repository.GetCurrentPerson().Id;
     personalSettings.SubscribeSetting(SettingsFeatureKeys.RevitAgregatorProjectPathKey).Subscribe(p => _sharePath   = p.Value);
     personalSettings.SubscribeSetting(SettingsFeatureKeys.RevitProjectInfoKey).Subscribe(p => _revitProjectAttrsMap = GetRevitProjectAttrsMap(p.Value));
     eventAggregator.Subscribe(this);
     _repository.SubscribeNotification(NotificationKind.StorageObjectCreated).Subscribe(OnNext, OnError);
     Task.Factory.StartNew(StartListeningUpdateSettingsCommand);
 }
 public RevitShareAgregator(IObjectsRepository repository, IPersonalSettings personalSettings, IEventAggregator eventAggregator)
 {
     _repository       = repository;
     _currentPersonId  = _repository.GetCurrentPerson().Id;
     _personalSettings = personalSettings;
     _eventAggregator  = eventAggregator;
     _personalSettings.SubscribeSetting(SettingsFeatureKeys.RevitAggregatorProjectPathKey)
     .Subscribe(new PersonalSettingsObserver(OnNext));
     _personalSettings.SubscribeSetting(SettingsFeatureKeys.RevitProjectInfoKey)
     .Subscribe(new PersonalSettingsObserver(OnNext));
     _eventAggregator.Subscribe(this);
     _repository.SubscribeNotification(NotificationKind.StorageObjectCreated)
     .Subscribe(new NotificationObjectObserver(OnNext));
     Task.Factory.StartNew(StartListeningUpdateSettingsCommand);
     Task.Factory.StartNew(StartListeningPrepareProjectCommand);
 }
Ejemplo n.º 3
0
 public SettingLoader(IPersonalSettings personalSettings)
 {
     personalSettings.SubscribeSetting("KompasAttrAutoImport-E74EA6D5-C31E-4FE2-84E9-5AB64E503126").Subscribe(this);
 }
Ejemplo n.º 4
0
 public SpwReaderSettings(IPersonalSettings personalSettings, IObjectsRepository repository)
 {
     _repository = repository;
     personalSettings.SubscribeSetting(SettingsFeatureKeys.FeatureKey).Subscribe(this);
 }
Ejemplo n.º 5
0
 public Task <string> Load()
 {
     _tcs          = new TaskCompletionSource <string>();
     _subscription = _personalSettings.SubscribeSetting("NumberInWordConverter-E4D4E10E-F4AE-40A1-AD9A-FB50A3FA8485").Subscribe(this);
     return(_tcs.Task);
 }