Imported Upstream version 4.6.0.125

Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-08-03 10:59:49 +00:00
parent a569aebcfd
commit e79aa3c0ed
17047 changed files with 3137615 additions and 392334 deletions

View File

@ -0,0 +1,50 @@
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------
namespace System.ServiceModel
{
using System.Runtime;
using System.Runtime.Serialization;
using System.Security;
using System.Security.Permissions;
[Serializable]
public class MsmqPoisonMessageException : PoisonMessageException
{
long messageLookupId = 0;
public MsmqPoisonMessageException() { }
public MsmqPoisonMessageException(string message) : base(message) { }
public MsmqPoisonMessageException(string message, Exception innerException) : base(message, innerException) { }
public MsmqPoisonMessageException(long messageLookupId) : this(messageLookupId, null) { }
public MsmqPoisonMessageException(long messageLookupId, Exception innerException)
: base(SR.GetString(SR.MsmqPoisonMessage), innerException)
{
this.messageLookupId = messageLookupId;
}
public long MessageLookupId
{
get { return this.messageLookupId; }
}
protected MsmqPoisonMessageException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
this.messageLookupId = (long)info.GetValue("messageLookupId", typeof(long));
}
#pragma warning disable 688 // This is a Level1 assembly: a Level2 [SecurityCrital] on public members are turned into [SecuritySafeCritical] + LinkDemand
[Fx.Tag.SecurityNote(Critical = "Overrides the base.GetObjectData which is critical, as well as calling this method.",
Safe = "Replicates the LinkDemand.")]
[SecurityCritical]
[SecurityPermissionAttribute(SecurityAction.LinkDemand, SerializationFormatter = true)]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
info.AddValue("messageLookupId", this.messageLookupId);
}
#pragma warning restore 688
}
}