Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- WmlTextViewAdapter.cs
- RenderOptions.cs
- CfgParser.cs
- DropDownButton.cs
- SafeHandles.cs
- AstNode.cs
- AuthorizationRule.cs
- Buffer.cs
- MessageBodyDescription.cs
- LinqToSqlWrapper.cs
- XMLSyntaxException.cs
- DrawItemEvent.cs
- TypeSystem.cs
- DataGridViewHitTestInfo.cs
- TextDocumentView.cs
- FatalException.cs
- Condition.cs
- CodeAttributeArgumentCollection.cs
- ModifyActivitiesPropertyDescriptor.cs
- FixedSOMImage.cs
- DataTableReader.cs
- TargetControlTypeCache.cs
- SafeCertificateContext.cs
- BitmapEncoder.cs
- GPRECT.cs
- TableParaClient.cs
- SqlBulkCopyColumnMappingCollection.cs
- XmlWhitespace.cs
- WaitForChangedResult.cs
- DoubleStorage.cs
- DbCommandTree.cs
- DocumentViewerBaseAutomationPeer.cs
- Behavior.cs
- BrowserDefinitionCollection.cs
- AttributeQuery.cs
- DoubleAnimationClockResource.cs
- QuestionEventArgs.cs
- Number.cs
- SrgsGrammarCompiler.cs
- WebDisplayNameAttribute.cs
- HandleRef.cs
- SqlFormatter.cs
- PageContentAsyncResult.cs
- Atom10ItemFormatter.cs
- ConnectionConsumerAttribute.cs
- DefaultAssemblyResolver.cs
- BinaryNode.cs
- SafeNativeMethods.cs
- FileDialog.cs
- _SecureChannel.cs
- BuildProvidersCompiler.cs
- ResourceLoader.cs
- HostedBindingBehavior.cs
- XmlWhitespace.cs
- InputScopeManager.cs
- D3DImage.cs
- EntityKeyElement.cs
- NominalTypeEliminator.cs
- LessThan.cs
- WmlLiteralTextAdapter.cs
- Setter.cs
- EndGetFileNameFromUserRequest.cs
- ScriptManagerProxy.cs
- TimeZone.cs
- LinqDataSourceEditData.cs
- TraceSource.cs
- SqlAggregateChecker.cs
- XhtmlBasicPanelAdapter.cs
- SqlWebEventProvider.cs
- ZipIOExtraFieldElement.cs
- ObjectAnimationBase.cs
- XPathConvert.cs
- FullTextLine.cs
- WorkflowQueuingService.cs
- FormClosedEvent.cs
- Reference.cs
- PublishLicense.cs
- CallbackException.cs
- EmissiveMaterial.cs
- XmlSchemaRedefine.cs
- WindowsGraphics.cs
- Column.cs
- CompiledIdentityConstraint.cs
- ObjectToken.cs
- SQLRoleProvider.cs
- CheckableControlBaseAdapter.cs
- OracleRowUpdatedEventArgs.cs
- XmlResolver.cs
- ExpressionBuilderCollection.cs
- ListSurrogate.cs
- ConfigurationSettings.cs
- ProxyAttribute.cs
- WebBrowserEvent.cs
- ProbeDuplexAsyncResult.cs
- NumberFormatter.cs
- Activator.cs
- WebPartPersonalization.cs
- ApplicationDirectoryMembershipCondition.cs
- GeometryCollection.cs
- DataGridDesigner.cs