public virtual void Attach(IViewProfile viewProfile, ViewBag bag, ActionCall action) { // No duplicate views! var outputNode = action.ParentChain().Output; if (outputNode.HasView(viewProfile.ConditionType)) { return; } var log = new ViewAttachmentLog(viewProfile); action.Trace(log); foreach (var filter in filters()) { var viewTokens = filter.Apply(action, bag); var count = viewTokens.Count(); if (count > 0) { log.FoundViews(filter, viewTokens.Select(x => x.Resolve())); } if (count != 1) { continue; } var token = viewTokens.Single().Resolve(); outputNode.AddView(token, viewProfile.ConditionType); break; } }
public PlanePartsController(IPlanePartService service, IViewProfile viewProfile, IPlaneModelService planeModelService, IUserService userService) { _userService = userService; _modelService = planeModelService; _mapper = viewProfile.GetMapper(); _service = service; }
public void Init(IViewProfile view, bool IsPostback) { _view = view; accountID = _webContext.AccountID; if (_userSession.LoggedIn) { viewerID = _userSession.CurrentUser.AccountID; } if (accountID == 0) { _view.DisplayAccountInfo(viewerID, viewerID); accountID = viewerID; } else { _view.DisplayAccountInfo(viewerID, accountID); //_view.loadProfileAttribute(_listProfileAttributeType, profile); } LoadProfile(IsPostback, accountID); profile = _profileService.LoadProfileByAccountID(accountID); _listPrivacyFlags = _privacyService.GetListPrivacyFlag(profile.ProfileID); _listProfileAttributeType = _profileAttributeService.GetProfileAttributeType(); _view.loadProfileAttribute(_listProfileAttributeType, profile); // } }
public virtual void Attach(IViewProfile viewProfile, ViewBag bag, ActionCall action) { // No duplicate views! var outputNode = action.ParentChain().Output; if (outputNode.HasView(viewProfile.ConditionType)) return; var log = new ViewAttachmentLog(viewProfile); action.Trace(log); foreach (var filter in _filters) { var viewTokens = filter.Apply(action, bag); var count = viewTokens.Count(); if (count > 0) { log.FoundViews(filter, viewTokens.Select(x => x.Resolve())); } if (count != 1) continue; var token = viewTokens.Single().Resolve(); outputNode.AddView(token, viewProfile.ConditionType); break; } }
public void Attach(IViewProfile viewProfile, ViewBag bag, ActionCall action) { // No duplicate views! var outputNode = action.ParentChain().Output; if (outputNode.HasView(viewProfile.Condition)) { return; } foreach (var filter in _policy.Filters()) { var viewTokens = filter.Apply(action, bag); var count = viewTokens.Count(); if (count != 1) { continue; } var token = viewTokens.Single().Resolve(); _attached.Add(token); outputNode.AddView(token, viewProfile.Condition); break; } }
private void SetSetting <T>(string settingName, T value, [CallerMemberName] string propertyName = null) { _currentProfile = null; UserSettings.Default.ViewProfile = ViewProfile.Custom.ToString(); UserSettings.Default[settingName] = value; this.RaisePropertyChanged(propertyName); this.RaisePropertyChanged(nameof(IsAdvancedView)); this.RaisePropertyChanged(nameof(IsSimpleView)); }
public void Attach(IViewProfile viewProfile, ViewBag bag, ActionCall action) { // No duplicate views! var outputNode = action.ParentChain().Output; if (outputNode.HasView(viewProfile.Condition)) return; foreach (var filter in _policy.Filters()) { var viewTokens = filter.Apply(action, bag); var count = viewTokens.Count(); if (count != 1) continue; var token = viewTokens.Single().Resolve(); _attached.Add(token); outputNode.AddView(token, viewProfile.Condition); break; } }
public ProfileViewBag(IViewProfile profile, BehaviorGraph graph) { Profile = profile; Views = profile.Filter(graph.Settings.Get <ViewEngines>().Views); }
public ViewAttachmentLog(IViewProfile profile) { _profile = profile; }
public ProfileViewBag(IViewProfile profile, BehaviorGraph graph) { Profile = profile; Views = profile.Filter(graph.Views); }
public UserController(IUserService service, IViewProfile viewProfile, IPlaneModelService planeModel) { _modelService = planeModel; _mapper = viewProfile.GetMapper(); _service = service; }
public void Init(IViewProfile view, bool IsPostback) { _view = view; accountID = _webContext.AccountID; if (_userSession.LoggedIn) { viewerID = _userSession.CurrentUser.AccountID; } if (accountID == 0) { _view.DisplayAccountInfo(viewerID, viewerID); accountID = viewerID; } else { _view.DisplayAccountInfo(viewerID, accountID); //_view.loadProfileAttribute(_listProfileAttributeType, profile); } LoadProfile(IsPostback,accountID); profile = _profileService.LoadProfileByAccountID(accountID); _listPrivacyFlags = _privacyService.GetListPrivacyFlag(profile.ProfileID); _listProfileAttributeType = _profileAttributeService.GetProfileAttributeType(); _view.loadProfileAttribute(_listProfileAttributeType, profile); // } }
public ProfileViewBag(IViewProfile profile, BehaviorGraph graph) { Profile = profile; Views = profile.Filter(graph.Settings.Get<ViewBag>()); }
public ProfileViewBag(IViewProfile profile, ViewBag views) { Profile = profile; Views = profile.Filter(views); }
public PlaneModelsController(IPlaneModelService service, IViewProfile viewProfile) { _mapper = viewProfile.GetMapper(); _service = service; }
public ViewCustomization() { _currentProfile = ViewProfileFactory.CreateProfile(); _currentProfile?.Init(); }