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
- BitmapSource.cs
- DebugView.cs
- CookieParameter.cs
- TextProperties.cs
- ContentElementCollection.cs
- ControlDesignerState.cs
- TreeWalker.cs
- DragDeltaEventArgs.cs
- TableRowsCollectionEditor.cs
- HyperLink.cs
- TimeSpanConverter.cs
- HttpNamespaceReservationInstallComponent.cs
- SecurityDocument.cs
- IApplicationTrustManager.cs
- CommandDevice.cs
- SerializerProvider.cs
- EntityDataSourceWizardForm.cs
- PackageRelationship.cs
- NTAccount.cs
- WriteableBitmap.cs
- MaskedTextProvider.cs
- TemplateColumn.cs
- XhtmlBasicLabelAdapter.cs
- GroupStyle.cs
- RSACryptoServiceProvider.cs
- CollectionViewProxy.cs
- InProcStateClientManager.cs
- Comparer.cs
- PngBitmapEncoder.cs
- JpegBitmapEncoder.cs
- ServerIdentity.cs
- EncoderParameter.cs
- GradientBrush.cs
- OleDbException.cs
- Missing.cs
- ValidationHelper.cs
- MaterializeFromAtom.cs
- PhysicalOps.cs
- ContextMenuStrip.cs
- AnchoredBlock.cs
- cryptoapiTransform.cs
- ExecutionEngineException.cs
- MouseButton.cs
- ApplicationServicesHostFactory.cs
- WebServiceBindingAttribute.cs
- ChainOfDependencies.cs
- OdbcReferenceCollection.cs
- IArgumentProvider.cs
- Int16Converter.cs
- PersonalizationStateInfo.cs
- DataTableCollection.cs
- NextPreviousPagerField.cs
- SystemBrushes.cs
- StringConcat.cs
- PopOutPanel.cs
- SqlDataSourceView.cs
- MemberNameValidator.cs
- OptimizerPatterns.cs
- LayoutTable.cs
- SqlMultiplexer.cs
- Shared.cs
- CompilerError.cs
- TemplateControlCodeDomTreeGenerator.cs
- RuntimeWrappedException.cs
- unsafenativemethodstextservices.cs
- InfoCardUIAgent.cs
- SelectionPattern.cs
- WebPartsPersonalization.cs
- LocationSectionRecord.cs
- AnnotationResourceChangedEventArgs.cs
- OpenFileDialog.cs
- MeshGeometry3D.cs
- Journal.cs
- SecurityContext.cs
- DelegateSerializationHolder.cs
- DataRow.cs
- _HelperAsyncResults.cs
- KnownColorTable.cs
- ConfigXmlCDataSection.cs
- DictionaryEntry.cs
- DbConnectionStringBuilder.cs
- Container.cs
- WindowsFormsHelpers.cs
- MessageContractImporter.cs
- Operators.cs
- StateFinalizationDesigner.cs
- fixedPageContentExtractor.cs
- SqlDataSourceView.cs
- SspiNegotiationTokenProviderState.cs
- InstancePersistenceCommand.cs
- TemplateLookupAction.cs
- EdmEntityTypeAttribute.cs
- UnionExpr.cs
- EventKeyword.cs
- TextBox.cs
- SqlDependency.cs
- ReflectionPermission.cs
- RawStylusInputCustomData.cs
- DBSqlParserColumn.cs
- ServicePoint.cs