Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx35 / System.WorkflowServices / System / Workflow / Activities / OperationParameterInfoCollection.cs / 1305376 / OperationParameterInfoCollection.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.Workflow.Activities { using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel.Design.Serialization; using System.Diagnostics.CodeAnalysis; using System.ServiceModel; using System.Workflow.ComponentModel.Serialization; [Serializable] [DesignerSerializer(typeof(CollectionMarkupSerializer), typeof(WorkflowMarkupSerializer))] public sealed class OperationParameterInfoCollection : List, IList , IList { [SuppressMessage("Microsoft.Usage", "CA2235:MarkAllNonSerializableFields")] OperationInfoBase owner = null; public OperationParameterInfoCollection() { } public OperationParameterInfoCollection(OperationInfoBase owner) { if (owner == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("owner"); } this.owner = owner; } public new int Count { get { return ((ICollection ) this).Count; } } int ICollection .Count { get { return base.Count; } } bool ICollection .IsReadOnly { get { return false; } } bool ICollection.IsSynchronized { get { return false; } } object ICollection.SyncRoot { get { return this; } } bool IList.IsFixedSize { get { return false; } } bool IList.IsReadOnly { get { return ((IList ) this).IsReadOnly; } } public new OperationParameterInfo this[int index] { get { return ((IList ) this)[index]; } set { ((IList ) this)[index] = value; } } public OperationParameterInfo this[string key] { get { if (key == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("key"); } for (int index = 0; index < this.Count; index++) { if (string.Equals(this[index].Name, key, StringComparison.Ordinal)) { return this[index]; } } return null; } } OperationParameterInfo IList .this[int index] { get { return base[index]; } set { if (value == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("item"); } base[index] = value; } } object IList.this[int index] { get { return ((IList ) this)[index]; } set { if (!(value is OperationParameterInfo)) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument( "value", SR2.GetString(SR2.Error_InvalidListItem, typeof(OperationParameterInfo).FullName)); } ((IList ) this)[index] = (OperationParameterInfo) value; } } public new void Add(OperationParameterInfo item) { ((IList ) this).Add(item); } public new void Clear() { ((IList ) this).Clear(); } public new bool Contains(OperationParameterInfo item) { return ((IList ) this).Contains(item); } public new IEnumerator GetEnumerator() { return ((IList ) this).GetEnumerator(); } void ICollection .Add(OperationParameterInfo item) { if (item == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("item"); } base.Add(item); } void ICollection .Clear() { base.Clear(); } bool ICollection .Contains(OperationParameterInfo item) { return base.Contains(item); } void ICollection .CopyTo(OperationParameterInfo[] array, int arrayIndex) { base.CopyTo(array, arrayIndex); } void ICollection.CopyTo(Array array, int index) { if (array == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("array"); } for (int loop = 0; loop < this.Count; loop++) { array.SetValue(this[loop], loop + index); } } bool ICollection .Remove(OperationParameterInfo item) { if (!base.Contains(item)) { return false; } int index = base.IndexOf(item); if (index >= 0) { base.Remove(item); return true; } return false; } IEnumerator IEnumerable .GetEnumerator() { return base.GetEnumerator(); } IEnumerator IEnumerable.GetEnumerator() { return (IEnumerator)((IList ) this).GetEnumerator(); } int IList.Add(object value) { if (!(value is OperationParameterInfo)) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument( "value", SR2.GetString(SR2.Error_InvalidListItem, typeof(OperationParameterInfo).FullName)); } ((IList ) this).Add((OperationParameterInfo) value); return this.Count - 1; } void IList.Clear() { ((IList ) this).Clear(); } bool IList.Contains(object value) { if (!(value is OperationParameterInfo)) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument( "value", SR2.GetString(SR2.Error_InvalidListItem, typeof(OperationParameterInfo).FullName)); } return (((IList ) this).Contains((OperationParameterInfo) value)); } int IList .IndexOf(OperationParameterInfo item) { return base.IndexOf(item); } int IList.IndexOf(object value) { if (!(value is OperationParameterInfo)) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument( "value", SR2.GetString(SR2.Error_InvalidListItem, typeof(OperationParameterInfo).FullName)); } return ((IList ) this).IndexOf((OperationParameterInfo) value); } void IList .Insert(int index, OperationParameterInfo item) { if (index < 0 || index > base.Count) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("index")); } if (item == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("item"); } base.Insert(index, item); } void IList.Insert(int index, object value) { if (!(value is OperationParameterInfo)) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument( "value", SR2.GetString(SR2.Error_InvalidListItem, typeof(OperationParameterInfo).FullName)); } ((IList ) this).Insert(index, (OperationParameterInfo) value); } void IList.Remove(object value) { if (!(value is OperationParameterInfo)) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument( "value", SR2.GetString(SR2.Error_InvalidListItem, typeof(OperationParameterInfo).FullName)); } ((IList ) this).Remove((OperationParameterInfo) value); } void IList .RemoveAt(int index) { if (index < 0 || index >= base.Count) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("index")); } base.RemoveAt(index); } public new int IndexOf(OperationParameterInfo item) { return ((IList ) this).IndexOf(item); } public new void Insert(int index, OperationParameterInfo item) { ((IList ) this).Insert(index, item); } public new bool Remove(OperationParameterInfo item) { return ((IList ) this).Remove(item); } public new void RemoveAt(int index) { ((IList ) this).RemoveAt(index); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- EmbeddedMailObjectsCollection.cs
- TableDesigner.cs
- AutomationPropertyInfo.cs
- SiteOfOriginPart.cs
- X509ScopedServiceCertificateElementCollection.cs
- KnownTypeDataContractResolver.cs
- SynchronizationContext.cs
- CodeMemberEvent.cs
- CodeCastExpression.cs
- Polygon.cs
- DataPagerField.cs
- PenThreadPool.cs
- SecurityUtils.cs
- ChannelAcceptor.cs
- CodePageEncoding.cs
- GlobalItem.cs
- TextRangeEdit.cs
- LassoHelper.cs
- ScriptControlDescriptor.cs
- Focus.cs
- CallbackHandler.cs
- DesigntimeLicenseContext.cs
- Stylus.cs
- MethodToken.cs
- SQLBytesStorage.cs
- SqlDataReaderSmi.cs
- PropertyRecord.cs
- SqlUDTStorage.cs
- FileReader.cs
- GridViewColumnHeaderAutomationPeer.cs
- SystemBrushes.cs
- JpegBitmapDecoder.cs
- NodeFunctions.cs
- LassoSelectionBehavior.cs
- ApplicationException.cs
- MonthCalendarDesigner.cs
- CharAnimationBase.cs
- SqlCommandBuilder.cs
- SystemWebCachingSectionGroup.cs
- DiagnosticEventProvider.cs
- InstanceDescriptor.cs
- EpmAttributeNameBuilder.cs
- XmlDeclaration.cs
- HttpCacheVary.cs
- XMLDiffLoader.cs
- Win32NamedPipes.cs
- CommandLibraryHelper.cs
- HttpServerVarsCollection.cs
- ZipIOExtraField.cs
- OrderedDictionary.cs
- ServiceBuildProvider.cs
- RuleProcessor.cs
- GreaterThanOrEqual.cs
- SqlProcedureAttribute.cs
- PopOutPanel.cs
- WebConfigurationManager.cs
- PropertyEmitterBase.cs
- HostedBindingBehavior.cs
- UnionQueryOperator.cs
- ExceptionUtil.cs
- ClusterSafeNativeMethods.cs
- BitArray.cs
- DataSourceXmlTextReader.cs
- DesignerCategoryAttribute.cs
- Int32CAMarshaler.cs
- MULTI_QI.cs
- ListView.cs
- DataGridViewCellConverter.cs
- ResourcesBuildProvider.cs
- URL.cs
- TypeSystem.cs
- SiteMapDesignerDataSourceView.cs
- TreeWalkHelper.cs
- DescendantQuery.cs
- WebPartConnectionsConnectVerb.cs
- GeneralTransform3D.cs
- CachedCompositeFamily.cs
- SimpleType.cs
- AutomationPeer.cs
- FormViewDeletedEventArgs.cs
- CodeDelegateCreateExpression.cs
- ISAPIApplicationHost.cs
- GroupItem.cs
- AmbientValueAttribute.cs
- DeploymentSectionCache.cs
- EmptyImpersonationContext.cs
- DataGridViewRowsAddedEventArgs.cs
- StateChangeEvent.cs
- DataObjectEventArgs.cs
- ColorConverter.cs
- CharacterMetrics.cs
- PictureBox.cs
- AliasedSlot.cs
- DataMisalignedException.cs
- InfoCardX509Validator.cs
- SymbolEqualComparer.cs
- DocumentManager.cs
- InfocardInteractiveChannelInitializer.cs
- ResourceCategoryAttribute.cs
- SchemaImporterExtensionsSection.cs