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
- SecureEnvironment.cs
- WindowsFormsLinkLabel.cs
- GridViewRowCollection.cs
- _FixedSizeReader.cs
- EntityDataSourceContainerNameItem.cs
- MissingMethodException.cs
- TextServicesProperty.cs
- MachineKeySection.cs
- DocumentViewer.cs
- WebServiceReceiveDesigner.cs
- HtmlTableRow.cs
- SHA512Managed.cs
- IntPtr.cs
- SeverityFilter.cs
- WebPartUserCapability.cs
- MsmqHostedTransportManager.cs
- Quaternion.cs
- PerfCounters.cs
- ComponentManagerBroker.cs
- XslCompiledTransform.cs
- SiteMapHierarchicalDataSourceView.cs
- TempEnvironment.cs
- UserCancellationException.cs
- DesignerTextViewAdapter.cs
- ImageMap.cs
- Soap11ServerProtocol.cs
- Stacktrace.cs
- CrossContextChannel.cs
- XmlSchemaNotation.cs
- LinearKeyFrames.cs
- SQLSingleStorage.cs
- LogExtent.cs
- SoapMessage.cs
- ScrollableControl.cs
- Matrix3DValueSerializer.cs
- RotateTransform3D.cs
- SafeFileHandle.cs
- TdsRecordBufferSetter.cs
- XmlBinaryWriter.cs
- Size.cs
- HierarchicalDataBoundControl.cs
- ItemsControlAutomationPeer.cs
- ThrowHelper.cs
- CellTreeNodeVisitors.cs
- ToolStripItemRenderEventArgs.cs
- FileDialog.cs
- ImportCatalogPart.cs
- EventNotify.cs
- EncoderFallback.cs
- RSAPKCS1SignatureDeformatter.cs
- FieldAccessException.cs
- ToolboxComponentsCreatingEventArgs.cs
- FixedSOMGroup.cs
- ParentControlDesigner.cs
- DataGridViewDataErrorEventArgs.cs
- DaylightTime.cs
- ProviderUtil.cs
- Privilege.cs
- TableLayoutStyle.cs
- CodeAssignStatement.cs
- Focus.cs
- XmlMembersMapping.cs
- PictureBox.cs
- BrowserDefinitionCollection.cs
- EntityKeyElement.cs
- Group.cs
- RadioButtonList.cs
- ReaderWriterLockWrapper.cs
- DesignerWithHeader.cs
- Vector3DCollection.cs
- DoubleAnimationBase.cs
- ItemMap.cs
- XmlCodeExporter.cs
- ArcSegment.cs
- SmtpLoginAuthenticationModule.cs
- AspNetHostingPermission.cs
- ListViewCommandEventArgs.cs
- GraphicsContext.cs
- Clipboard.cs
- AbstractDataSvcMapFileLoader.cs
- RulePatternOps.cs
- TemplateBaseAction.cs
- InvalidProgramException.cs
- SafeRightsManagementSessionHandle.cs
- MemoryRecordBuffer.cs
- ConfigurationSectionGroup.cs
- SelectionPattern.cs
- HttpDictionary.cs
- QueryRewriter.cs
- _SslSessionsCache.cs
- NamespaceDecl.cs
- BufferedStream2.cs
- PropVariant.cs
- Soap.cs
- XmlSchemaAppInfo.cs
- MatcherBuilder.cs
- InstalledFontCollection.cs
- CategoryGridEntry.cs
- WebGetAttribute.cs
- ParseElement.cs