﻿// Decompiled with JetBrains decompiler
// Type: System.ComponentModel.Design.ActiveDesignerEventArgs
// Assembly: System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// MVID: 5ABD58FD-DF31-44FD-A492-63F2B47CC9AF
// Assembly location: C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.dll

using System;
using System.Runtime;
using System.Security.Permissions;

namespace System.ComponentModel.Design
{
  /// <summary>
  /// Provides data for the <see cref="P:System.ComponentModel.Design.IDesignerEventService.ActiveDesigner"/> event.
  /// </summary>
  [PermissionSet(SecurityAction.InheritanceDemand, Name = "FullTrust")]
  [PermissionSet(SecurityAction.LinkDemand, Name = "FullTrust")]
  [HostProtection(SecurityAction.LinkDemand, SharedState = true)]
  public class ActiveDesignerEventArgs : EventArgs
  {
    private readonly IDesignerHost oldDesigner;
    private readonly IDesignerHost newDesigner;

    /// <summary>
    /// Gets the document that is losing activation.
    /// </summary>
    /// 
    /// <returns>
    /// An <see cref="T:System.ComponentModel.Design.IDesignerHost"/> that represents the document losing activation.
    /// </returns>
    public IDesignerHost OldDesigner
    {
      [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get
      {
        return this.oldDesigner;
      }
    }

    /// <summary>
    /// Gets the document that is gaining activation.
    /// </summary>
    /// 
    /// <returns>
    /// An <see cref="T:System.ComponentModel.Design.IDesignerHost"/> that represents the document gaining activation.
    /// </returns>
    public IDesignerHost NewDesigner
    {
      [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get
      {
        return this.newDesigner;
      }
    }

    /// <summary>
    /// Initializes a new instance of the <see cref="T:System.ComponentModel.Design.ActiveDesignerEventArgs"/> class.
    /// </summary>
    /// <param name="oldDesigner">The document that is losing activation. </param><param name="newDesigner">The document that is gaining activation. </param>
    [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
    public ActiveDesignerEventArgs(IDesignerHost oldDesigner, IDesignerHost newDesigner)
    {
      this.oldDesigner = oldDesigner;
      this.newDesigner = newDesigner;
    }
  }
}
