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
- FormatControl.cs
- SessionStateSection.cs
- AppDomain.cs
- TableLayout.cs
- ValidationHelper.cs
- ICspAsymmetricAlgorithm.cs
- BitmapEffectRenderDataResource.cs
- DiscreteKeyFrames.cs
- ValidationErrorEventArgs.cs
- XmlQualifiedNameTest.cs
- messageonlyhwndwrapper.cs
- AutoResetEvent.cs
- RowUpdatedEventArgs.cs
- Metadata.cs
- ResourceExpression.cs
- RuntimeWrappedException.cs
- AsyncDataRequest.cs
- SimpleColumnProvider.cs
- WizardSideBarListControlItem.cs
- ColorPalette.cs
- SoapAttributeOverrides.cs
- ChtmlSelectionListAdapter.cs
- DiscoveryExceptionDictionary.cs
- BufferModesCollection.cs
- DynamicValueConverter.cs
- Hashtable.cs
- WSFederationHttpSecurityMode.cs
- DataGridViewRowCancelEventArgs.cs
- SBCSCodePageEncoding.cs
- ClientConvert.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- CompilerScope.Storage.cs
- HtmlInputHidden.cs
- safelink.cs
- DrawingGroupDrawingContext.cs
- FontDialog.cs
- VSWCFServiceContractGenerator.cs
- SoapElementAttribute.cs
- DiscoveryRequestHandler.cs
- OperationSelectorBehavior.cs
- SatelliteContractVersionAttribute.cs
- SiteMapNode.cs
- HostAdapter.cs
- InstanceDataCollectionCollection.cs
- GestureRecognizer.cs
- ConnectionsZone.cs
- ClientData.cs
- ListViewPagedDataSource.cs
- TargetParameterCountException.cs
- HGlobalSafeHandle.cs
- CodeBlockBuilder.cs
- _SpnDictionary.cs
- TextPenaltyModule.cs
- CodeAttributeArgumentCollection.cs
- SortAction.cs
- AudioLevelUpdatedEventArgs.cs
- UTF7Encoding.cs
- CodeTypeMember.cs
- Camera.cs
- PartialCachingAttribute.cs
- DefaultValueConverter.cs
- XPathItem.cs
- CodeDirectoryCompiler.cs
- DirectionalLight.cs
- TextParagraphCache.cs
- Missing.cs
- TemplateAction.cs
- HttpRuntime.cs
- FormsIdentity.cs
- ToolStripMenuItem.cs
- AdornedElementPlaceholder.cs
- MultiTargetingUtil.cs
- ServiceTimeoutsBehavior.cs
- XmlIncludeAttribute.cs
- ProcessExitedException.cs
- GetWinFXPath.cs
- InstanceLockedException.cs
- RequiredAttributeAttribute.cs
- VirtualPathUtility.cs
- ApplicationManager.cs
- FixedTextPointer.cs
- SortableBindingList.cs
- BamlResourceContent.cs
- GZipStream.cs
- XPathScanner.cs
- TextBox.cs
- NodeFunctions.cs
- ForAllOperator.cs
- Attachment.cs
- XmlName.cs
- RadioButtonFlatAdapter.cs
- KnownTypes.cs
- Convert.cs
- GrammarBuilderRuleRef.cs
- CombinedGeometry.cs
- DesignerTransactionCloseEvent.cs
- RoutedEvent.cs
- ReflectPropertyDescriptor.cs
- AddInSegmentDirectoryNotFoundException.cs
- DesignerLinkAdapter.cs