// Decompiled with JetBrains decompiler // Type: Microsoft.InfoCards.IssuerInformation // Assembly: infocard, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // MVID: 1D4D5564-A025-490C-AF1D-DF4FBB709D1F // Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00001-msil\Virus.Win32.Expiro.w-f8f9f26e940480624825f6bddbea86e70fc4aa746c4dd8efa7d98dcb477000ed.exe using Microsoft.InfoCards.Diagnostics; using System; using System.Collections.Generic; using System.IO; using System.Text; using System.Xml; namespace Microsoft.InfoCards { internal class IssuerInformation { private List m_informationEntries; public IssuerInformation() => this.m_informationEntries = new List(); public void Serialize(Stream stream) { BinaryWriter writer = new BinaryWriter(stream, Encoding.Unicode); writer.Write(this.m_informationEntries.Count); if (this.m_informationEntries.Count <= 0) return; foreach (IssuerInformationEntry informationEntry in this.m_informationEntries) { Utility.SerializeString(writer, informationEntry.Name); Utility.SerializeString(writer, informationEntry.Value); } } public void ReadIssuerInformation(XmlReader reader) { if (!reader.IsStartElement(nameof (IssuerInformation), "http://schemas.xmlsoap.org/ws/2007/01/identity")) throw InfoCardTrace.ThrowHelperError((Exception) new XmlException(SR.GetString("UnexpectedElement"))); while (reader.Read()) { if ("IssuerInformationEntry" == reader.LocalName && "http://schemas.xmlsoap.org/ws/2007/01/identity" == reader.NamespaceURI) this.ReadIssuerInformationEntry(reader); if (nameof (IssuerInformation) == reader.LocalName && "http://schemas.xmlsoap.org/ws/2007/01/identity" == reader.NamespaceURI && XmlNodeType.EndElement == reader.NodeType) break; } } public void ReadIssuerInformationEntry(XmlReader reader) { if (!reader.IsStartElement("IssuerInformationEntry", "http://schemas.xmlsoap.org/ws/2007/01/identity")) throw InfoCardTrace.ThrowHelperError((Exception) new XmlException(SR.GetString("UnexpectedElement"))); string name = string.Empty; string str = string.Empty; while (reader.Read()) { if ("IssuerInformationEntry" == reader.LocalName && "http://schemas.xmlsoap.org/ws/2007/01/identity" == reader.NamespaceURI && XmlNodeType.EndElement == reader.NodeType) { this.m_informationEntries.Add(new IssuerInformationEntry(name, str)); break; } if ("EntryName" == reader.LocalName && "http://schemas.xmlsoap.org/ws/2007/01/identity" == reader.NamespaceURI) { name = reader.ReadString(); if (string.IsNullOrEmpty(name)) throw InfoCardTrace.ThrowHelperError((Exception) new InvalidCardException()); } if ("EntryValue" == reader.LocalName && "http://schemas.xmlsoap.org/ws/2007/01/identity" == reader.NamespaceURI) str = reader.ReadString(); } } } }