public void Init()
        {
            _costStageRevisionServiceMock = new Mock <ICostStageRevisionService>();
            _efContextMock = new Mock <EFContext>();

            SetupDataSharedAcrossTests();

            _target = new MetadataProviderService(_efContextMock.Object, _costStageRevisionServiceMock.Object);
        }
        public Provider(string fileName)
        {
            var startupPath = AppDomain.CurrentDomain.BaseDirectory;
            var pathItems   = startupPath.Split(Path.DirectorySeparatorChar);
            var projectPath = string.Join(Path.DirectorySeparatorChar.ToString(), pathItems.Take(pathItems.Length - 2));
            var path        = Path.Combine(projectPath, "Metadata", fileName);

            UnzipMetadata(path);
            _metadata = MetadataProviderService.DeserializeMetadata(path);
        }
 private void UnregisterHandlers()
 {
     if (CurrentActivity != null)
     {
         CurrentActivity.ResponseRequired -= OnActivityResponseRequired;
         CurrentActivity.Ready            -= OnActivityReady;
         CurrentActivity.Closed           -= OnActivityClosed;
         CurrentActivity  = null;
         provider_service = null;
     }
 }
        private void RegisterActivityServices(bool permission)
        {
            if (CurrentActivity == null)
            {
                return;
            }

            provider_service = new MetadataProviderService(CurrentActivity, permission);
            provider_service.PermissionRequired += (o, a) => {
                //ShowResponseMessage (o as MetadataProviderService);
                OnResponseRequired(EventArgs.Empty);
            };

            CurrentActivity.RegisterDBusObject(provider_service, MetadataProviderService.ObjectPath);
        }