// Decompiled with JetBrains decompiler // Type: Microsoft.InfoCards.WSIdentityFaultException // Assembly: infocard, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // MVID: ADE0A079-11DB-4A46-8BDE-D2A592CA8DEA // Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00001-msil\Virus.Win32.Expiro.w-1f15ee7e9f7da02b6bfb4c5a5e6484eb9fa71b82d3699c54bcc7a31794b4a66d.exe using Microsoft.InfoCards.Diagnostics; using System; using System.Globalization; using System.Runtime.Serialization; using System.ServiceModel; using System.ServiceModel.Channels; using System.Xml; namespace Microsoft.InfoCards { internal class WSIdentityFaultException : InfoCardBaseException { private const int HRESULT = -1073413871; public static void ThrowIfFaultMessage(Message message, CultureInfo displayCulture) { if (message.IsFault) { MessageFault fault1 = MessageFault.CreateFault(message, 2000000); FaultException fault2 = FaultException.CreateFault(fault1); string message1 = fault2.Message; string extendedMessage = string.Empty; if (fault1.Reason != null) { FaultReasonText matchingTranslation = fault1.Reason.GetMatchingTranslation(displayCulture); if (matchingTranslation != null) extendedMessage = matchingTranslation.Text; } if (fault1.HasDetail) { using (XmlReader atDetailContents = (XmlReader) fault1.GetReaderAtDetailContents()) { if (atDetailContents.Read()) message1 = string.Format((IFormatProvider) CultureInfo.CurrentUICulture, SR.GetString("FaultMessageFormat"), new object[2] { (object) fault2.Message, (object) atDetailContents.ReadOuterXml() }); } } throw InfoCardTrace.ThrowHelperErrorWithNoLogging((Exception) new WSIdentityFaultException(message1, extendedMessage, (Exception) fault2)); } } public WSIdentityFaultException() : base(-1073413871) { } public WSIdentityFaultException(string message) : base(-1073413871, message) { } public WSIdentityFaultException(string message, string extendedMessage, Exception inner) : base(-1073413871, message, extendedMessage) { if (!(inner is FaultException)) return; this.MapFaultException(inner as FaultException); } protected WSIdentityFaultException(SerializationInfo si, StreamingContext sc) : base(-1073413871, si, sc) { } private void MapFaultException(FaultException fe) { if (fe == null || fe.Code == null || fe.Code.SubCode == null || !(fe.Code.SubCode.Namespace == "http://schemas.xmlsoap.org/ws/2005/05/identity/fault")) return; switch (fe.Code.SubCode.Name) { case "InformationCardRefreshRequired": this.HResult = -1073413760; break; case "MissingAppliesTo": this.HResult = -1073413759; break; case "InvalidProofKey": this.HResult = -1073413758; break; case "UnknownInformationCardReference": this.HResult = -1073413757; break; case "FailedRequiredClaims": this.HResult = -1073413756; break; } } } }