Exemplo n.º 1
0
        private SupportingTokenParameters(SupportingTokenParameters other)
        {
            if (other == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(other));
            }

            foreach (SecurityTokenParameters p in other.Signed)
            {
                Signed.Add((SecurityTokenParameters)p.Clone());
            }

            foreach (SecurityTokenParameters p in other.SignedEncrypted)
            {
                SignedEncrypted.Add((SecurityTokenParameters)p.Clone());
            }

            foreach (SecurityTokenParameters p in other.Endorsing)
            {
                Endorsing.Add((SecurityTokenParameters)p.Clone());
            }

            foreach (SecurityTokenParameters p in other.SignedEndorsing)
            {
                SignedEndorsing.Add((SecurityTokenParameters)p.Clone());
            }
        }
Exemplo n.º 2
0
        public SupportingTokenParameters Clone()
        {
            SupportingTokenParameters parameters = this.CloneCore();

            /* if (parameters == null || parameters.GetType() != this.GetType())
             * {
             *   TraceUtility.TraceEvent(
             *       TraceEventType.Error,
             *       TraceCode.Security,
             *       SR.GetString(SR.CloneNotImplementedCorrectly, new object[] { this.GetType(), (parameters != null) ? parameters.ToString() : "null" }));
             * }*/

            return(parameters);
        }