﻿// Decompiled with JetBrains decompiler
// Type: System.Threading.SynchronizationLockException
// Assembly: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// MVID: 255ABCDF-D9D6-4E3D-BAD4-F74D4CE3D7A8
// Assembly location: C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll

using System;
using System.Runtime;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;

namespace System.Threading
{
  /// <summary>
  /// The exception that is thrown when a method requires the caller to own the lock on a given Monitor, and the method is invoked by a caller that does not own that lock.
  /// </summary>
  /// <filterpriority>2</filterpriority>
  [ComVisible(true)]
  [__DynamicallyInvokable]
  [Serializable]
  public class SynchronizationLockException : SystemException
  {
    /// <summary>
    /// Initializes a new instance of the <see cref="T:System.Threading.SynchronizationLockException"/> class with default properties.
    /// </summary>
    [__DynamicallyInvokable]
    public SynchronizationLockException()
      : base(Environment.GetResourceString("Arg_SynchronizationLockException"))
    {
      this.SetErrorCode(-2146233064);
    }

    /// <summary>
    /// Initializes a new instance of the <see cref="T:System.Threading.SynchronizationLockException"/> class with a specified error message.
    /// </summary>
    /// <param name="message">The error message that explains the reason for the exception. </param>
    [__DynamicallyInvokable]
    public SynchronizationLockException(string message)
      : base(message)
    {
      this.SetErrorCode(-2146233064);
    }

    /// <summary>
    /// Initializes a new instance of the <see cref="T:System.Threading.SynchronizationLockException"/> class with a specified error message and a reference to the inner exception that is the cause of this exception.
    /// </summary>
    /// <param name="message">The error message that explains the reason for the exception. </param><param name="innerException">The exception that is the cause of the current exception. If the <paramref name="innerException"/> parameter is not null, the current exception is raised in a catch block that handles the inner exception. </param>
    [__DynamicallyInvokable]
    public SynchronizationLockException(string message, Exception innerException)
      : base(message, innerException)
    {
      this.SetErrorCode(-2146233064);
    }

    /// <summary>
    /// Initializes a new instance of the <see cref="T:System.Threading.SynchronizationLockException"/> class with serialized data.
    /// </summary>
    /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> that holds the serialized object data about the exception being thrown. </param><param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext"/> that contains contextual information about the source or destination. </param>
    [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
    protected SynchronizationLockException(SerializationInfo info, StreamingContext context)
      : base(info, context)
    {
    }
  }
}
