Copy() 공개 메소드

public Copy ( ) : IPermission
리턴 IPermission
예제 #1
0
        public override IPermission Intersect(IPermission target)
        {
            HostProtectionPermission hostProtectionPermission = this.Cast(target);

            if (hostProtectionPermission == null)
            {
                return(null);
            }
            if (this.IsUnrestricted() && hostProtectionPermission.IsUnrestricted())
            {
                return(new HostProtectionPermission(PermissionState.Unrestricted));
            }
            if (this.IsUnrestricted())
            {
                return(hostProtectionPermission.Copy());
            }
            if (hostProtectionPermission.IsUnrestricted())
            {
                return(this.Copy());
            }
            return(new HostProtectionPermission(this._resources & hostProtectionPermission._resources));
        }