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
- MetaModel.cs
- XmlDataSourceDesigner.cs
- SafePEFileHandle.cs
- ObjectStateFormatter.cs
- ConfigurationErrorsException.cs
- DocumentScope.cs
- _DigestClient.cs
- DomNameTable.cs
- RIPEMD160Managed.cs
- RelativeSource.cs
- DefaultHttpHandler.cs
- CompositeFontFamily.cs
- FontFamily.cs
- RequestCachingSection.cs
- ObjectSet.cs
- StringExpressionSet.cs
- OleDbParameter.cs
- cache.cs
- RelativeSource.cs
- ApplicationInfo.cs
- SafeTimerHandle.cs
- MultitargetUtil.cs
- SqlLiftIndependentRowExpressions.cs
- MinimizableAttributeTypeConverter.cs
- SchemaNotation.cs
- WorkflowItemsPresenter.cs
- TextMetrics.cs
- TimeoutTimer.cs
- SqlServer2KCompatibilityCheck.cs
- DataError.cs
- Rotation3DAnimationUsingKeyFrames.cs
- UIElementIsland.cs
- XmlDataSource.cs
- MessageHeaderT.cs
- recordstatefactory.cs
- SerializationFieldInfo.cs
- _TLSstream.cs
- ScrollableControl.cs
- PropertyDescriptorCollection.cs
- Resources.Designer.cs
- SpecialTypeDataContract.cs
- XamlBuildTaskServices.cs
- basemetadatamappingvisitor.cs
- FileSystemWatcher.cs
- CompiledQuery.cs
- JsonReader.cs
- TickBar.cs
- NavigationWindowAutomationPeer.cs
- FormatterServices.cs
- ArrayList.cs
- NullableDecimalMinMaxAggregationOperator.cs
- DependencyObject.cs
- RTLAwareMessageBox.cs
- StyleCollection.cs
- CompiledQuery.cs
- PerformanceCounters.cs
- XmlChildNodes.cs
- ToolStrip.cs
- CacheVirtualItemsEvent.cs
- XmlIgnoreAttribute.cs
- LocalBuilder.cs
- TableSectionStyle.cs
- BookmarkTable.cs
- GuidelineCollection.cs
- GestureRecognizer.cs
- ChangeToolStripParentVerb.cs
- TableProviderWrapper.cs
- EdmItemCollection.cs
- SqlUtil.cs
- MsmqEncryptionAlgorithm.cs
- ClientApiGenerator.cs
- CompilerState.cs
- XmlMemberMapping.cs
- DataRelationPropertyDescriptor.cs
- WinFormsSecurity.cs
- HTTP_SERVICE_CONFIG_URLACL_KEY.cs
- MouseBinding.cs
- ToolStripItemEventArgs.cs
- WebPartZoneCollection.cs
- MorphHelpers.cs
- CurrencyWrapper.cs
- EventDriven.cs
- ReadOnlyDictionary.cs
- PartitionedStream.cs
- PhonemeEventArgs.cs
- ValidateNames.cs
- DeviceSpecificDialogCachedState.cs
- TypeDescriptionProviderAttribute.cs
- SessionPageStateSection.cs
- DataGridViewAccessibleObject.cs
- LineGeometry.cs
- StylusPointProperties.cs
- FaultCallbackWrapper.cs
- TargetInvocationException.cs
- AssociationSet.cs
- UTF8Encoding.cs
- StrongNameUtility.cs
- TableLayout.cs
- ThemeDirectoryCompiler.cs
- FixedHighlight.cs