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
- WorkflowRequestContext.cs
- PrinterUnitConvert.cs
- DateTimeConstantAttribute.cs
- CfgParser.cs
- DynamicRendererThreadManager.cs
- Model3D.cs
- AppearanceEditorPart.cs
- MemberDescriptor.cs
- TextBox.cs
- LoadRetryHandler.cs
- StrongNameMembershipCondition.cs
- GiveFeedbackEvent.cs
- SyndicationLink.cs
- OrderedDictionary.cs
- webeventbuffer.cs
- ASCIIEncoding.cs
- CapabilitiesPattern.cs
- DataError.cs
- BuilderInfo.cs
- FormView.cs
- EpmSyndicationContentDeSerializer.cs
- SamlAudienceRestrictionCondition.cs
- DefaultHttpHandler.cs
- CodeNamespaceImportCollection.cs
- Misc.cs
- ScrollData.cs
- OutputCacheSection.cs
- XmlnsDefinitionAttribute.cs
- CodeBinaryOperatorExpression.cs
- DetailsViewDeleteEventArgs.cs
- LowerCaseStringConverter.cs
- DataGridViewImageCell.cs
- OutputScope.cs
- CodeChecksumPragma.cs
- SqlClientWrapperSmiStream.cs
- ApplicationProxyInternal.cs
- TextEditorCopyPaste.cs
- NetSectionGroup.cs
- GetCertificateRequest.cs
- ImageIndexEditor.cs
- DoubleLinkList.cs
- WindowsHyperlink.cs
- ClientClassGenerator.cs
- TextSearch.cs
- FunctionQuery.cs
- OleDbFactory.cs
- DataGridColumnReorderingEventArgs.cs
- StreamBodyWriter.cs
- AmbientEnvironment.cs
- DocumentPage.cs
- XPSSignatureDefinition.cs
- DesignerAdRotatorAdapter.cs
- SafeIUnknown.cs
- InfoCardService.cs
- ObjectSet.cs
- ClientSettings.cs
- EventLogEntryCollection.cs
- MetaColumn.cs
- DocumentAutomationPeer.cs
- GridItemPattern.cs
- SoundPlayerAction.cs
- ResourceBinder.cs
- SamlAuthenticationClaimResource.cs
- ValidateNames.cs
- Predicate.cs
- MeasureItemEvent.cs
- ImpersonateTokenRef.cs
- Delegate.cs
- ParentQuery.cs
- SQlBooleanStorage.cs
- MetadataCache.cs
- TiffBitmapEncoder.cs
- Int16Converter.cs
- XmlQualifiedName.cs
- ListControl.cs
- MyContact.cs
- SourceLineInfo.cs
- PanelStyle.cs
- BuildResultCache.cs
- ArithmeticException.cs
- Transform3DGroup.cs
- CodeDOMUtility.cs
- KeyFrames.cs
- LabelEditEvent.cs
- UInt64Storage.cs
- ExtendedTransformFactory.cs
- DataGridCheckBoxColumn.cs
- SchemaAttDef.cs
- RSAOAEPKeyExchangeDeformatter.cs
- InvokeAction.cs
- Tuple.cs
- EventMemberCodeDomSerializer.cs
- DataGridViewDataConnection.cs
- PageClientProxyGenerator.cs
- PersonalizationDictionary.cs
- GlyphRun.cs
- WebPartConnectionsEventArgs.cs
- PointConverter.cs
- FtpWebResponse.cs
- CommandBindingCollection.cs