public ResultBase SetUserLocation(Guid domainID, DomainLocationInfo location) { return(this.Invoke(domainID, (domain) => { domain.SetUserLocation(this.authentication, location); })); }
private void InvokeBeginUserEdit(Authentication authentication, DomainLocationInfo location, out DomainUser domainUser) { domainUser = this.GetDomainUser(authentication); this.OnBeginUserEdit(domainUser, location); domainUser.Location = location; domainUser.IsBeingEdited = true; }
public ResultBase BeginUserEdit(Guid domainID, DomainLocationInfo location) { return(this.Invoke(domainID, (domain) => { domain.BeginUserEdit(this.authentication, location); })); }
private void ValidateBeginUserEdit(Authentication authentication, DomainLocationInfo location) { var domainUser = this.GetDomainUser(authentication); if (domainUser.CanWrite == false) { throw new PermissionDeniedException(); } }
public void SetUserLocation(Authentication authentication, DomainLocationInfo location) { this.dispatcher.VerifyAccess(); this.CremaHost.DebugMethod(authentication, this, nameof(SetUserLocation), base.DomainInfo.ItemPath, base.DomainInfo.ItemType); this.ValidateSetLocation(authentication, location); this.Sign(authentication); this.InvokeSetUserLocation(authentication, location, out var domainUser); this.OnUserChanged(new DomainUserEventArgs(authentication, this, domainUser)); this.Container.InvokeDomainUserChangedEvent(authentication, this, domainUser); }
public void BeginUserEdit(Authentication authentication, DomainLocationInfo location) { this.dispatcher.VerifyAccess(); this.CremaHost.DebugMethod(authentication, this, nameof(BeginUserEdit), base.DomainInfo.ItemPath, base.DomainInfo.ItemType); var result = this.Service.BeginUserEdit(this.ID, location); this.Sign(authentication, result); this.InvokeBeginUserEdit(authentication, location, out var domainUser); this.OnUserChanged(new DomainUserEventArgs(authentication, this, domainUser)); this.Container.InvokeDomainUserChangedEvent(authentication, this, domainUser); }
public static Task BeginEditAsync(this IDomain domain, Authentication authentication, object item, string fieldName) { var location = new DomainLocationInfo() { TableName = CremaDataRowUtility.GetTableName(item), Keys = CremaDataRowUtility.GetKeys(item), ColumnName = fieldName, }; return(domain.BeginMemberEditAsync(authentication, location)); }
public static void SetLocation(this IDomain domain, Authentication authentication, object item, string fieldName) { var location = new DomainLocationInfo() { TableName = CremaDataRowUtility.GetTableName(item), Keys = CremaDataRowUtility.GetKeys(item), ColumnName = fieldName, }; domain.SetUserLocation(authentication, location); }
public void Set(DomainMemberInfo item, DomainMemberState domainMemberState, DomainLocationInfo domainLocationInfo) { for (var i = 0; i < this.Count; i++) { if (this[i].ID == item.ID) { this[i] = new DomainDataMember(item, domainMemberState, domainLocationInfo); return; } } this.Add(new DomainDataMember(item, domainMemberState, domainLocationInfo)); }
public void BeginUserEdit(Authentication authentication, DomainLocationInfo location) { try { this.dispatcher.VerifyAccess(); this.CremaHost.DebugMethod(authentication, this, nameof(BeginUserEdit), base.DomainInfo.ItemPath, base.DomainInfo.ItemType); this.ValidateBeginUserEdit(authentication, location); this.Sign(authentication); this.InvokeBeginUserEdit(authentication, location, out var domainUser); this.OnUserChanged(new DomainUserEventArgs(authentication, this, domainUser)); this.Container.InvokeDomainUserChangedEvent(authentication, this, domainUser); } catch (Exception e) { this.CremaHost.Error(e); throw; } }
private void ValidateSetLocation(Authentication authentication, DomainLocationInfo location) { var domainUser = this.GetDomainUser(authentication); }
protected virtual void OnBeginUserEdit(DomainUser domainUser, DomainLocationInfo location) { }
protected virtual void OnSetLocation(DomainUser domainUser, DomainLocationInfo location) { }
async void IDomainContextEventCallback.OnUserEditBegun(CallbackInfo callbackInfo, Guid domainID, DomainLocationInfo domainLocationInfo, Guid taskID) { try { await this.callbackEvent.InvokeAsync(callbackInfo.Index, () => { this.Dispatcher.Invoke(() => { var authentication = this.UserContext.Authenticate(callbackInfo.SignatureDate); var domain = this.GetDomain(domainID); var domainMember = domain.GetDomainMember(authentication); domain.InvokeMemberEditBegunAsync(authentication, domainMember, domainLocationInfo, taskID); }); }); } catch (Exception e) { this.CremaHost.Error(e); } }
public void BeginEdit(Authentication authentication, DomainLocationInfo location) { this.domain.BeginUserEdit(authentication, location); }
public Task BeginEditAsync(Authentication authentication, DomainLocationInfo location) { return(this.domain.BeginUserEditAsync(authentication, location)); }
public async Task <ResultBase> SetUserLocationAsync(Guid authenticationToken, Guid domainID, DomainLocationInfo location) { var authentication = await this.CremaHost.AuthenticateAsync(authenticationToken); var result = new ResultBase(); var domain = await this.GetDomainAsync(domainID); await domain.SetUserLocationAsync(authentication, location); result.SignatureDate = authentication.SignatureDate; return(result); }
public Task SetLocationAsync(Authentication authentication, DomainLocationInfo location) { return(this.domain.SetUserLocationAsync(authentication, location)); }
public DomainDataMember(DomainMemberInfo domainMemberInfo, DomainMemberState domainMemberState, DomainLocationInfo domainLocationInfo) { this.ID = domainMemberInfo.ID; this.Name = domainMemberInfo.Name; this.Location = domainLocationInfo; this.IsBeingEdited = domainMemberState.HasFlag(DomainMemberState.IsBeingEdited); this.Background = new SolidColorBrush(domainMemberInfo.GetColor()); }
public void SetLocation(Authentication authentication, DomainLocationInfo location) { this.domain.SetUserLocation(authentication, location); }
private void InvokeSetUserLocation(Authentication authentication, DomainLocationInfo location, out DomainUser domainUser) { domainUser = this.GetDomainUser(authentication); this.OnSetLocation(domainUser, location); domainUser.Location = location; }