Example #1
0
        private async void Domain_MemberRemoved(object sender, DomainMemberRemovedEventArgs e)
        {
            var domainMemberInfo = e.DomainMemberInfo;

            await this.Dispatcher.InvokeAsync(() =>
            {
                this.UserInfos.Remove(domainMemberInfo.ID);
            });
        }
Example #2
0
 private async void Domain_MemberRemoved(object sender, DomainMemberRemovedEventArgs e)
 {
     this.RefreshEditors();
     await this.Dispatcher.InvokeAsync(() =>
     {
         foreach (var item in this.Contents)
         {
             item.OnEditorsChanged(e);
         }
     });
 }
Example #3
0
        private void Domain_MemberRemoved(object sender, DomainMemberRemovedEventArgs e)
        {
            if (sender is IDomain domain && e.RemoveInfo.Reason == RemoveReason.Kick && e.DomainMemberInfo.ID == this.CommandContext.UserID)
            {
                domain.MemberRemoved -= Domain_MemberRemoved;
                throw new NotImplementedException("dotnet");
                // this.CommandContext.Category = null;
#pragma warning disable CS0162 // 접근할 수 없는 코드가 있습니다.
                this.CommandContext.Target = null;
#pragma warning restore CS0162 // 접근할 수 없는 코드가 있습니다.
            }
        }
        private void Domains_DomainMemberRemoved(object sender, DomainMemberRemovedEventArgs e)
        {
            var callbackInfo = new CallbackInfo()
            {
                Index = this.index++, SignatureDate = e.SignatureDate
            };
            var domainID   = e.DomainInfo.DomainID;
            var userID     = e.DomainMemberInfo.ID;
            var ownerID    = e.OwnerID;
            var removeInfo = e.RemoveInfo;
            var taskID     = e.TaskID;

            this.InvokeEvent(() => this.Callback?.OnUserRemoved(callbackInfo, domainID, userID, ownerID, removeInfo, taskID));
        }
Example #5
0
        public void InvokeDomainMemberRemovedEvent(Authentication authentication, Domain domain, DomainMember domainMember, RemoveInfo removeInfo, Guid taskID)
        {
            var args = new DomainMemberRemovedEventArgs(authentication, domain, domainMember, removeInfo)
            {
                TaskID = taskID
            };
            var eventLog = EventLogBuilder.Build(authentication, this, nameof(InvokeDomainMemberRemovedEvent), domain, domainMember, removeInfo.Reason, removeInfo.Message);
            var comment  = removeInfo.Reason == RemoveReason.Kick
                ? EventMessageBuilder.KickDomainMember(authentication, domain, domainMember)
                : EventMessageBuilder.LeaveDomainMember(authentication, domain);

            this.CremaHost.Debug(eventLog);
            this.CremaHost.Info(comment);
            this.OnDomainMemberRemoved(args);
        }
        private void Domain_MemberRemoved(object sender, DomainMemberRemovedEventArgs e)
        {
            var domainMemberID = e.DomainMemberInfo.ID;
            var removeInfo     = e.RemoveInfo;
            var userID         = e.MemberID;

            if (domainMemberID == this.authentication.ID && removeInfo.Reason == RemoveReason.Kick)
            {
                this.AccessType = DomainAccessType.None;
                this.Dispatcher.InvokeAsync(async() =>
                {
                    await this.RefreshAsync();
                    this.OnKicked(e);
                });
            }
        }
Example #7
0
 private async void Domain_MemberRemoved(object sender, DomainMemberRemovedEventArgs e)
 {
     this.RefreshEditors();
     await this.Dispatcher.InvokeAsync(() => this.OnEditorsChanged(e));
 }
Example #8
0
 private void Domains_DomainMemberRemoved(object sender, DomainMemberRemovedEventArgs e)
 {
     this.Invoke(null);
 }
Example #9
0
 protected virtual void OnDomainMemberRemoved(DomainMemberRemovedEventArgs e)
 {
     this.domainMemberRemoved?.Invoke(this, e);
 }