Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / CompMod / System / CodeDOM / CodeTypeReferenceCollection.cs / 1 / CodeTypeReferenceCollection.cs
// ------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// -----------------------------------------------------------------------------
//
namespace System.CodeDom {
using System;
using System.Collections;
using System.Runtime.InteropServices;
///
///
/// A collection that stores objects.
///
///
[
ClassInterface(ClassInterfaceType.AutoDispatch),
ComVisible(true),
Serializable,
]
public class CodeTypeReferenceCollection : CollectionBase {
///
///
/// Initializes a new instance of .
///
///
public CodeTypeReferenceCollection() {
}
///
///
/// Initializes a new instance of based on another .
///
///
public CodeTypeReferenceCollection(CodeTypeReferenceCollection value) {
this.AddRange(value);
}
///
///
/// Initializes a new instance of containing any array of objects.
///
///
public CodeTypeReferenceCollection(CodeTypeReference[] value) {
this.AddRange(value);
}
///
/// Represents the entry at the specified index of the .
///
public CodeTypeReference this[int index] {
get {
return ((CodeTypeReference)(List[index]));
}
set {
List[index] = value;
}
}
///
/// Adds a with the specified value to the
/// .
///
public int Add(CodeTypeReference value) {
return List.Add(value);
}
///
/// [To be supplied.]
///
public void Add(string value) {
Add(new CodeTypeReference(value));
}
///
/// [To be supplied.]
///
public void Add(Type value) {
Add(new CodeTypeReference(value));
}
///
/// Copies the elements of an array to the end of the .
///
public void AddRange(CodeTypeReference[] value) {
if (value == null) {
throw new ArgumentNullException("value");
}
for (int i = 0; ((i) < (value.Length)); i = ((i) + (1))) {
this.Add(value[i]);
}
}
///
///
/// Adds the contents of another to the end of the collection.
///
///
public void AddRange(CodeTypeReferenceCollection value) {
if (value == null) {
throw new ArgumentNullException("value");
}
int currentCount = value.Count;
for (int i = 0; i < currentCount; i = ((i) + (1))) {
this.Add(value[i]);
}
}
///
/// Gets a value indicating whether the
/// contains the specified .
///
public bool Contains(CodeTypeReference value) {
return List.Contains(value);
}
///
/// Copies the values to a one-dimensional instance at the
/// specified index.
///
public void CopyTo(CodeTypeReference[] array, int index) {
List.CopyTo(array, index);
}
///
/// Returns the index of a in
/// the .
///
public int IndexOf(CodeTypeReference value) {
return List.IndexOf(value);
}
///
/// Inserts a into the at the specified index.
///
public void Insert(int index, CodeTypeReference value) {
List.Insert(index, value);
}
///
/// Removes a specific from the
/// .
///
public void Remove(CodeTypeReference value) {
List.Remove(value);
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// ------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// -----------------------------------------------------------------------------
//
namespace System.CodeDom {
using System;
using System.Collections;
using System.Runtime.InteropServices;
///
///
/// A collection that stores objects.
///
///
[
ClassInterface(ClassInterfaceType.AutoDispatch),
ComVisible(true),
Serializable,
]
public class CodeTypeReferenceCollection : CollectionBase {
///
///
/// Initializes a new instance of .
///
///
public CodeTypeReferenceCollection() {
}
///
///
/// Initializes a new instance of based on another .
///
///
public CodeTypeReferenceCollection(CodeTypeReferenceCollection value) {
this.AddRange(value);
}
///
///
/// Initializes a new instance of containing any array of objects.
///
///
public CodeTypeReferenceCollection(CodeTypeReference[] value) {
this.AddRange(value);
}
///
/// Represents the entry at the specified index of the .
///
public CodeTypeReference this[int index] {
get {
return ((CodeTypeReference)(List[index]));
}
set {
List[index] = value;
}
}
///
/// Adds a with the specified value to the
/// .
///
public int Add(CodeTypeReference value) {
return List.Add(value);
}
///
/// [To be supplied.]
///
public void Add(string value) {
Add(new CodeTypeReference(value));
}
///
/// [To be supplied.]
///
public void Add(Type value) {
Add(new CodeTypeReference(value));
}
///
/// Copies the elements of an array to the end of the .
///
public void AddRange(CodeTypeReference[] value) {
if (value == null) {
throw new ArgumentNullException("value");
}
for (int i = 0; ((i) < (value.Length)); i = ((i) + (1))) {
this.Add(value[i]);
}
}
///
///
/// Adds the contents of another to the end of the collection.
///
///
public void AddRange(CodeTypeReferenceCollection value) {
if (value == null) {
throw new ArgumentNullException("value");
}
int currentCount = value.Count;
for (int i = 0; i < currentCount; i = ((i) + (1))) {
this.Add(value[i]);
}
}
///
/// Gets a value indicating whether the
/// contains the specified .
///
public bool Contains(CodeTypeReference value) {
return List.Contains(value);
}
///
/// Copies the values to a one-dimensional instance at the
/// specified index.
///
public void CopyTo(CodeTypeReference[] array, int index) {
List.CopyTo(array, index);
}
///
/// Returns the index of a in
/// the .
///
public int IndexOf(CodeTypeReference value) {
return List.IndexOf(value);
}
///
/// Inserts a into the at the specified index.
///
public void Insert(int index, CodeTypeReference value) {
List.Insert(index, value);
}
///
/// Removes a specific from the
/// .
///
public void Remove(CodeTypeReference value) {
List.Remove(value);
}
}
}
// 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
- ExpressionEditorAttribute.cs
- CompressionTransform.cs
- ValidationPropertyAttribute.cs
- WebHostUnsafeNativeMethods.cs
- AuthenticationSection.cs
- AutomationPatternInfo.cs
- PolyQuadraticBezierSegment.cs
- TextPattern.cs
- WeakKeyDictionary.cs
- RowParagraph.cs
- PatternMatcher.cs
- CustomCategoryAttribute.cs
- EtwTrace.cs
- XmlElement.cs
- TextElementCollection.cs
- FixedFlowMap.cs
- PointUtil.cs
- ResizeGrip.cs
- WebPartExportVerb.cs
- PageEventArgs.cs
- XmlSchemaGroupRef.cs
- ParseElementCollection.cs
- _ListenerResponseStream.cs
- ConstraintStruct.cs
- ListBox.cs
- PKCS1MaskGenerationMethod.cs
- WindowsSecurityToken.cs
- ListViewCancelEventArgs.cs
- DataTransferEventArgs.cs
- TextPointerBase.cs
- ValuePattern.cs
- ReceiveCompletedEventArgs.cs
- FloaterParagraph.cs
- KeyValuePair.cs
- DesignerAutoFormat.cs
- ScalarConstant.cs
- OutgoingWebRequestContext.cs
- RoutedUICommand.cs
- SqlNodeAnnotations.cs
- DataGridViewCellStyleConverter.cs
- cookie.cs
- ToolStripScrollButton.cs
- XmlDataImplementation.cs
- FileAuthorizationModule.cs
- TextBoxAutomationPeer.cs
- StylusPoint.cs
- CryptoApi.cs
- DbConnectionPoolGroup.cs
- XmlReturnReader.cs
- FileDialog.cs
- UTF32Encoding.cs
- DoWorkEventArgs.cs
- ECDiffieHellmanCngPublicKey.cs
- HostedTransportConfigurationBase.cs
- ConfigurationManagerHelperFactory.cs
- BrowserCapabilitiesFactory35.cs
- BrushMappingModeValidation.cs
- DnsCache.cs
- DrawingVisualDrawingContext.cs
- OperationParameterInfo.cs
- ContainerUtilities.cs
- DesignerTransaction.cs
- StringHandle.cs
- activationcontext.cs
- ResourceReferenceExpression.cs
- GridViewUpdateEventArgs.cs
- DataGridViewRowHeaderCell.cs
- CurrencyWrapper.cs
- QueryPrefixOp.cs
- Transactions.cs
- HttpException.cs
- XmlUtil.cs
- Transaction.cs
- _ContextAwareResult.cs
- InfoCardSymmetricAlgorithm.cs
- _FtpDataStream.cs
- InkCanvasSelectionAdorner.cs
- DataServiceContext.cs
- EventToken.cs
- DateTimeOffsetAdapter.cs
- InputProcessorProfiles.cs
- ContainerControl.cs
- _ShellExpression.cs
- TransformDescriptor.cs
- ProxyWebPart.cs
- ImmComposition.cs
- IdentifierElement.cs
- BitmapEffectInputData.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- SqlDependency.cs
- CustomCategoryAttribute.cs
- VirtualizingPanel.cs
- Sorting.cs
- HwndProxyElementProvider.cs
- QuadraticBezierSegment.cs
- Itemizer.cs
- RegexBoyerMoore.cs
- PageAsyncTask.cs
- ToolStripMenuItem.cs
- RelationshipEntry.cs