The UnsignedDataObjectProperties element may contain properties that qualify some of the signed data objects.
示例#1
0
        /// <summary>
        /// Load state from an XML element
        /// </summary>
        /// <param name="xmlElement">XML element containing new state</param>
        /// <param name="counterSignedXmlElement">Element containing parent signature (needed if there are counter signatures)</param>
        public void LoadXml(System.Xml.XmlElement xmlElement, XmlElement counterSignedXmlElement)
        {
            XmlNamespaceManager xmlNamespaceManager;
            XmlNodeList         xmlNodeList;

            if (xmlElement == null)
            {
                throw new ArgumentNullException("xmlElement");
            }
            if (xmlElement.HasAttribute("Id"))
            {
                this.id = xmlElement.GetAttribute("Id");
            }
            else
            {
                this.id = "";
            }

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

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

            xmlNodeList = xmlElement.SelectNodes("xsd:UnsignedDataObjectProperties", xmlNamespaceManager);
            if (xmlNodeList.Count != 0)
            {
                this.unsignedDataObjectProperties = new UnsignedDataObjectProperties();
                this.unsignedDataObjectProperties.LoadXml((XmlElement)xmlNodeList.Item(0));
            }
        }
示例#2
0
		/// <summary>
		/// Default constructor
		/// </summary>
		public UnsignedProperties()
		{
			this.UnsignedSignatureProperties = new UnsignedSignatureProperties();
			this.unsignedDataObjectProperties = new UnsignedDataObjectProperties();
		}
示例#3
0
		/// <summary>
		/// Load state from an XML element
		/// </summary>
		/// <param name="xmlElement">XML element containing new state</param>
		/// <param name="counterSignedXmlElement">Element containing parent signature (needed if there are counter signatures)</param>
		public void LoadXml(System.Xml.XmlElement xmlElement, XmlElement counterSignedXmlElement)
		{
			XmlNamespaceManager xmlNamespaceManager;
			XmlNodeList xmlNodeList;
			
			if (xmlElement == null)
			{
				throw new ArgumentNullException("xmlElement");
			}
			if (xmlElement.HasAttribute("Id"))
			{
				this.id = xmlElement.GetAttribute("Id");
			}
			else
			{
				this.id = "";
			}

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

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

			xmlNodeList = xmlElement.SelectNodes("xsd:UnsignedDataObjectProperties", xmlNamespaceManager);
			if (xmlNodeList.Count != 0)
			{
				this.unsignedDataObjectProperties = new UnsignedDataObjectProperties();
				this.unsignedDataObjectProperties.LoadXml((XmlElement)xmlNodeList.Item(0));
			}
		}
示例#4
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public UnsignedProperties()
 {
     this.UnsignedSignatureProperties  = new UnsignedSignatureProperties();
     this.unsignedDataObjectProperties = new UnsignedDataObjectProperties();
 }