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

ReadValueAsBase64() public méthode

public ReadValueAsBase64 ( byte buffer, int offset, int count ) : int
buffer byte
offset int
count int
Résultat int
        public virtual int ReadValueAsBase64(byte[] buffer, int offset, int count)
        {
            throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException());
        }

Usage Example

Exemple #1
0
 protected override void WriteTextNode(XmlDictionaryReader reader, bool attribute)
 {
     Type type = reader.ValueType;
     if (type == typeof(string))
     {
         if (reader.CanReadValueChunk)
         {
             if (chars == null)
             {
                 chars = new char[256];
             }
             int count;
             while ((count = reader.ReadValueChunk(chars, 0, chars.Length)) > 0)
             {
                 this.WriteChars(chars, 0, count);
             }
         }
         else
         {
             WriteString(reader.Value);
         }
         if (!attribute)
         {
             reader.Read();
         }
     }
     else if (type == typeof(byte[]))
     {
         if (reader.CanReadBinaryContent)
         {
             // Its best to read in buffers that are a multiple of 3 so we don't break base64 boundaries when converting text
             if (bytes == null)
             {
                 bytes = new byte[384];
             }
             int count;
             while ((count = reader.ReadValueAsBase64(bytes, 0, bytes.Length)) > 0)
             {
                 this.WriteBase64(bytes, 0, count);
             }
         }
         else
         {
             WriteString(reader.Value);
         }
         if (!attribute)
         {
             reader.Read();
         }
     }
     else
     {
         base.WriteTextNode(reader, attribute);
     }
 }
All Usage Examples Of System.Xml.XmlDictionaryReader::ReadValueAsBase64