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
- MediaSystem.cs
- GeneralTransform.cs
- FunctionCommandText.cs
- AutoGeneratedField.cs
- AccessedThroughPropertyAttribute.cs
- LinqDataSourceStatusEventArgs.cs
- DynamicMethod.cs
- TextRunProperties.cs
- ReadOnlyDataSource.cs
- ServicePoint.cs
- ButtonStandardAdapter.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- ObjectAnimationUsingKeyFrames.cs
- HashCodeCombiner.cs
- ColorConverter.cs
- HwndHost.cs
- odbcmetadatacolumnnames.cs
- PropertyMetadata.cs
- HostExecutionContextManager.cs
- SqlMethodCallConverter.cs
- DataControlReference.cs
- ListGeneralPage.cs
- ProfileSection.cs
- ResXFileRef.cs
- EncoderNLS.cs
- httpstaticobjectscollection.cs
- WeakReference.cs
- AdRotator.cs
- ExpandSegment.cs
- Button.cs
- AssemblyBuilder.cs
- LinkedList.cs
- peersecuritysettings.cs
- XmlCharCheckingReader.cs
- StandardCommands.cs
- EmptyEnumerable.cs
- TextEffect.cs
- ForeignConstraint.cs
- ModelTreeEnumerator.cs
- ValueChangedEventManager.cs
- XPathCompileException.cs
- CompositeDispatchFormatter.cs
- WindowsListViewSubItem.cs
- DefaultPrintController.cs
- MemberAccessException.cs
- ArrayTypeMismatchException.cs
- PageHandlerFactory.cs
- ClientSettingsSection.cs
- ZipQueryOperator.cs
- RowsCopiedEventArgs.cs
- WsdlImporterElement.cs
- RegexParser.cs
- ResourcePermissionBase.cs
- XslException.cs
- SetterBase.cs
- CustomDictionarySources.cs
- DataServiceQuery.cs
- BamlRecordHelper.cs
- LayoutManager.cs
- WebReferenceOptions.cs
- CodeTypeMember.cs
- TextEncodedRawTextWriter.cs
- MemberInfoSerializationHolder.cs
- FontStretches.cs
- SharedUtils.cs
- XmlParserContext.cs
- XmlSchemaParticle.cs
- CodeComment.cs
- GeometryGroup.cs
- ItemList.cs
- SslStreamSecurityUpgradeProvider.cs
- ChannelManager.cs
- CacheVirtualItemsEvent.cs
- AllMembershipCondition.cs
- StringComparer.cs
- OverflowException.cs
- FontEmbeddingManager.cs
- LoginUtil.cs
- XmlHierarchicalEnumerable.cs
- EncodingStreamWrapper.cs
- TreeNode.cs
- WebPartCancelEventArgs.cs
- Model3DGroup.cs
- SqlServer2KCompatibilityAnnotation.cs
- SchemaImporterExtensionsSection.cs
- HttpModuleAction.cs
- PrintDialog.cs
- JsonQNameDataContract.cs
- TraceContextEventArgs.cs
- GregorianCalendar.cs
- DataGridViewAutoSizeModeEventArgs.cs
- MarkupExtensionParser.cs
- TemplateField.cs
- FixedFlowMap.cs
- TextEffectCollection.cs
- PolicyUtility.cs
- GlyphRunDrawing.cs
- FlowDocumentPaginator.cs
- CommonProperties.cs
- ExpressionParser.cs