The Labs \ Source Viewer \ SSCLI \ System.ComponentModel.Design \ DesignerTransactionCloseEventArgs

  1. //------------------------------------------------------------------------------
  2. // <copyright file="DesignerTransactionCloseEvent.cs" company="Microsoft">
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. // </copyright>
  14. //------------------------------------------------------------------------------
  15. /*
  16. */
  17. namespace System.ComponentModel.Design
  18. {
  19.     using Microsoft.Win32;
  20.     using System;
  21.     using System.ComponentModel;
  22.     using System.Diagnostics;
  23.     using System.Reflection;
  24.     using System.Security.Permissions;
  25.    
  26.     /// <devdoc>
  27.     /// <para>[To be supplied.]</para>
  28.     /// </devdoc>
  29.     [HostProtection(SharedState = true)]
  30.     [System.Runtime.InteropServices.ComVisible(true)]
  31.     [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.InheritanceDemand, Name = "FullTrust")]
  32.     [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name = "FullTrust")]
  33.     public class DesignerTransactionCloseEventArgs : EventArgs
  34.     {
  35.         private bool commit;
  36.         private bool lastTransaction;
  37.        
  38.         /// <devdoc>
  39.         /// Creates a new event args. Commit is true if the transaction is committed. This
  40.         /// defaults the LastTransaction property to true.
  41.         /// </devdoc>
  42.         [Obsolete("This constructor is obsolete. Use DesignerTransactionCloseEventArgs(bool, bool) instead. http://go.microsoft.com/fwlink/?linkid=14202")]
  43.         public DesignerTransactionCloseEventArgs(bool commit) : this(commit, true)
  44.         {
  45.         }
  46.        
  47.         /// <devdoc>
  48.         /// Creates a new event args. Commit is true if the transaction is committed, and
  49.         /// lastTransaction is true if this is the last transaction to close.
  50.         /// </devdoc>
  51.         public DesignerTransactionCloseEventArgs(bool commit, bool lastTransaction)
  52.         {
  53.             this.commit = commit;
  54.             this.lastTransaction = lastTransaction;
  55.         }
  56.        
  57.         /// <devdoc>
  58.         /// <para>[To be supplied.]</para>
  59.         /// </devdoc>
  60.         public bool TransactionCommitted {
  61.             get { return commit; }
  62.         }
  63.        
  64.         /// <devdoc>
  65.         /// Returns true if this is the last transaction to close.
  66.         /// </devdoc>
  67.         public bool LastTransaction {
  68.             get { return lastTransaction; }
  69.         }
  70.     }
  71. }

Developer Fusion