コード例 #1
0
        public SharepointServerSourceViewModel(ISharePointSourceModel updateManager, IEventAggregator aggregator, ISharepointServerSource sharePointServiceSource, IAsyncWorker asyncWorker, IServer environment)
            : this(updateManager, aggregator, asyncWorker, environment)
        {
            VerifyArgument.IsNotNull("sharePointServiceSource", sharePointServiceSource);

            asyncWorker.Start(() => updateManager.FetchSource(sharePointServiceSource.Id), source =>
            {
                _sharePointServiceSource      = source;
                _sharePointServiceSource.Path = sharePointServiceSource.Path;
                SetupHeaderTextFromExisting();
                FromModel(source);
            });
        }
コード例 #2
0
 public SharepointServerSourceViewModel(ISharePointSourceModel updateManager, IEventAggregator aggregator, IAsyncWorker asyncWorker, IServer environment)
     : base("SharepointServerSource")
 {
     VerifyArgument.IsNotNull("asyncWorker", asyncWorker);
     VerifyArgument.IsNotNull("updateManager", updateManager);
     VerifyArgument.IsNotNull("aggregator", aggregator);
     AsyncWorker         = asyncWorker;
     _environment        = environment;
     _updateManager      = updateManager;
     _authenticationType = AuthenticationType.Windows;
     _serverName         = string.Empty;
     _userName           = string.Empty;
     _password           = string.Empty;
     IsWindows           = true;
     HeaderText          = Resources.Languages.Core.SharePointServiceNewHeaderLabel;
     Header            = Resources.Languages.Core.SharePointServiceNewHeaderLabel;
     TestCommand       = new Microsoft.Practices.Prism.Commands.DelegateCommand(TestConnection, CanTest);
     SaveCommand       = new Microsoft.Practices.Prism.Commands.DelegateCommand(SaveConnection, CanSave);
     CancelTestCommand = new Microsoft.Practices.Prism.Commands.DelegateCommand(CancelTest, CanCancelTest);
 }
コード例 #3
0
 public SharepointServerSourceViewModel(ISharePointSourceModel updateManager, Task <IRequestServiceNameViewModel> requestServiceNameViewModel, IEventAggregator aggregator, IAsyncWorker asyncWorker, IServer environment)
     : this(updateManager, aggregator, asyncWorker, environment)
 {
     VerifyArgument.IsNotNull("requestServiceNameViewModel", requestServiceNameViewModel);
     _requestServiceNameViewModel = requestServiceNameViewModel;
 }