This class contains a collection of DocumentationReferences
コード例 #1
0
ファイル: ObjectIdentifier.cs プロジェクト: gizmo75rus/HCS
        /// <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:Identifier", xmlNamespaceManager);
            if (xmlNodeList.Count == 0)
            {
                throw new CryptographicException("Identifier missing");
            }
            this.identifier = new Identifier();
            this.identifier.LoadXml((XmlElement)xmlNodeList.Item(0));

            xmlNodeList = xmlElement.SelectNodes("xsd:Description", xmlNamespaceManager);
            if (xmlNodeList.Count != 0)
            {
                this.description = xmlNodeList.Item(0).InnerText;
            }

            xmlNodeList = xmlElement.SelectNodes("xsd:DocumentationReferences", xmlNamespaceManager);
            if (xmlNodeList.Count != 0)
            {
                this.documentationReferences = new DocumentationReferences();
                this.documentationReferences.LoadXml((XmlElement)xmlNodeList.Item(0));
            }
        }
コード例 #2
0
ファイル: ObjectIdentifier.cs プロジェクト: versh23/Xades
		/// <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:Identifier", xmlNamespaceManager);
			if (xmlNodeList.Count == 0)
			{
				throw new CryptographicException("Identifier missing");
			}
			this.identifier = new Identifier();
			this.identifier.LoadXml((XmlElement)xmlNodeList.Item(0));

			xmlNodeList = xmlElement.SelectNodes("xsd:Description", xmlNamespaceManager);
			if (xmlNodeList.Count != 0)
			{
				this.description = xmlNodeList.Item(0).InnerText;
			}

			xmlNodeList = xmlElement.SelectNodes("xsd:DocumentationReferences", xmlNamespaceManager);
			if (xmlNodeList.Count != 0)
			{
				this.documentationReferences = new DocumentationReferences();
				this.documentationReferences.LoadXml((XmlElement)xmlNodeList.Item(0));
			}
		}
コード例 #3
0
ファイル: ObjectIdentifier.cs プロジェクト: gizmo75rus/HCS
 /// <summary>
 /// Default constructor
 /// </summary>
 public ObjectIdentifier()
 {
     this.identifier = new Identifier();
     this.documentationReferences = new DocumentationReferences();
 }
コード例 #4
0
ファイル: ObjectIdentifier.cs プロジェクト: versh23/Xades
		/// <summary>
		/// Default constructor
		/// </summary>
		public ObjectIdentifier()
		{
			this.identifier = new Identifier();
			this.documentationReferences = new DocumentationReferences();
		}