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

  1. //------------------------------------------------------------------------------
  2. // <copyright file="CheckoutException.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. namespace System.ComponentModel.Design
  16. {
  17.     using Microsoft.Win32;
  18.     using System;
  19.     using System.ComponentModel;
  20.     using System.Diagnostics;
  21.     using System.Runtime.InteropServices;
  22.     using System.Runtime.Serialization;
  23.     using System.Security.Permissions;
  24.    
  25.    
  26.     /// <devdoc>
  27.     /// <para>
  28.     /// The exception thrown when an attempt is made to edit a file that is checked into
  29.     /// a source control program.
  30.     /// </para>
  31.     /// </devdoc>
  32.     [HostProtection(SharedState = true)]
  33.     [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2112:SecuredTypesShouldNotExposeFields")]
  34.     // ReadOnly field - already shipped.
  35.     [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.InheritanceDemand, Name = "FullTrust")]
  36.     [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name = "FullTrust")]
  37.     [Serializable()]
  38.     public class CheckoutException : ExternalException
  39.     {
  40.        
  41.         /// <devdoc>
  42.         /// <para>
  43.         /// Initializes a <see cref='System.ComponentModel.Design.CheckoutException'/> that specifies that the checkout
  44.         /// was
  45.         /// canceled. This field is read-only.
  46.         /// </para>
  47.         /// </devdoc>
  48.         public static readonly CheckoutException Canceled = new CheckoutException(SR.GetString(SR.CHECKOUTCanceled), NativeMethods.E_ABORT);
  49.        
  50.         /// <devdoc>
  51.         /// <para>
  52.         /// Initializes
  53.         /// a new instance of the <see cref='System.ComponentModel.Design.CheckoutException'/> class with no
  54.         /// associated message or
  55.         /// error code.
  56.         /// </para>
  57.         /// </devdoc>
  58.         public CheckoutException()
  59.         {
  60.         }
  61.        
  62.         /// <devdoc>
  63.         /// <para>
  64.         /// Initializes a new instance of the <see cref='System.ComponentModel.Design.CheckoutException'/>
  65.         /// class with the specified message.
  66.         /// </para>
  67.         /// </devdoc>
  68.         public CheckoutException(string message) : base(message)
  69.         {
  70.         }
  71.        
  72.         /// <devdoc>
  73.         /// <para>
  74.         /// Initializes a new instance of the <see cref='System.ComponentModel.Design.CheckoutException'/>
  75.         /// class with the specified message and error code.
  76.         /// </para>
  77.         /// </devdoc>
  78.         public CheckoutException(string message, int errorCode) : base(message, errorCode)
  79.         {
  80.         }
  81.        
  82.         /// <devdoc>
  83.         /// Need this constructor since Exception implements ISerializable. We don't have any fields,
  84.         /// so just forward this to base.
  85.         /// </devdoc>
  86.         protected CheckoutException(SerializationInfo info, StreamingContext context) : base(info, context)
  87.         {
  88.         }
  89.        
  90.         /// <devdoc>
  91.         /// Initializes a new instance of the Exception class with a specified error message and a
  92.         /// reference to the inner exception that is the cause of this exception.
  93.         /// FxCop CA1032: Multiple constructors are required to correctly implement a custom exception.
  94.         /// </devdoc>
  95.         public CheckoutException(string message, Exception innerException) : base(message, innerException)
  96.         {
  97.         }
  98.     }
  99. }

Developer Fusion