Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / DynamicData / DynamicData / DataControlReferenceCollection.cs / 1305376 / DataControlReferenceCollection.cs
namespace System.Web.DynamicData {
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Security.Permissions;
///
/// Represents a collectin of DataControlReferences
///
public class DataControlReferenceCollection : Collection {
public DataControlReferenceCollection(DynamicDataManager owner) {
if (owner == null) {
throw new ArgumentNullException("owner");
}
Owner = owner;
}
public DynamicDataManager Owner {
get;
private set;
}
internal void Initialize() {
foreach (DataControlReference reference in this) {
reference.Owner = Owner;
}
}
[SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
protected override void SetItem(int index, DataControlReference item) {
item.Owner = Owner;
base.SetItem(index, item);
}
[SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
protected override void InsertItem(int index, DataControlReference item) {
item.Owner = Owner;
base.InsertItem(index, item);
}
[SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
protected override void RemoveItem(int index) {
this[index].Owner = null;
base.RemoveItem(index);
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
namespace System.Web.DynamicData {
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Security.Permissions;
///
/// Represents a collectin of DataControlReferences
///
public class DataControlReferenceCollection : Collection {
public DataControlReferenceCollection(DynamicDataManager owner) {
if (owner == null) {
throw new ArgumentNullException("owner");
}
Owner = owner;
}
public DynamicDataManager Owner {
get;
private set;
}
internal void Initialize() {
foreach (DataControlReference reference in this) {
reference.Owner = Owner;
}
}
[SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
protected override void SetItem(int index, DataControlReference item) {
item.Owner = Owner;
base.SetItem(index, item);
}
[SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
protected override void InsertItem(int index, DataControlReference item) {
item.Owner = Owner;
base.InsertItem(index, item);
}
[SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
protected override void RemoveItem(int index) {
this[index].Owner = null;
base.RemoveItem(index);
}
}
}
// 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
- HeaderedContentControl.cs
- CornerRadiusConverter.cs
- Publisher.cs
- TypeDescriptor.cs
- WorkflowCompensationBehavior.cs
- RequestTimeoutManager.cs
- MostlySingletonList.cs
- UpdateTranslator.cs
- RequestCachePolicyConverter.cs
- ContentAlignmentEditor.cs
- Not.cs
- StylusEditingBehavior.cs
- WindowsListViewItemStartMenu.cs
- PrintPreviewDialog.cs
- JoinTreeSlot.cs
- Calendar.cs
- Token.cs
- NameValueConfigurationElement.cs
- XmlUrlResolver.cs
- XamlToRtfParser.cs
- ServicesExceptionNotHandledEventArgs.cs
- MethodImplAttribute.cs
- Blend.cs
- FullTextBreakpoint.cs
- TiffBitmapDecoder.cs
- Content.cs
- StateInitializationDesigner.cs
- SpellerHighlightLayer.cs
- UIntPtr.cs
- VersionPair.cs
- StrongNameKeyPair.cs
- FacetDescription.cs
- DropAnimation.xaml.cs
- ClientConvert.cs
- CompositeScriptReferenceEventArgs.cs
- cookie.cs
- WebPartZoneBaseDesigner.cs
- PrintPreviewControl.cs
- KnownIds.cs
- UnderstoodHeaders.cs
- WebConfigurationManager.cs
- SpellerStatusTable.cs
- LayoutEngine.cs
- MarkupCompiler.cs
- LicenseContext.cs
- ResourceLoader.cs
- CategoryValueConverter.cs
- OleDbMetaDataFactory.cs
- RequestContextBase.cs
- HashHelper.cs
- XmlName.cs
- RuntimeHandles.cs
- SelectedDatesCollection.cs
- InfoCardTrace.cs
- EmbeddedMailObjectsCollection.cs
- BindingMAnagerBase.cs
- AdornedElementPlaceholder.cs
- CryptoHelper.cs
- codemethodreferenceexpression.cs
- SmtpException.cs
- CodeSnippetTypeMember.cs
- BitHelper.cs
- SelectionListComponentEditor.cs
- StandardBindingImporter.cs
- DataGridColumnCollection.cs
- ConfigUtil.cs
- OdbcDataAdapter.cs
- DataServiceHostFactory.cs
- SymLanguageType.cs
- DBSqlParserTable.cs
- Security.cs
- EventLogEntryCollection.cs
- SynchronizingStream.cs
- SoapHeaders.cs
- safesecurityhelperavalon.cs
- BuildDependencySet.cs
- HashCodeCombiner.cs
- RTLAwareMessageBox.cs
- PropertyTabAttribute.cs
- TextTreePropertyUndoUnit.cs
- ITextView.cs
- VersionPair.cs
- InteropBitmapSource.cs
- PolyQuadraticBezierSegment.cs
- HttpApplication.cs
- CqlParser.cs
- RefType.cs
- GeneralTransformCollection.cs
- DragDropManager.cs
- ZipIORawDataFileBlock.cs
- DetailsViewDeleteEventArgs.cs
- ResourceReferenceKeyNotFoundException.cs
- CompletionProxy.cs
- TheQuery.cs
- TemplatedMailWebEventProvider.cs
- XmlQueryContext.cs
- DataViewListener.cs
- UriSectionReader.cs
- wgx_exports.cs
- OutputCacheProfileCollection.cs