A class that implements IIdentity interface to facilitate custom role-based security.
상속: IIdentity
        /// <summary>
        /// Initializes a new instance of the <see cref="SecurityPrincipal"/> class.
        /// </summary>
        /// <param name="identity">An <see cref="SecurityIdentity"/> object.</param>
        /// <exception cref="ArgumentNullException">Value specified for <paramref name="identity"/> is null.</exception>
        public SecurityPrincipal(SecurityIdentity identity)
        {
            if (identity == null)
                throw new ArgumentNullException(nameof(identity));

            m_identity = identity;
        }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SecurityPrincipal"/> class.
        /// </summary>
        /// <param name="identity">An <see cref="SecurityIdentity"/> object.</param>
        /// <exception cref="ArgumentNullException">Value specified for <paramref name="identity"/> is null.</exception>
        public SecurityPrincipal(SecurityIdentity identity)
        {
            if (identity == null)
            {
                throw new ArgumentNullException(nameof(identity));
            }

            m_identity = identity;
        }