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
- Int64Storage.cs
- XhtmlBasicLiteralTextAdapter.cs
- HScrollProperties.cs
- DrawingCollection.cs
- StringKeyFrameCollection.cs
- Keywords.cs
- PerformanceCounterManager.cs
- TraceLog.cs
- DataListItemEventArgs.cs
- DelegateBodyWriter.cs
- SqlParameterCollection.cs
- ShapeTypeface.cs
- SmtpCommands.cs
- ClassDataContract.cs
- StatusBarPanel.cs
- basevalidator.cs
- TreeViewHitTestInfo.cs
- PingReply.cs
- SpanIndex.cs
- AppSecurityManager.cs
- SelectionRangeConverter.cs
- WebBrowserUriTypeConverter.cs
- TypeDelegator.cs
- MembershipUser.cs
- DescendantBaseQuery.cs
- autovalidator.cs
- DataControlCommands.cs
- TabletCollection.cs
- ObjectSecurity.cs
- PackageDigitalSignatureManager.cs
- QilFactory.cs
- Polyline.cs
- SpeechUI.cs
- XmlUnspecifiedAttribute.cs
- RegexReplacement.cs
- UIServiceHelper.cs
- MD5HashHelper.cs
- SimpleTypeResolver.cs
- ObjectDataSourceMethodEventArgs.cs
- SoapSchemaMember.cs
- ChangesetResponse.cs
- PropertyIDSet.cs
- DataGridViewRowEventArgs.cs
- ApplicationActivator.cs
- CrossAppDomainChannel.cs
- CodeTypeDeclaration.cs
- PinProtectionHelper.cs
- TypeCacheManager.cs
- DesignerLabelAdapter.cs
- FormatterServicesNoSerializableCheck.cs
- DataGridAddNewRow.cs
- TextTreeTextBlock.cs
- ChannelManager.cs
- XPathParser.cs
- ECDiffieHellmanPublicKey.cs
- SizeAnimation.cs
- TraceContextRecord.cs
- SuppressMergeCheckAttribute.cs
- LocalIdKeyIdentifierClause.cs
- NavigateEvent.cs
- SmiGettersStream.cs
- ASCIIEncoding.cs
- ImportContext.cs
- NotificationContext.cs
- TreeNodeBindingCollection.cs
- AttachInfo.cs
- DataSourceXmlElementAttribute.cs
- infer.cs
- CheckBoxRenderer.cs
- LineUtil.cs
- RecognizedPhrase.cs
- _NegoStream.cs
- IsolationInterop.cs
- Int64Converter.cs
- CompositeDataBoundControl.cs
- CodeMemberEvent.cs
- SingleSelectRootGridEntry.cs
- InvalidateEvent.cs
- SchemaDeclBase.cs
- ReadOnlyPermissionSet.cs
- EnumValAlphaComparer.cs
- StateBag.cs
- FileSystemEventArgs.cs
- RowsCopiedEventArgs.cs
- Triplet.cs
- RbTree.cs
- TraceUtility.cs
- TraceInternal.cs
- BitmapEffect.cs
- RegularExpressionValidator.cs
- FigureParagraph.cs
- Model3DGroup.cs
- EmptyEnumerator.cs
- SystemTcpConnection.cs
- DeleteHelper.cs
- StaticSiteMapProvider.cs
- ElasticEase.cs
- Root.cs
- BamlTreeNode.cs
- ContextMenuStripGroup.cs