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
- ElementHostAutomationPeer.cs
- SelectionEditor.cs
- XAMLParseException.cs
- UriExt.cs
- IisNotInstalledException.cs
- DBDataPermissionAttribute.cs
- XmlSchemas.cs
- WSSecurityPolicy12.cs
- Cursor.cs
- DefaultBindingPropertyAttribute.cs
- DataGridViewBand.cs
- FamilyCollection.cs
- EventWaitHandle.cs
- WebPartConnectionsCancelVerb.cs
- SQLDouble.cs
- SoapSchemaImporter.cs
- ImportedNamespaceContextItem.cs
- VersionConverter.cs
- GradientStop.cs
- AutomationPropertyInfo.cs
- SmiXetterAccessMap.cs
- CommonProperties.cs
- OSFeature.cs
- formatstringdialog.cs
- FreeFormDragDropManager.cs
- Converter.cs
- Asn1IntegerConverter.cs
- LayoutTableCell.cs
- JournalNavigationScope.cs
- WebSysDefaultValueAttribute.cs
- EndpointNotFoundException.cs
- MasterPage.cs
- SystemColorTracker.cs
- Visitors.cs
- StatusBarPanelClickEvent.cs
- XmlTextAttribute.cs
- WebPartDisplayModeEventArgs.cs
- CatalogZoneBase.cs
- ProviderSettings.cs
- FlowLayoutPanel.cs
- ScriptMethodAttribute.cs
- MdImport.cs
- SqlUserDefinedAggregateAttribute.cs
- X509UI.cs
- SettingsAttributeDictionary.cs
- RSAPKCS1SignatureFormatter.cs
- Serializer.cs
- Int32RectValueSerializer.cs
- Typeface.cs
- ClientTarget.cs
- ConfigXmlWhitespace.cs
- DataGridViewRowsRemovedEventArgs.cs
- UpnEndpointIdentityExtension.cs
- SqlError.cs
- CryptoConfig.cs
- InvalidEnumArgumentException.cs
- GB18030Encoding.cs
- oledbmetadatacolumnnames.cs
- ViewManager.cs
- FileNotFoundException.cs
- PenCursorManager.cs
- AdapterUtil.cs
- Separator.cs
- WebPartDisplayModeCancelEventArgs.cs
- CreateUserWizardStep.cs
- UnsafeNativeMethods.cs
- ModifierKeysValueSerializer.cs
- ResourcesChangeInfo.cs
- HttpModulesSection.cs
- TemplateXamlTreeBuilder.cs
- SystemException.cs
- EnvelopedSignatureTransform.cs
- SqlDataSourceView.cs
- FrameworkReadOnlyPropertyMetadata.cs
- ReadOnlyKeyedCollection.cs
- AttributeQuery.cs
- CodeAttributeDeclarationCollection.cs
- SupportingTokenParameters.cs
- ZoomPercentageConverter.cs
- Panel.cs
- EncryptedKeyIdentifierClause.cs
- KnowledgeBase.cs
- SatelliteContractVersionAttribute.cs
- ThemeDictionaryExtension.cs
- HMACSHA512.cs
- PeerNameRecord.cs
- DeadCharTextComposition.cs
- ProtocolsSection.cs
- TimeSpan.cs
- DbProviderConfigurationHandler.cs
- HtmlLiteralTextAdapter.cs
- HtmlDocument.cs
- PersonalizationStateQuery.cs
- ValidationResult.cs
- XPathNodeList.cs
- AsyncCompletedEventArgs.cs
- HwndKeyboardInputProvider.cs
- RouteParametersHelper.cs
- ThemeDictionaryExtension.cs
- CachedBitmap.cs