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
- RecognizerBase.cs
- DataTemplateKey.cs
- InkSerializer.cs
- XPathNavigatorKeyComparer.cs
- SiteMapNodeItem.cs
- OptionalMessageQuery.cs
- SchemaImporterExtensionsSection.cs
- HttpModulesSection.cs
- WaitHandle.cs
- DataGridRowDetailsEventArgs.cs
- SmiContext.cs
- StrokeNodeOperations.cs
- TreeIterator.cs
- SystemDropShadowChrome.cs
- BaseTemplateCodeDomTreeGenerator.cs
- DataServiceQueryProvider.cs
- RegexCompilationInfo.cs
- HandleCollector.cs
- DbParameterHelper.cs
- ContextToken.cs
- AstTree.cs
- NewArrayExpression.cs
- PkcsMisc.cs
- ReflectTypeDescriptionProvider.cs
- Component.cs
- VirtualPath.cs
- WmlLiteralTextAdapter.cs
- GridView.cs
- ConfigXmlWhitespace.cs
- EmptyControlCollection.cs
- CompatibleComparer.cs
- HtmlLink.cs
- ImageKeyConverter.cs
- KeyInfo.cs
- smtppermission.cs
- TokenizerHelper.cs
- COM2PropertyBuilderUITypeEditor.cs
- NamespaceEmitter.cs
- InstanceValue.cs
- ClientCredentialsElement.cs
- ListViewItem.cs
- TheQuery.cs
- ChildDocumentBlock.cs
- PackUriHelper.cs
- WebHttpSecurityModeHelper.cs
- CodeGeneratorAttribute.cs
- DataGridViewCellEventArgs.cs
- PropertyToken.cs
- IssuanceLicense.cs
- OperationCanceledException.cs
- XmlDataImplementation.cs
- SplitterCancelEvent.cs
- Button.cs
- XhtmlBasicFormAdapter.cs
- UIElementParagraph.cs
- StoryFragments.cs
- SettingsBase.cs
- RelationshipEnd.cs
- TransportListener.cs
- PropertyReferenceSerializer.cs
- SqlLiftIndependentRowExpressions.cs
- AssemblyUtil.cs
- WindowsStatusBar.cs
- StructuralComparisons.cs
- WriteableOnDemandPackagePart.cs
- Simplifier.cs
- DeclarativeCatalogPart.cs
- ServiceMetadataBehavior.cs
- AuthenticationServiceManager.cs
- TextFragmentEngine.cs
- UnmanagedMemoryStreamWrapper.cs
- Connector.cs
- NotImplementedException.cs
- KnownColorTable.cs
- SharedHttpsTransportManager.cs
- Button.cs
- DPAPIProtectedConfigurationProvider.cs
- SqlDataSourceSummaryPanel.cs
- SqlPersistenceWorkflowInstanceDescription.cs
- AutomationPeer.cs
- UserControl.cs
- ContainerActivationHelper.cs
- FunctionParameter.cs
- MenuScrollingVisibilityConverter.cs
- Timeline.cs
- SessionSwitchEventArgs.cs
- CommandHelpers.cs
- HtmlInputButton.cs
- TraceSwitch.cs
- CryptoStream.cs
- mongolianshape.cs
- ExceptionUtility.cs
- Latin1Encoding.cs
- Permission.cs
- FixedPageProcessor.cs
- ServiceBehaviorAttribute.cs
- _FtpDataStream.cs
- XmlQueryType.cs
- TracedNativeMethods.cs
- SizeConverter.cs