示例#1
0
        public ClientCredentials Clone()
        {
            ClientCredentials ret = CloneCore();

            if (ret.GetType() != GetType())
            {
                throw new NotImplementedException("CloneCore() must be implemented to return an instance of the same type in this custom ClientCredentials type.");
            }
            return(ret);
        }
示例#2
0
        public ClientCredentials Clone()
        {
            ClientCredentials result = CloneCore();

            if (result == null || result.GetType() != this.GetType())
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(NotImplemented.ByDesignWithMessage(SR.Format(SR.CloneNotImplementedCorrectly, this.GetType(), (result != null) ? result.ToString() : "null")));
            }
            return(result);
        }
示例#3
0
        public ClientCredentials Clone()
        {
            ClientCredentials credentials = this.CloneCore();

            if ((credentials == null) || (credentials.GetType() != base.GetType()))
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotImplementedException(System.ServiceModel.SR.GetString("CloneNotImplementedCorrectly", new object[] { base.GetType(), (credentials != null) ? credentials.ToString() : "null" })));
            }
            return(credentials);
        }