public MainWindowViewModel(
            MSBuildProject project,
            IDialogService <UnsavedChangesDialogViewModel> unsavedChangesDialogService,
            IOpenFileDialogService openFileDialogService,
            IThemeService themeService)
        {
            _project         = project.Project;
            _propertyManager = new PropertyManager(_project);

            _unsavedChangesDialogService = unsavedChangesDialogService;
            _themeService = themeService;

            ClosingCommand = ReactiveCommand.Create <CancelEventArgs>(OnClosing);

            SaveCommand = ReactiveCommand.Create(
                _propertyManager.Save,
                Observable.FromEventPattern(
                    handler => _propertyManager.IsDirtyChanged += handler,
                    handler => _propertyManager.IsDirtyChanged -= handler)
                .Select(_ => _propertyManager.IsDirty));

            ApplicationPage = new ApplicationPageViewModel(_propertyManager);
            BuildPage       = new BuildPageViewModel(_propertyManager);
            BuildEventsPage = new BuildEventsPageViewModel(_propertyManager);
            PackagePage     = new PackagePageViewModel(_propertyManager);
            SigningPage     = new SigningPageViewModel(_propertyManager, openFileDialogService);
        }
예제 #2
0
 public BlockDataPropertyHandler(
     IPropertyManager propertyManager,
     IContentSerializerSettings contentSerializerSettings)
 {
     _propertyManager           = propertyManager ?? throw new ArgumentNullException(nameof(propertyManager));
     _contentSerializerSettings = contentSerializerSettings;
 }
예제 #3
0
        public string Resolve(string source, IPropertyManager manager)
        {
            var segements = _parser.Parse(source);

            var sb = new StringBuilder();

            foreach (var item in segements)
            {
                switch (item.ValueType)
                {
                case StringValueType.Globle:
                    sb.Append(item.Value);
                    break;

                case StringValueType.Property:
                    sb.Append(manager.GetValue(item.Value));
                    break;

                case StringValueType.Local:
                    sb.Append(item.Value);
                    break;

                case StringValueType.Nomal:
                    sb.Append(item.Value);
                    break;
                }
            }

            return(sb.ToString());
        }
예제 #4
0
 public PropertyAppServiceTests()
 {
     this.subRepositoryProperty                   = Resolve <IRepository <Core.Models.Property> >();
     this.subRepositoryPropertyLeaseInfo          = Resolve <IRepository <PropertyLeaseInfo> >();
     this.subRepositoryPropertySaleInfo           = Resolve <IRepository <PropertySaleInfo> >();
     this.subRepositoryPropertySaleSelectedAgent  = Resolve <IRepository <PropertySaleSelectedAgent> >();
     this.subRepositoryPropertyLeaseSelectedAgent = Resolve <IRepository <PropertyLeaseSelectedAgent> >();
     this.subRepositoryPropertyImage              = Resolve <IRepository <Core.Models.PropertyImage> >();
     this.subRepositoryPropertyMeta               = Resolve <IRepository <PropertyMeta> >();
     this.subRepositoryUserLong                   = Resolve <IRepository <User, long> >();
     this.subRepositoryPropertyAppointment        = Resolve <IRepository <Core.Models.PropertyAppointment> >();
     this.subNotificationManager                  = Resolve <INotificationManager>();
     this.subHostingEnvironment                   = Resolve <IHostingEnvironment>();
     this.subHttpContextAccessor                  = Resolve <IHttpContextAccessor>();
     this.subLogger                     = Resolve <ILogger <PropertyAppService> >();
     this.subUnitOfWorkManager          = Resolve <IUnitOfWorkManager>();
     this.subRepositoryPropertyFollowUp = Resolve <IRepository <Core.Models.PropertyFollowUp> >();
     this.subConfiguration              = Resolve <IConfiguration>();
     this.subAzureBlobManager           = Resolve <IAzureBlobManager>();
     this.subPropertyImageAppService    = Resolve <IPropertyImageAppService>();
     this.subRepositoryAgentFlatSimpleConsolidateViewLong = Resolve <IRepository <Core.Models.View.AgentFlatSimpleConsolidateView, long> >();
     this.subPropertyManager                       = Resolve <IPropertyManager>();
     this.subAgentManager                          = Resolve <IAgentManager>();
     this.subPropertyImageManager                  = Resolve <IPropertyImageManager>();
     this.subRepositoryAgentProfileLong            = Resolve <IRepository <AgentProfile, long> >();
     this.subRepositoryPropertyConsolidateListView = Resolve <IRepository <Core.Models.View.PropertyConsolidateListView> >();
     this.subRepositoryPropertySelectedAgent       = Resolve <IRepository <Core.Models.PropertySelectedAgent> >();
     this.subRepositorySurvey                      = Resolve <IRepository <Core.Models.Survey> >();
     this.subRepositoryPropertySellerAvailableSlot = Resolve <IRepository <Core.Models.PropertySellerAvailableSlot> >();
     this.subHubContext     = Resolve <IHubContext <PropertyHub> >();
     this.subUserManager    = Resolve <UserManager>();
     this.subReportManager  = Resolve <IReportManager>();
     this.subSurveyManager  = Resolve <ISurveyManager>();
     this.subSettingManager = Resolve <ISettingManager>();
 }
예제 #5
0
        public PropertyPageViewModel(IPropertyManager propertyManager, IProjectThreadingService projectThreadingService)
        {
            _propertyManager         = propertyManager;
            _projectThreadingService = projectThreadingService;

            _propertyManager.PropertyChanged  += PropertyManager_PropertyChanged;
            _propertyManager.PropertyChanging += PropertyManager_PropertyChanging;
        }
예제 #6
0
 public HomeController(IElasticManager elasticManager, ICategoryManager categoryManager, IGoodManager goodManager, IPropertyManager propertyManager, IWebShopManager shopManager, IPriceManager priceManager)
 {
     this.priceManager    = priceManager;
     this.categoryManager = categoryManager;
     this.goodManager     = goodManager;
     this.propertyManager = propertyManager;
     this.shopManager     = shopManager;
     this.elasticManager  = elasticManager;
 }
예제 #7
0
        public SigningPageViewModel(
            IPropertyManager propertyManager,
            IOpenFileDialogService openFileDialogService)
            : base(propertyManager)
        {
            _openFileDialogService = openFileDialogService;

            OpenKeyFileCommand = ReactiveCommand.Create(OpenKeyFile);
        }
예제 #8
0
 public PropertyController(
     IPropertyManager propertyManager,
     IMapper mapper,
     ILogger <PropertyController> logger)
 {
     _propertyManager = propertyManager;
     _mapper          = mapper;
     _logger          = logger;
 }
예제 #9
0
 public ProductManager(dbContext context, IElasticSearchService elasticSearchService, IPropertyManager propertyManager,
                       ICategoryManager categoryManager, IStockManager stockManager)
 {
     _context = context;
     _elasticSearchService = elasticSearchService;
     _propertyManager      = propertyManager;
     _categoryManager      = categoryManager;
     _stockManager         = stockManager;
 }
예제 #10
0
        public static Task Remove(this IPropertyManager propertyManager, params string[] keys)
        {
            if (keys == null || keys.Length == 0)
            {
                return(Task.CompletedTask);
            }

            return(propertyManager.Remove(keys));
        }
예제 #11
0
 public LandlordService(IAddressRepository addressRepository, IUserRepository accountRepository, IUserManager userManager, IPropertyManager propertyManager, IPropertySignRequestManager propertySignRequestManager, IPropertyImageManager propertyImageManager)
 {
     _addressRepository = addressRepository;
     _accountRepository = accountRepository;
     _userManager = userManager;
     _propertyManager = propertyManager;
     _propertySignRequestManager = propertySignRequestManager;
     _propertyImageManager = propertyImageManager;
 }
예제 #12
0
 public TenantService(/*ILog logger,*/ IAddressRepository addressRepository, IUserRepository accountRepository, IUserManager userManager, IPropertyManager propertyManager, IPropertySignRequestManager propertySignRequestManager)
 {
     //_logger = logger;
     _addressRepository = addressRepository;
     _accountRepository = accountRepository;
     _userManager = userManager;
     _propertyManager = propertyManager;
     _propertySignRequestManager = propertySignRequestManager;
 }
 public ContentAreaPropertyHandler(
     IContentLoader contentLoader,
     IPropertyManager propertyManager,
     IContentSerializerSettings contentSerializerSettings)
 {
     _contentLoader             = contentLoader ?? throw new ArgumentNullException(nameof(contentLoader));
     _propertyManager           = propertyManager ?? throw new ArgumentNullException(nameof(propertyManager));
     _contentSerializerSettings = contentSerializerSettings ?? throw new ArgumentNullException(nameof(contentSerializerSettings));
 }
예제 #14
0
 public AdminController(ICategoryManager categoryManager, IPropertyManager propertyManager, IUserManager userManager, IRoleManager roleManager, ICheckGoodManager checkergoodManager, IParserTaskManager parserTaskManager)
 {
     this.categoryManager    = categoryManager;
     this.propertyManager    = propertyManager;
     this.userManager        = userManager;
     this.roleManager        = roleManager;
     this.checkergoodManager = checkergoodManager;
     this.parserTaskManager  = parserTaskManager;
 }
예제 #15
0
        public PreProcessRunner(IFileSystem fileSystem, IPropertyManager propertyManager, ITokenisationRunner tokeniser)
        {
            Args.NotNull(fileSystem, "fileSystem");
            Args.NotNull(propertyManager, "propertyManager");
            Args.NotNull(tokeniser, "tokeniser");

            this.fileSystem = fileSystem;
            this.propertyManager = propertyManager;
            this.tokeniser = tokeniser;
        }
        public OverridePropertyManager(IEnumerable <DavProperty <TEntry> > properties, IPropertyManager basePropertyManager, Func <TEntry, IStoreItem> converter = null)
        {
            // Convert the properties to a dictionary for fast retrieval
            _properties          = properties?.ToDictionary(p => p.Name) ?? throw new ArgumentNullException(nameof(properties));
            _basePropertyManager = basePropertyManager ?? throw new ArgumentNullException(nameof(basePropertyManager));
            _converter           = converter ?? (si => si);

            // Create the property information immediately
            Properties = GetPropertyInfo();
        }
 /// <summary>
 /// Sends a message to the queue
 /// </summary>
 /// <param name="header">A MSMQHeader compatible header</param>
 /// <param name="body">The contents of the message</param>
 /// <param name="pm">A Property manager</param>
 public void Send(MSMQHeader header, string body, IPropertyManager pm)
 {
     lock (_queue)
     {
         Message msg = new Message(body);
         msg.Label            = header.ToString();
         msg.TimeToBeReceived = pm.Caducity;
         msg.Priority         = pm.Priority;
         _queue.Send(msg);
     }
 }
예제 #18
0
 public GoodController(IGoodManager goodmanager, IElasticManager elasticmanager, IPropertyManager propertymanager, ICategoryManager categoryManager, IWebShopManager webShopManager, IFollowPriceManager followPriceManager, IUserManager userManager, ICommentManager commentManager)
 {
     this.userManager        = userManager;
     this.webShopManager     = webShopManager;
     this.categoryManager    = categoryManager;
     this.goodmanager        = goodmanager;
     this.elasticmanager     = elasticmanager;
     this.propertymanager    = propertymanager;
     this.followPriceManager = followPriceManager;
     this.commentManager     = commentManager;
 }
 public RootPropertyManager(IPropertyManager inner)
 {
     _inner       = inner;
     _contentType = new DavGetContentType <Guru3Collection> {
         Getter = (context, collection) => "text/html"
     };
     Properties = new List <PropertyInfo>(_inner.Properties)
     {
         new PropertyInfo(_contentType.Name, false)
     };
 }
예제 #20
0
        public static async Task <JObject> Get(this IPropertyManager propertyManager, IEnumerable <string> keys)
        {
            if (keys == null)
            {
                return(new JObject());
            }

            var result = await propertyManager.GetTokens(keys);

            return(new JObject(result.Select(kvp => new JProperty(kvp.Key, kvp.Value.Value))));
        }
예제 #21
0
        protected PropertyPageViewModel(
            IPropertyManager propertyManager,
            IProjectThreadingService projectThreadingService)
        {
            _propertyManager         = propertyManager;
            _projectThreadingService = projectThreadingService;

            _propertyManager.PropertyChanged       += PropertyManager_PropertyChanged;
            _propertyManager.PropertyChanging      += PropertyManager_PropertyChanging;
            _propertyManager.ConfigurationsChanged += PropertyManager_ConfigurationsChanged;
        }
예제 #22
0
 public UsersController(IUserManager userManager,
     IServicesManager servicesManager,
     IPropertyManager propertyManager,
     IAppointmentManager appointmentManager,
     IYelpManager yelpManager)
     : base(userManager)
 {
     _servicesManager = servicesManager;
     _propertyManager = propertyManager;
     _appointmentManager = appointmentManager;
     _yelpManager = yelpManager;
 }
예제 #23
0
        public virtual object Execute(CommandContext commandContext)
        {
            IPropertyManager propertyManager = commandContext.PropertyManager;

            PropertyEntity propertyEntity = propertyManager.FindPropertyById(Name);

            if (propertyEntity != null)
            {
                propertyManager.Delete(propertyEntity);
            }

            return(null);
        }
예제 #24
0
 public AdminController(AdminSeller adminSeller,
     AdminConcierge adminConcierge, IUserManager userManager,
     IAppointmentManager appointmentManager,
     IPropertyManager propertyManager,
     IServicesManager serviceManager)
     : base(userManager)
 {
     _adminSeller = adminSeller;
     _appointmentManager = appointmentManager;
     _adminConcierge = adminConcierge;
     _propertyManager = propertyManager;
     _services = serviceManager;
 }
예제 #25
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (_propertyManager != null)
                {
                    _propertyManager.Dispose();
                    _propertyManager = null;
                }
            }

            base.Dispose(disposing);
        }
예제 #26
0
파일: ChangeTrackUoW.cs 프로젝트: Gtach/ruh
        public ChangeTrackUoW(IPropertyManager propertyManager, IRepository repository)
        {
            if (propertyManager == null)
            {
                throw new ArgumentNullException("propertyManager");
            }
            if (repository == null)
            {
                throw new ArgumentNullException("repository");
            }

            _propertyManager = propertyManager;
            _repository      = repository;
        }
예제 #27
0
        static PropertyManager()
        {
            var entryAssembly = Assembly.GetEntryAssembly();

            COMPANY_NAME = ((AssemblyCompanyAttribute[])entryAssembly.GetCustomAttributes(typeof(AssemblyCompanyAttribute), false)).Single().Company;
            PRODUCT_NAME = ((AssemblyProductAttribute[])entryAssembly.GetCustomAttributes(typeof(AssemblyProductAttribute), false)).Single().Product;

            string localAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);

            APP_DATA_KEY = @"Software\" + COMPANY_NAME + @"\" + PRODUCT_NAME;
            APP_DATA_DIR = Path.Combine(localAppData, COMPANY_NAME, PRODUCT_NAME);
            APP_TEMP_DIR = Path.Combine(Path.GetTempPath(), COMPANY_NAME);

            c_manager = new RegistryPropertyManager();
        }
예제 #28
0
        public SceneEditorViewModel(IStorageFolder rootFolder, string scenePath, IPropertyManager propertyManager)
        {
            RootFolder = rootFolder;
            ScenePath  = scenePath;

            this.propertyManager = propertyManager;

            OpenCommand   = new RelayCommand <EntityViewModel>(Open);
            DeleteCommand = new RelayCommand <EntityViewModel>(Delete);

            Game = new EditorGame(new GameContextWithGraphics {
                FileProvider = new FileSystemProvider(RootFolder)
            });
            Game.SceneSystem.RootEntity = SceneRootEntity.Model;
        }
예제 #29
0
 public void ResolveProperties(IProjectContext projectContext, IPropertyManager propertyManager, Microsoft.Expression.DesignSurface.Documents.PropertyReferenceChangedEventHandler referenceChangedCallback)
 {
     this.Clear(false);
     this.resolvedProperties       = new HashSet <ReferenceStep>();
     this.propertyManager          = propertyManager;
     this.referenceChangedCallback = referenceChangedCallback;
     foreach (IPropertyId propertyId in this.NeutralProperties)
     {
         ReferenceStep singleStep = projectContext.ResolveProperty(propertyId) as ReferenceStep;
         if (singleStep != null)
         {
             this.resolvedProperties.Add(singleStep);
             propertyManager.RegisterPropertyReferenceChangedHandler(new PropertyReference(singleStep), referenceChangedCallback, true);
         }
     }
 }
예제 #30
0
파일: ZmqRepository.cs 프로젝트: Gtach/ruh
        public ZmqRepository(IDomainMapper domainMapper, IPropertyManager propertyManager, string path)
        {
            if (domainMapper == null)
            {
                throw new ArgumentNullException("domainMapper");
            }
            if (propertyManager == null)
            {
                throw new ArgumentNullException("propertyManager");
            }
            if (path == null)
            {
                throw new ArgumentNullException("path");
            }

            _domainMapper    = domainMapper;
            _propertyManager = propertyManager;
            _path            = path;
        }
예제 #31
0
        public virtual object Execute(CommandContext commandContext)
        {
            IPropertyManager propertyManager = commandContext.PropertyManager;

            PropertyEntity property = propertyManager.FindPropertyById(Name);

            if (property != null)
            {
                // update
                property.Value = Value;
            }
            else
            {
                // create
                property = new PropertyEntity(Name, Value);
                propertyManager.Add(property);
            }

            return(null);
        }
예제 #32
0
        public void Init(TokenResolverSettings resolverSettings)
        {
            try
            {
                IPropertyManager client           = resolverSettings.ClientSettings.CreatePropertyManagerClient();
                Property[]       properties       = client.GetProperties(new [] { "TokenSettings" });
                string           tokenSettingsXml = properties.SingleOrDefault().Value;
                var tokenSettings = tokenSettingsXml.FromXml <TokenSettings>();

                m_innerSoftwareCryptographer = new SMIMECryptographer(
                    tokenSettings.DefaultEncryption,
                    tokenSettings.DefaultDigest);

                tokenSettings.Error    += ProxyError;
                m_innerHsmCryptographer = tokenSettings.Create();
            }
            catch (Exception ex)
            {
                ProxyError.NotifyEvent(this, ex);
                // Do not remove. Exceptions here can cause the Direct Project to not bind to SMTP.
            }
        }
        public SolutionExplorerViewModel(
            ISolutionLoader solutionLoader,
            IFileEditorViewFactory editorViewFactory,
            IPropertyManager propertyManager,
            ITabViewManager tabViewManager)
        {
            this.solutionLoader    = solutionLoader;
            this.editorViewFactory = editorViewFactory;
            this.propertyManager   = propertyManager;
            this.tabViewManager    = tabViewManager;

            if (solutionLoader.RootFolder != null)
            {
                RootFolder = new StorageFolderViewModel(solutionLoader.RootFolder)
                {
                    IsExpanded = true
                };
            }

            solutionLoader.RootFolderLoaded += (s, e) =>
            {
                RootFolder = new StorageFolderViewModel(e.RootFolder)
                {
                    IsExpanded = true
                };
            };

            solutionLoader.StorageLibraryChanged += OnSolutionLoaderStorageLibraryChanged;

            AddFileCommand        = new RelayCommand <StorageFolderViewModel>(folder => _ = AddFileAsync(folder), folder => folder != null);
            AddFolderCommand      = new RelayCommand <StorageFolderViewModel>(folder => _ = AddFolderAsync(folder), folder => folder != null);
            BuildCommand          = new RelayCommand <StorageFileViewModel>(file => _ = BuildAsync(file));
            OpenCommand           = new RelayCommand <StorageItemViewModel>(item => _ = OpenAsync(item), item => item != null);
            ViewCodeCommand       = new RelayCommand <StorageFileViewModel>(file => _ = ViewCodeAsync(file), file => file != null);
            DeleteCommand         = new RelayCommand <StorageItemViewModel>(item => _ = DeleteAsync(item), item => item != null);
            ShowPropertiesCommand = new RelayCommand <StorageItemViewModel>(ShowProperties, item => item != null);
            RefreshCommand        = new RelayCommand <StorageFolderViewModel>(folder => _ = folder.FillAsync(), folder => folder != null);
        }
예제 #34
0
 public PropertyController(IPropertyManager propertyManager, IServicesManager servicesManager)
 {
     _propertyManager = propertyManager;
     _serviceManager = servicesManager;
 }
        // GET: HelloWorld

        public PropertySummaryController(IPropertyManager propertyManager)
        {
            _propertyManager = propertyManager;
        }
 public LetsDoTheMathController(IPropertyManager propertyManager, IUserManager userManager, IYelpManager yelpManager)
     : base(userManager)
 {
     _propertyManager = propertyManager;
     _yelpManager = yelpManager;
 }
예제 #37
0
 public PropertyCoordinator(IPropertyHolder holder,
     IPropertyManager manager)
 {
     _holder = holder;
     _manager = manager;
 }
 public PropertyDetailController(IPropertyManager propertyManager, IUserManager userManager)
     : base(userManager)
 {
     _propertyManager = propertyManager;
 }
예제 #39
0
 public SearchController(IPropertyManager propertyManager, IPhotoManager photoManager, IUserManager userManager)
     : base(userManager)
 {
     _propertyManager = propertyManager;
     _photoManager = photoManager;
 }
예제 #40
0
 public CosmosPropertyPageViewModel(
     IPropertyManager propertyManager,
     IProjectThreadingService projectThreadingService)
     : base(propertyManager, projectThreadingService)
 {
 }
 public void Setup()
 {
     context = ShimsContext.Create();
     _propertyManager = new PropertyManager(new FakeSitecore());
 }
예제 #42
0
#pragma warning disable CA1725 // Parameter names should match base declaration
        public void SetObjects(uint cObjects, object[] ppUnk)
#pragma warning restore CA1725 // Parameter names should match base declaration
        {
            if (cObjects == 0)
            {
                return;
            }
#if DEBUG
            if (ppUnk == null)
            {
                throw new ArgumentNullException(nameof(ppUnk));
            }

            if (ppUnk.Length < cObjects)
            {
                throw new ArgumentOutOfRangeException(nameof(cObjects));
            }
#endif
            ThreadHelper.ThrowIfNotOnUIThread();

            var configuredProjects = new List <ConfiguredProject>((int)cObjects);

            for (int i = 0; i < cObjects; i++)
            {
                var unk = ppUnk[i];

                var context = unk as IVsBrowseObjectContext;

                if (context == null && unk is IVsBrowseObject browseObject)
                {
                    int hr = browseObject.GetProjectItem(out var hierarchy, out uint itemId);

                    if (hr == VSConstants.S_OK && itemId == VSConstants.VSITEMID_ROOT)
                    {
                        if (hierarchy != null)
                        {
                            if (ErrorHandler.Succeeded(hierarchy.GetProperty((uint)VSConstants.VSITEMID.Root, (int)__VSHPROPID.VSHPROPID_ExtObject, out var extObject)))
                            {
                                context = extObject as IVsBrowseObjectContext;

                                if (context == null)
                                {
                                    if (extObject is EnvDTE.Project dteProject)
                                    {
                                        context = dteProject.Object as IVsBrowseObjectContext;
                                    }
                                }
                            }
                        }
                    }
                }

                if (context != null)
                {
                    configuredProjects.Add(context.ConfiguredProject);
                }
            }

#if DEBUG
            if (!configuredProjects.Any())
            {
                throw new InvalidOperationException("cObjects > 0, but no configurations were found!");
            }
#endif

            _unconfiguredProject     = configuredProjects.First().UnconfiguredProject;
            _projectThreadingService = _unconfiguredProject.ProjectService.Services.ThreadingPolicy;

            if (_propertyManager == null)
            {
                _propertyManager = CreatePropertyManager(configuredProjects);

                _propertyManager.PropertyChanged  += PropertyChanged;
                _propertyManager.PropertyChanging += PropertyChanging;
            }
            else
            {
                WaitForAsync(() => _propertyManager.UpdateConfigurationsAsync(configuredProjects));
            }
        }
예제 #43
0
파일: Changes.cs 프로젝트: Gtach/ruh
 public bool HasChanges(object obj, IPropertyManager propertyManager)
 {
     return AllChanges.Keys.Any(propertyName => propertyManager.GetInfoType(obj, propertyName) != PropertyManagerInfoType.Association);
 }