The ClaimedRoles element contains a sequence of roles claimed by the signer but not certified. Additional contents types may be defined on a domain application basis and be part of this element. The namespaces given to the corresponding XML schemas will allow their unambiguous identification in the case these roles use XML.
Пример #1
0
        /// <summary>
        /// Load state from an XML element
        /// </summary>
        /// <param name="xmlElement">XML element containing new state</param>
        public void LoadXml(System.Xml.XmlElement xmlElement)
        {
            XmlNamespaceManager xmlNamespaceManager;
            XmlNodeList         xmlNodeList;

            if (xmlElement == null)
            {
                throw new ArgumentNullException("xmlElement");
            }

            xmlNamespaceManager = new XmlNamespaceManager(xmlElement.OwnerDocument.NameTable);
            xmlNamespaceManager.AddNamespace("xsd", XadesSignedXml.XadesNamespaceUri);

            xmlNodeList = xmlElement.SelectNodes("xsd:ClaimedRoles", xmlNamespaceManager);
            if (xmlNodeList.Count != 0)
            {
                this.claimedRoles = new ClaimedRoles();
                this.claimedRoles.LoadXml((XmlElement)xmlNodeList.Item(0));
            }

            xmlNodeList = xmlElement.SelectNodes("xsd:CertifiedRoles", xmlNamespaceManager);
            if (xmlNodeList.Count != 0)
            {
                this.certifiedRoles = new CertifiedRoles();
                this.certifiedRoles.LoadXml((XmlElement)xmlNodeList.Item(0));
            }
        }
Пример #2
0
		/// <summary>
		/// Default constructor
		/// </summary>
		public SignerRole()
		{
			this.claimedRoles = new ClaimedRoles();
			this.certifiedRoles = new CertifiedRoles();
		}
Пример #3
0
		/// <summary>
		/// Load state from an XML element
		/// </summary>
		/// <param name="xmlElement">XML element containing new state</param>
		public void LoadXml(System.Xml.XmlElement xmlElement)
		{
			XmlNamespaceManager xmlNamespaceManager;
			XmlNodeList xmlNodeList;
			
			if (xmlElement == null)
			{
				throw new ArgumentNullException("xmlElement");
			}

			xmlNamespaceManager = new XmlNamespaceManager(xmlElement.OwnerDocument.NameTable);
			xmlNamespaceManager.AddNamespace("xsd", XadesSignedXml.XadesNamespaceUri);

			xmlNodeList = xmlElement.SelectNodes("xsd:ClaimedRoles", xmlNamespaceManager);
			if (xmlNodeList.Count != 0)
			{
				this.claimedRoles = new ClaimedRoles();
				this.claimedRoles.LoadXml((XmlElement)xmlNodeList.Item(0));
			}

			xmlNodeList = xmlElement.SelectNodes("xsd:CertifiedRoles", xmlNamespaceManager);
			if (xmlNodeList.Count != 0)
			{
				this.certifiedRoles = new CertifiedRoles();
				this.certifiedRoles.LoadXml((XmlElement)xmlNodeList.Item(0));
			}
		}
Пример #4
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public SignerRole()
 {
     this.claimedRoles   = new ClaimedRoles();
     this.certifiedRoles = new CertifiedRoles();
 }