Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WebForms / System / Web / UI / Design / TemplateGroupCollection.cs / 1 / TemplateGroupCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.Design { using System; using System.Collections; using System.Design; using System.Globalization; ////// /// Provides the necessary functionality for a template editing verb collection /// public sealed class TemplateGroupCollection : IList { private ArrayList _list; ///public TemplateGroupCollection() { } internal TemplateGroupCollection(TemplateGroup[] verbs) { for (int i = 0; i < verbs.Length; i++) { Add(verbs[i]); } } /// public int Count { get { return InternalList.Count; } } private ArrayList InternalList { get { if (_list == null) { _list = new ArrayList(); } return _list; } } /// public TemplateGroup this[int index] { get { return (TemplateGroup)InternalList[index]; } set { InternalList[index] = value; } } /// public int Add(TemplateGroup group) { return InternalList.Add(group); } public void AddRange(TemplateGroupCollection groups) { InternalList.AddRange(groups); } /// public void Clear() { InternalList.Clear(); } /// public bool Contains(TemplateGroup group) { return InternalList.Contains(group); } /// public void CopyTo(TemplateGroup[] array, int index) { InternalList.CopyTo(array, index); } /// public int IndexOf(TemplateGroup group) { return InternalList.IndexOf(group); } /// public void Insert(int index, TemplateGroup group) { InternalList.Insert(index, group); } /// public void Remove(TemplateGroup group) { InternalList.Remove(group); } /// public void RemoveAt(int index) { InternalList.RemoveAt(index); } #region IList implementation /// /// int ICollection.Count { get { return Count; } } /// /// bool IList.IsFixedSize { get { return InternalList.IsFixedSize; } } /// /// bool IList.IsReadOnly { get { return InternalList.IsReadOnly; } } /// /// bool ICollection.IsSynchronized { get { return InternalList.IsSynchronized; } } /// /// object ICollection.SyncRoot { get { return InternalList.SyncRoot; } } /// /// object IList.this[int index] { get { return this[index]; } set { if (!(value is TemplateGroup)) { throw new ArgumentException(String.Format(CultureInfo.InvariantCulture, SR.GetString(SR.WrongType), "TemplateGroup"), "value"); } this[index] = (TemplateGroup)value; } } /// /// int IList.Add(object o) { if (!(o is TemplateGroup)) { throw new ArgumentException(String.Format(CultureInfo.InvariantCulture, SR.GetString(SR.WrongType), "TemplateGroup"), "o"); } return Add((TemplateGroup)o); } /// /// void IList.Clear() { Clear(); } /// /// bool IList.Contains(object o) { if (!(o is TemplateGroup)) { throw new ArgumentException(String.Format(CultureInfo.InvariantCulture, SR.GetString(SR.WrongType), "TemplateGroup"), "o"); } return Contains((TemplateGroup)o); } /// /// void ICollection.CopyTo(Array array, int index) { InternalList.CopyTo(array, index); } /// /// IEnumerator IEnumerable.GetEnumerator() { return InternalList.GetEnumerator(); } /// /// int IList.IndexOf(object o) { if (!(o is TemplateGroup)) { throw new ArgumentException(String.Format(CultureInfo.InvariantCulture, SR.GetString(SR.WrongType), "TemplateGroup"), "o"); } return IndexOf((TemplateGroup)o); } /// /// void IList.Insert(int index, object o) { if (!(o is TemplateGroup)) { throw new ArgumentException(String.Format(CultureInfo.InvariantCulture, SR.GetString(SR.WrongType), "TemplateGroup"), "o"); } Insert(index, (TemplateGroup)o); } /// /// void IList.Remove(object o) { if (!(o is TemplateGroup)) { throw new ArgumentException(String.Format(CultureInfo.InvariantCulture, SR.GetString(SR.WrongType), "TemplateGroup"), "o"); } Remove((TemplateGroup)o); } /// /// void IList.RemoveAt(int index) { RemoveAt(index); } #endregion } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SetStoryboardSpeedRatio.cs
- PageTheme.cs
- DynamicValueConverter.cs
- AccessViolationException.cs
- LogFlushAsyncResult.cs
- ExternalException.cs
- TextBoxBase.cs
- EmptyCollection.cs
- LassoSelectionBehavior.cs
- RouteData.cs
- NativeMethods.cs
- PnrpPeerResolverBindingElement.cs
- WaitHandleCannotBeOpenedException.cs
- TreeViewCancelEvent.cs
- ComponentResourceKey.cs
- ModelItemDictionary.cs
- ConfigurationConverterBase.cs
- DBNull.cs
- ListSortDescription.cs
- BrowserCapabilitiesCompiler.cs
- DataGridViewLinkCell.cs
- ProxyAttribute.cs
- UnsafeNativeMethodsMilCoreApi.cs
- XmlSchemaFacet.cs
- ToolTip.cs
- NavigationPropertyEmitter.cs
- InputProcessorProfiles.cs
- HtmlInputSubmit.cs
- Stylus.cs
- LZCodec.cs
- DataGridCellEditEndingEventArgs.cs
- MobileCategoryAttribute.cs
- DllHostedComPlusServiceHost.cs
- Ref.cs
- AssemblyCache.cs
- Int32Rect.cs
- EnumerableRowCollection.cs
- TrustManagerPromptUI.cs
- PaperSource.cs
- DSASignatureFormatter.cs
- Typography.cs
- ZipFileInfoCollection.cs
- ListViewContainer.cs
- DbConnectionPoolGroup.cs
- SizeKeyFrameCollection.cs
- RecognizerStateChangedEventArgs.cs
- GlyphRunDrawing.cs
- _SingleItemRequestCache.cs
- TraceListener.cs
- HttpClientChannel.cs
- Crc32.cs
- PointAnimationUsingKeyFrames.cs
- FormViewDeleteEventArgs.cs
- FontInfo.cs
- CultureInfo.cs
- HttpApplication.cs
- InputLangChangeRequestEvent.cs
- MethodRental.cs
- ChangePassword.cs
- PersonalizationStateQuery.cs
- PersistNameAttribute.cs
- SafeArrayTypeMismatchException.cs
- XmlUtil.cs
- ClientViaElement.cs
- ListViewSortEventArgs.cs
- UrlAuthorizationModule.cs
- PersonalizationStateQuery.cs
- WebReferencesBuildProvider.cs
- PreservationFileWriter.cs
- SecurityImpersonationBehavior.cs
- ControlBuilder.cs
- DbProviderFactory.cs
- ISAPIWorkerRequest.cs
- DATA_BLOB.cs
- SchemaConstraints.cs
- XmlNodeList.cs
- WorkflowMessageEventHandler.cs
- ObjectSerializerFactory.cs
- safesecurityhelperavalon.cs
- DispatchWrapper.cs
- DbMetaDataFactory.cs
- TextCharacters.cs
- SamlSecurityTokenAuthenticator.cs
- DesignerSerializationOptionsAttribute.cs
- InfoCardTrace.cs
- TransportBindingElement.cs
- XhtmlCssHandler.cs
- VersionConverter.cs
- Polyline.cs
- Selection.cs
- DocumentReferenceCollection.cs
- CodeMemberProperty.cs
- Compress.cs
- DesignBindingPicker.cs
- DecimalConverter.cs
- TextServicesDisplayAttributePropertyRanges.cs
- ServiceDescriptionReflector.cs
- SimpleRecyclingCache.cs
- FlowLayoutSettings.cs
- IndexingContentUnit.cs