Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:ReactiveUIAroundMe.Portable.ViewModels.ViewModelBase"/> class.
        /// </summary>
        /// <param name="signalRClient">Signal RC lient.</param>
        public ViewModelBase(ISQLiteStorage storage, IScheduler scheduler, Logging.ILogger log,
                             ApplicationStateHandler applicationStateHandler, WebServiceController webServiceController,
                             GoogleMapsWebServiceController googleMapsWebServiceController, IPathLocator pathLocator, IScreen hostScreen,
                             ILocationManager locationManager)
        {
            HostScreen = hostScreen;

            Locations       = new ObservableCollection <Location>();
            CurrentLocation = new Location();

            LocationManager = locationManager;

            ConnectedStatusMessage = Labels.ConnectedTitle.ToUpper();

            Storage = storage;
            scheduler.Schedule((arg1) => Storage.CreateSQLiteConnection());

            WebServiceController           = webServiceController;
            GoogleMapsWebServiceController = googleMapsWebServiceController;
            PathLocator = pathLocator;

            Subscriptions = new CompositeDisposable();

            Scheduler = scheduler;
            ApplicationStateHandler = applicationStateHandler;

            Log = log;
            Tag = $"{GetType()} ";
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:ReactiveUIAroundMe.Portable.ViewModels.LoginPageViewModel"/> class.
        /// </summary>
        /// <param name="signalRClient">Signal RC lient.</param>
        /// <param name="scheduler">Scheduler.</param>
        /// <param name="applicationStateHandler">Application state handler.</param>
        /// <param name="storage">Storage.</param>
        /// <param name="webServiceController">Web service controller.</param>
        /// <param name="log">Log.</param>
        /// <param name="device">Device.</param>
        public LoginPageViewModel(IScheduler scheduler, ApplicationStateHandler applicationStateHandler,
                                  ISQLiteStorage storage, WebServiceController webServiceController, GoogleMapsWebServiceController googleMapsWebServiceController,
                                  IPathLocator pathLocator, ILogger log, IDevice device, IScreen hostScreen, ILocationManager locationManager)
            : base(storage, scheduler, log, applicationStateHandler, webServiceController, googleMapsWebServiceController, pathLocator, hostScreen, locationManager)
        {
            Title = "Welcome";

            _webServiceController = webServiceController;
            _device = device;

            scheduler.ScheduleAsync((arg1, arg2) => SetupSQLite());
            scheduler.ScheduleAsync((arg1, arg2) => Load());

            var canLogin = this.WhenAnyValue(
                vm => vm.Username,
                vm => vm.Password,
                vm => vm.IsLoading,
                (username, password, loading) =>
                !string.IsNullOrEmpty(Username) &&
                !string.IsNullOrEmpty(Password) &&
                !IsLoading);

            LoginCommand = ReactiveCommand.CreateFromObservable(LoginAsync,
                                                                canLogin,
                                                                Scheduler);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="T:ReactiveUIAroundMe.Portable.ViewModels.ContactListItemViewModel"/> class.
 /// </summary>
 /// <param name="storage">Storage.</param>
 /// <param name="scheduler">Scheduler.</param>
 /// <param name="signalRClient">Signal RC lient.</param>
 /// <param name="log">Log.</param>
 /// <param name="applicationStateHandler">Application state handler.</param>
 /// <param name="webServiceController">Web service controller.</param>
 /// <param name="googleMapsWebServiceController">Google maps web service controller.</param>
 /// <param name="pathLocator">Path locator.</param>
 /// <param name="hostScreen">Host screen.</param>
 /// <param name="locationManager">Location manager.</param>
 public ContactListItemViewModel(ISQLiteStorage storage, IScheduler scheduler, ILogger log,
                                 ApplicationStateHandler applicationStateHandler, WebServiceController webServiceController, GoogleMapsWebServiceController googleMapsWebServiceController,
                                 IPathLocator pathLocator, IScreen hostScreen, ILocationManager locationManager)
     : base(storage, scheduler, log, applicationStateHandler, webServiceController, googleMapsWebServiceController,
            pathLocator, hostScreen, locationManager)
 {
     Height = 40;
 }
Ejemplo n.º 4
0
        public CookieHttpResponseMessageHandlerTests()
        {
            pathLocator                     = A.Fake <IPathLocator>();
            httpContextAccessor             = A.Fake <IHttpContextAccessor>();
            setCookieParser                 = new SetCookieParser();
            httpContextAccessor.HttpContext = new DefaultHttpContext();

            cookieHttpResponseMessageHandler = new CookieHttpResponseMessageHandler(httpContextAccessor, pathLocator, setCookieParser);
        }
Ejemplo n.º 5
0
 public UserProfileCleaner(
     IConfigFileReader configFileReader,
     IPathLocator pathLocator,
     IActionConverter actionConverter)
 {
     _configFileReader = configFileReader;
     _pathLocator      = pathLocator;
     _actionConverter  = actionConverter;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="T:ReactiveUIAroundMe.Portable.ViewModels.TetrixPageViewModelBase"/> class.
        /// </summary>
        /// <param name="storage">Storage.</param>
        /// <param name="scheduler">Scheduler.</param>
        /// <param name="signalRClient">Signal RC lient.</param>
        /// <param name="log">Log.</param>
        /// <param name="applicationStateHandler">Application state handler.</param>
        protected TetrixPageViewModelBase(ISQLiteStorage storage, IScheduler scheduler, ILogger log,
                                          ApplicationStateHandler applicationStateHandler, WebServiceController webServiceController, GoogleMapsWebServiceController googleMapsWebServiceController,
                                          IPathLocator pathLocator, IScreen hostScreen, ILocationManager locationManager)
            : base(storage, scheduler, log, applicationStateHandler, webServiceController, googleMapsWebServiceController,
                   pathLocator, hostScreen, locationManager)
        {
            Cells = new ObservableRangeCollection <TetrixViewModelBase>();

            DataChanges = new Subject <DataChange>();
        }
        public CookieHttpResponseMessageHandlerTests()
        {
            pathLocator                         = A.Fake <IPathLocator>();
            httpContextAccessor                 = A.Fake <IHttpContextAccessor>();
            setCookieParser                     = new SetCookieParser();
            httpContextAccessor.HttpContext     = new DefaultHttpContext();
            headerRenamerService                = new HeaderRenamerService();
            headerCountService                  = new HeaderCountService();
            compositeDataProtectionDataProvider = A.Fake <ICompositeDataProtectionDataProvider>();

            cookieHttpResponseMessageHandler = new CookieHttpResponseMessageHandler(httpContextAccessor, pathLocator, setCookieParser, headerRenamerService, headerCountService, compositeDataProtectionDataProvider);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="T:ReactiveUIAroundMe.Portable.ViewModels.HomePageViewModel"/> class.
        /// </summary>
        /// <param name="signalRClient">Signal RC lient.</param>
        /// <param name="scheduler">Scheduler.</param>
        /// <param name="applicationStateHandler">Application state handler.</param>
        /// <param name="storage">Storage.</param>
        /// <param name="webServiceController">Web service controller.</param>
        /// <param name="log">Log.</param>
        /// <param name="device">Device.</param>
        public SearchResultsPageViewModel(IScheduler scheduler, ApplicationStateHandler applicationStateHandler,
                                          ISQLiteStorage storage, WebServiceController webServiceController, GoogleMapsWebServiceController googleMapsWebServiceController,
                                          IPathLocator pathLocator, ILogger log, IDevice device, IScreen hostScreen, ILocationManager locationManager)
            : base(storage, scheduler, log, applicationStateHandler, webServiceController,
                   googleMapsWebServiceController, pathLocator, hostScreen, locationManager)
        {
            Title = "Results";

            Results = new ReactiveList <EReactiveUIAroundMeListItemViewModel>();

            _webServiceController = webServiceController;
            _device = device;
        }
 public CookieHttpResponseMessageHandler(
     IHttpContextAccessor httpContextAccessor,
     IPathLocator pathLocator,
     ISetCookieParser setCookieParser,
     IHeaderRenamerService headerRenamerService,
     IHeaderCountService headerCountService,
     ICompositeDataProtectionDataProvider compositeDataProtectionDataProvider)
 {
     this.httpContextAccessor  = httpContextAccessor;
     this.pathLocator          = pathLocator;
     this.setCookieParser      = setCookieParser;
     this.headerRenamerService = headerRenamerService;
     this.headerCountService   = headerCountService;
     this.compositeDataProtectionDataProvider = compositeDataProtectionDataProvider;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="T:ReactiveUIAroundMe.Portable.ViewModels.HomePageViewModel"/> class.
        /// </summary>
        /// <param name="signalRClient">Signal RC lient.</param>
        /// <param name="scheduler">Scheduler.</param>
        /// <param name="applicationStateHandler">Application state handler.</param>
        /// <param name="storage">Storage.</param>
        /// <param name="webServiceController">Web service controller.</param>
        /// <param name="log">Log.</param>
        /// <param name="device">Device.</param>
        public MapPageViewModel(IScheduler scheduler, ApplicationStateHandler applicationStateHandler,
                                ISQLiteStorage storage, WebServiceController webServiceController, GoogleMapsWebServiceController googleMapsWebServiceController,
                                IPathLocator pathLocator, ILogger log, IDevice device, IScreen hostScreen, ILocationManager locationManager)
            : base(storage, scheduler, log, applicationStateHandler, webServiceController, googleMapsWebServiceController, pathLocator, hostScreen, locationManager)
        {
            Title = "Results";

            Feedbacks = new ReactiveList <FeedbackListItemViewModel>();
            Infos     = new ReactiveList <TetrixViewModelBase>();
            Infos.Add(new HeaderListItemViewModel(storage, scheduler, log, applicationStateHandler,
                                                  webServiceController, googleMapsWebServiceController,
                                                  pathLocator, hostScreen, locationManager)
            {
                Title = "Contacts"
            });

            foreach (var icon in icons)
            {
                Infos.Add(new ContactListItemViewModel(storage, scheduler,
                                                       log, applicationStateHandler,
                                                       webServiceController,
                                                       googleMapsWebServiceController,
                                                       pathLocator, hostScreen, locationManager)
                {
                    Icon = string.Format("{0}.png", icon)
                });
            }

            var canSelectFeedback = this.WhenAnyValue(
                vm => vm.Feedbacks,
                vm => vm.IsLoading,
                (feedbacks, isLoading) => !feedbacks.IsEmpty && !isLoading);

            FeedbackSelectCommand = ReactiveCommand.CreateFromObservable(SelectFeedbackAsync,
                                                                         canSelectFeedback, Scheduler);

            var canSelectTravelMode = this.WhenAnyValue(vm => vm.IsLoading,
                                                        (isLoading) => !isLoading);

            TransitCommand = ReactiveCommand.CreateFromObservable(() => CreatePathAsync(GoogleMapsTravelModes.Transit),
                                                                  canSelectTravelMode, Scheduler);

            DrivingCommand = ReactiveCommand.CreateFromObservable(() => CreatePathAsync(GoogleMapsTravelModes.Driving),
                                                                  canSelectTravelMode, Scheduler);

            WalkingCommand = ReactiveCommand.CreateFromObservable(() => CreatePathAsync(GoogleMapsTravelModes.Walking),
                                                                  canSelectTravelMode, Scheduler);
        }
Ejemplo n.º 11
0
        public async Task WhenShellAuthenticatedPassOnToken()
        {
            //Arrange
            var path1      = "path1";
            var path2      = "path2";
            var requestUrl = $"https://someurl.com/{path1}";

            //Create fakes
            pathLocator         = A.Fake <IPathLocator>();
            httpContextAccessor = A.Fake <IHttpContextAccessor>();
            compositeDataProtectionDataProvider = A.Fake <ICompositeDataProtectionDataProvider>();

            //Fake calls
            A.CallTo(() => pathLocator.GetPath()).Returns(path1);
            A.CallTo(() => compositeDataProtectionDataProvider.Unprotect(A <string> .Ignored)).ReturnsLazily(x => x.Arguments.First().ToString());
            A.CallTo(() => compositeDataProtectionDataProvider.Protect(A <string> .Ignored)).ReturnsLazily(x => x.Arguments.First().ToString());

            //Set some headers on the incoming request
            httpContextAccessor.HttpContext = new DefaultHttpContext {
                User = new ClaimsPrincipal(new ClaimsIdentity(new List <Claim> {
                    new Claim("bearer", "test")
                }, "mock"))
            };
            httpContextAccessor.HttpContext.Request.Headers.Add(HeaderNames.Cookie, $"{Constants.DfcSession}=sessionId1;{path1}v1=value1;{path1}v2=value2;{path2}v3=value3;{path2}v4=value4");
            httpContextAccessor.HttpContext.Session = new MockHttpSession();

            //Create a get request that is used to send data to the child app
            var httpRequestChildMessage = new HttpRequestMessage(HttpMethod.Get, requestUrl);

            //Create handlers and set the inner handler
            handler = new CookieDelegatingHandler(httpContextAccessor, pathLocator, compositeDataProtectionDataProvider)
            {
                InnerHandler = new StatusOkDelegatingHandler(),
            };

            //Act
            var invoker = new HttpMessageInvoker(handler);
            await invoker.SendAsync(httpRequestChildMessage, CancellationToken.None).ConfigureAwait(false);

            //Check that the values that are sent back are correct
            var headerValue = httpRequestChildMessage.Headers.Authorization;

            Assert.Equal("test", headerValue.Parameter);
            httpRequestChildMessage.Dispose();
            invoker.Dispose();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="T:ReactiveUIAroundMe.ViewModels.TetrixViewModelBase"/> class.
        /// </summary>
        protected SelectableViewModelBase(ISQLiteStorage storage, IScheduler scheduler, ILogger log,
                                          ApplicationStateHandler applicationStateHandler, WebServiceController webServiceController, GoogleMapsWebServiceController googleMapsWebServiceController,
                                          IPathLocator pathLocator, IScreen hostScreen, ILocationManager locationManager)
            : base(storage, scheduler, log, applicationStateHandler, webServiceController, googleMapsWebServiceController, pathLocator, hostScreen, locationManager)
        {
            // todo:  working on this logic
            _selectAsync = Observable.Create((IObserver <bool> observer) =>
            {
                IsSelected = !IsSelected;
                return(Disposable.Empty);
            }).Select(x => Unit.Default);

            var canExecute = this.WhenAnyValue(x => x.IsSelectable,
                                               (selectable) => !selectable);

            _selectCommand = ReactiveCommand.CreateFromObservable(() => _selectAsync, canExecute);
        }
Ejemplo n.º 13
0
        public async Task CanCopyHeadersFromShellToChildApp()
        {
            //Arrange
            var path1      = "path1";
            var path2      = "path2";
            var requestUrl = $"https://someurl.com/{path1}";

            //Create fakes
            pathLocator         = A.Fake <IPathLocator>();
            httpContextAccessor = A.Fake <IHttpContextAccessor>();
            compositeDataProtectionDataProvider = A.Fake <ICompositeDataProtectionDataProvider>();

            //Fake calls
            A.CallTo(() => pathLocator.GetPath()).Returns(path1);
            A.CallTo(() => compositeDataProtectionDataProvider.Unprotect(A <string> .Ignored)).ReturnsLazily(x => x.Arguments.First().ToString());
            A.CallTo(() => compositeDataProtectionDataProvider.Protect(A <string> .Ignored)).ReturnsLazily(x => x.Arguments.First().ToString());

            //Set some headers on the incoming request
            httpContextAccessor.HttpContext = new DefaultHttpContext();
            httpContextAccessor.HttpContext.Request.Headers.Add(HeaderNames.Cookie, $"{path1}v1=value1;{path1}v2=value2;{path2}v3=value3;{path2}v4=value4");

            //Create a get request that is used to send data to the child app
            var httpRequestChildMessage = new HttpRequestMessage(HttpMethod.Get, requestUrl);

            //Create handlers and set the inner handler
            handler = new CookieDelegatingHandler(httpContextAccessor, pathLocator, compositeDataProtectionDataProvider)
            {
                InnerHandler = new StatusOkDelegatingHandler(),
            };

            //Act
            var invoker = new HttpMessageInvoker(handler);
            await invoker.SendAsync(httpRequestChildMessage, CancellationToken.None).ConfigureAwait(false);

            //Check that the child app has the correct number of headers based on the incoming request
            Assert.Single(httpRequestChildMessage.Headers);

            //Check that the values that are sent back are correct
            var headerValue = httpRequestChildMessage.Headers.First().Value.ToList();

            Assert.Equal("v1=value1", headerValue.First());
            Assert.Equal("v2=value2", headerValue.Last());
            httpRequestChildMessage.Dispose();
            invoker.Dispose();
        }
Ejemplo n.º 14
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:ReactiveUIAroundMe.Portable.ViewModels.HomePageViewModel"/> class.
        /// </summary>
        /// <param name="signalRClient">Signal RC lient.</param>
        /// <param name="scheduler">Scheduler.</param>
        /// <param name="applicationStateHandler">Application state handler.</param>
        /// <param name="storage">Storage.</param>
        /// <param name="webServiceController">Web service controller.</param>
        /// <param name="log">Log.</param>
        /// <param name="device">Device.</param>
        public FlyoutMenuPageViewModel(IScheduler scheduler, ApplicationStateHandler applicationStateHandler,
                                       ISQLiteStorage storage, WebServiceController webServiceController, GoogleMapsWebServiceController googleMapsWebServiceController,
                                       IPathLocator pathLocator, ILogger log, IDevice device, IScreen hostScreen, ILocationManager locationManager)
            : base(storage, scheduler, log, applicationStateHandler, webServiceController,
                   googleMapsWebServiceController, pathLocator, hostScreen, locationManager)
        {
            Title = "Results";

            Results = new ReactiveList <EReactiveUIAroundMeListItemViewModel>();

            _webServiceController = webServiceController;
            _device = device;

            var canSelect = this.WhenAnyValue(vm => vm.Results,
                                              (results) => !results.IsEmpty && !IsLoading);

            ResultSelectCommand = ReactiveCommand.CreateFromObservable(SelectAsync,
                                                                       canSelect, Scheduler);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="T:ReactiveUIAroundMe.Portable.ViewModels.HomePageViewModel"/> class.
        /// </summary>
        /// <param name="signalRClient">Signal RC lient.</param>
        /// <param name="scheduler">Scheduler.</param>
        /// <param name="applicationStateHandler">Application state handler.</param>
        /// <param name="storage">Storage.</param>
        /// <param name="webServiceController">Web service controller.</param>
        /// <param name="log">Log.</param>
        /// <param name="device">Device.</param>
        public HomePageViewModel(IScheduler scheduler, ApplicationStateHandler applicationStateHandler,
                                 ISQLiteStorage storage, WebServiceController webServiceController, GoogleMapsWebServiceController googleMapsWebServiceController,
                                 IPathLocator pathLocator, ILogger log, IDevice device, IScreen hostScreen, ILocationManager locationManager)
            : base(storage, scheduler, log, applicationStateHandler, webServiceController, googleMapsWebServiceController, pathLocator, hostScreen,
                   locationManager)
        {
            Title = "Welcome";

            _webServiceController = webServiceController;
            _device = device;

            scheduler.ScheduleAsync((arg1, arg2) => SetupSQLite());
            scheduler.ScheduleAsync((arg1, arg2) => Load());

            var canSearch = this.WhenAnyValue(
                vm => vm.CurrentLocation,
                (location) => location.Timestamp != default(DateTimeOffset));

            SearchCommand = ReactiveCommand.CreateFromObservable(SearchAsync, canSearch, scheduler);
        }
Ejemplo n.º 16
0
 public CookieDelegatingHandler(IHttpContextAccessor httpContextAccessor, IPathLocator pathLocator)
 {
     this.httpContextAccessor = httpContextAccessor;
     this.pathLocator         = pathLocator;
 }
Ejemplo n.º 17
0
 public CookieHttpResponseMessageHandler(IHttpContextAccessor httpContextAccessor, IPathLocator pathLocator, ISetCookieParser setCookieParser)
 {
     this.httpContextAccessor = httpContextAccessor;
     this.pathLocator         = pathLocator;
     this.setCookieParser     = setCookieParser;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="T:ReactiveUIAroundMe.ViewModels.TetrixViewModelBase"/> class.
 /// </summary>
 protected TetrixViewModelBase(ISQLiteStorage storage, IScheduler scheduler, ILogger log,
                               ApplicationStateHandler applicationStateHandler, WebServiceController webServiceController, GoogleMapsWebServiceController googleMapsWebServiceController,
                               IPathLocator pathLocator, IScreen hostScreen, ILocationManager locationManager)
     : base(storage, scheduler, log, applicationStateHandler, webServiceController, googleMapsWebServiceController, pathLocator, hostScreen, locationManager)
 {
 }
Ejemplo n.º 19
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:ReactiveUIAroundMe.Portable.ViewModels.SuperAdminPageViewModel"/> class.
        /// </summary>
        /// <param name="storage">Storage.</param>
        /// <param name="scheduler">Scheduler.</param>
        /// <param name="signalRClient">Signal RC lient.</param>
        /// <param name="log">Log.</param>
        /// <param name="applicationStateHandler">Application state handler.</param>
        /// <param name="webServiceController">Web service controller.</param>
        public SuperAdminPageViewModel(ISQLiteStorage storage, IScheduler scheduler, ILogger log,
                                       ApplicationStateHandler applicationStateHandler, WebServiceController webServiceController, GoogleMapsWebServiceController googleMapsWebServiceController,
                                       IPathLocator pathLocator, IScreen hostScreen, ILocationManager locationManager)
            : base(storage, scheduler, log, applicationStateHandler, webServiceController, googleMapsWebServiceController, pathLocator,
                   hostScreen, locationManager)
        {
            _pathLocator = pathLocator;

            Title = "Super Admin";

            selection = (obj) =>
            {
                var parameters = (obj as TetrixViewModelBase)?.SelectParameters;

                object selectKey;
                parameters.TryGetValue("ViewModel", out selectKey);
                if (selectKey != null)
                {
                    HostScreen.Router.Navigate.Execute(new SuperAdminPageViewModel(Storage, Scheduler,
                                                                                   Log, ApplicationStateHandler, WebServiceController,
                                                                                   GoogleMapsWebServiceController, PathLocator, HostScreen, LocationManager));

                    var viewModelType = Type.GetType(string.Format("ReactiveUIAroundMe.Portable.ViewModels.{0}", selectKey));
                    var instance      = (ViewModelBase)Activator.CreateInstance(viewModelType,
                                                                                new object[] { Storage, Scheduler,
                                                                                               Log, ApplicationStateHandler, WebServiceController,
                                                                                               PathLocator, HostScreen });

                    HostScreen.Router.Navigate.Execute(instance);
                }
                ;

                return(Unit.Default);
            };

            InitSelectCommand((obj) => selection(obj));

            var tiles = _tileTiles.Select((title, index) =>
            {
                var tileModel = new TileViewModel(Storage, Scheduler, Log,
                                                  ApplicationStateHandler, WebServiceController, GoogleMapsWebServiceController, PathLocator, HostScreen, LocationManager);
                tileModel.Title       = _tileTiles[index];
                tileModel.BannerImage = _pathLocator.GetPath(_bannerImages[index], "jpg");
                tileModel.TileImage   = _pathLocator.GetPath("profile_image", "jpeg");

                // hack: for mac until wet selectable cells working for collection views
                tileModel.InitSelectionCommand((obj) => selection(obj));
                tileModel.SelectParameters = new Dictionary <string, object>()
                {
                    { "ViewModel", _tileNavigationViewModels[index] },
                };

                tileModel.UseXSpacing = true;
                tileModel.UseYSpacing = true;
                tileModel.Layout      = LayoutType.Fifth;
                tileModel.Position    = index;

                return(tileModel);
            });

            Cells.AddRange(tiles);
        }
Ejemplo n.º 20
0
 public CookieDelegatingHandler(IHttpContextAccessor httpContextAccessor, IPathLocator pathLocator, ICompositeDataProtectionDataProvider compositeDataProtectionDataProvider)
 {
     this.httpContextAccessor = httpContextAccessor;
     this.pathLocator         = pathLocator;
     this.compositeDataProtectionDataProvider = compositeDataProtectionDataProvider;
 }