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

  1. //------------------------------------------------------------------------------
  2. // <copyright file="DesignerVerbCollection.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 System;
  18.     using System.Collections;
  19.     using System.Diagnostics;
  20.     using System.Security.Permissions;
  21.    
  22.     /// <devdoc>
  23.     /// <para>[To be supplied.]</para>
  24.     /// </devdoc>
  25.     [HostProtection(SharedState = true)]
  26.     [System.Runtime.InteropServices.ComVisible(true)]
  27.     [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.InheritanceDemand, Name = "FullTrust")]
  28.     [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name = "FullTrust")]
  29.     public class DesignerVerbCollection : CollectionBase
  30.     {
  31.        
  32.         /// <devdoc>
  33.         /// <para>[To be supplied.]</para>
  34.         /// </devdoc>
  35.         public DesignerVerbCollection()
  36.         {
  37.         }
  38.        
  39.         /// <devdoc>
  40.         /// <para>[To be supplied.]</para>
  41.         /// </devdoc>
  42.         public DesignerVerbCollection(DesignerVerb[] value)
  43.         {
  44.             AddRange(value);
  45.         }
  46.        
  47.         /// <devdoc>
  48.         /// <para>[To be supplied.]</para>
  49.         /// </devdoc>
  50.         public DesignerVerb this[int index]
  51.         {
  52.             get { return (DesignerVerb)(List[index]); }
  53.             set { List[index] = value; }
  54.         }
  55.        
  56.         /// <devdoc>
  57.         /// <para>[To be supplied.]</para>
  58.         /// </devdoc>
  59.         public int Add(DesignerVerb value)
  60.         {
  61.             return List.Add(value);
  62.         }
  63.         /// <devdoc>
  64.         /// <para>[To be supplied.]</para>
  65.         /// </devdoc>
  66.         public void AddRange(DesignerVerb[] value)
  67.         {
  68.             if (value == null) {
  69.                 throw new ArgumentNullException("value");
  70.             }
  71.             for (int i = 0; ((i) < (value.Length)); i = ((i)+(1))) {
  72.                 this.Add(value[i]);
  73.             }
  74.         }
  75.         /// <devdoc>
  76.         /// <para>[To be supplied.]</para>
  77.         /// </devdoc>
  78.         public void AddRange(DesignerVerbCollection value)
  79.         {
  80.             if (value == null) {
  81.                 throw new ArgumentNullException("value");
  82.             }
  83.             int currentCount = value.Count;
  84.             for (int i = 0; i < currentCount; i = ((i)+(1))) {
  85.                 this.Add(value[i]);
  86.             }
  87.         }
  88.         /// <devdoc>
  89.         /// <para>[To be supplied.]</para>
  90.         /// </devdoc>
  91.         public void Insert(int index, DesignerVerb value)
  92.         {
  93.             List.Insert(index, value);
  94.         }
  95.         /// <devdoc>
  96.         /// <para>[To be supplied.]</para>
  97.         /// </devdoc>
  98.         public int IndexOf(DesignerVerb value)
  99.         {
  100.             return List.IndexOf(value);
  101.         }
  102.         /// <devdoc>
  103.         /// <para>[To be supplied.]</para>
  104.         /// </devdoc>
  105.         public bool Contains(DesignerVerb value)
  106.         {
  107.             return List.Contains(value);
  108.         }
  109.         /// <devdoc>
  110.         /// <para>[To be supplied.]</para>
  111.         /// </devdoc>
  112.         public void Remove(DesignerVerb value)
  113.         {
  114.             List.Remove(value);
  115.         }
  116.         /// <devdoc>
  117.         /// <para>[To be supplied.]</para>
  118.         /// </devdoc>
  119.         public void CopyTo(DesignerVerb[] array, int index)
  120.         {
  121.             List.CopyTo(array, index);
  122.         }
  123.         /// <devdoc>
  124.         /// <para>[To be supplied.]</para>
  125.         /// </devdoc>
  126.         protected override void OnSet(int index, object oldValue, object newValue)
  127.         {
  128.         }
  129.         /// <devdoc>
  130.         /// <para>[To be supplied.]</para>
  131.         /// </devdoc>
  132.         protected override void OnInsert(int index, object value)
  133.         {
  134.         }
  135.         /// <devdoc>
  136.         /// <para>[To be supplied.]</para>
  137.         /// </devdoc>
  138.         protected override void OnClear()
  139.         {
  140.         }
  141.         /// <devdoc>
  142.         /// <para>[To be supplied.]</para>
  143.         /// </devdoc>
  144.         protected override void OnRemove(int index, object value)
  145.         {
  146.         }
  147.         /// <devdoc>
  148.         /// <para>[To be supplied.]</para>
  149.         /// </devdoc>
  150.         protected override void OnValidate(object value)
  151.         {
  152.             Debug.Assert(value != null, "Don't add null verbs!");
  153.         }
  154.        
  155.     }
  156. }

Developer Fusion