System.Xml.XmlDictionaryReader.MoveToStartElement C# (CSharp) Méthode

MoveToStartElement() public méthode

public MoveToStartElement ( ) : void
Résultat void
        public virtual void MoveToStartElement()
        {
            if (!IsStartElement())
                XmlExceptionHelper.ThrowStartElementExpected(this);
        }

Same methods

XmlDictionaryReader::MoveToStartElement ( System localName, System namespaceUri ) : void
XmlDictionaryReader::MoveToStartElement ( XmlDictionaryString localName, XmlDictionaryString namespaceUri ) : void
XmlDictionaryReader::MoveToStartElement ( string name ) : void
XmlDictionaryReader::MoveToStartElement ( string localName, string namespaceUri ) : void

Usage Example

 public void ReadFrom(XmlDictionaryReader reader, long maxBufferSize)
 {
     this.ValidateReadState();
     reader.MoveToStartElement(this.OpeningElementName, NamespaceUri);
     this.encoding = reader.GetAttribute(EncodingAttribute, null);
     this.id = reader.GetAttribute(System.ServiceModel.XD.XmlEncryptionDictionary.Id, null) ?? System.ServiceModel.Security.SecurityUniqueId.Create().Value;
     this.wsuId = reader.GetAttribute(System.ServiceModel.XD.XmlEncryptionDictionary.Id, System.ServiceModel.XD.UtilityDictionary.Namespace) ?? System.ServiceModel.Security.SecurityUniqueId.Create().Value;
     this.mimeType = reader.GetAttribute(MimeTypeAttribute, null);
     this.type = reader.GetAttribute(TypeAttribute, null);
     this.ReadAdditionalAttributes(reader);
     reader.Read();
     if (reader.IsStartElement(EncryptionMethodElement.ElementName, NamespaceUri))
     {
         this.encryptionMethod.ReadFrom(reader);
     }
     if (this.tokenSerializer.CanReadKeyIdentifier(reader))
     {
         this.KeyIdentifier = this.tokenSerializer.ReadKeyIdentifier(reader);
     }
     reader.ReadStartElement(CipherDataElementName, NamespaceUri);
     reader.ReadStartElement(CipherValueElementName, NamespaceUri);
     if (maxBufferSize == 0L)
     {
         this.ReadCipherData(reader);
     }
     else
     {
         this.ReadCipherData(reader, maxBufferSize);
     }
     reader.ReadEndElement();
     reader.ReadEndElement();
     this.ReadAdditionalElements(reader);
     reader.ReadEndElement();
     this.State = EncryptionState.Read;
 }
All Usage Examples Of System.Xml.XmlDictionaryReader::MoveToStartElement