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
- XmlDataLoader.cs
- XpsStructure.cs
- Buffer.cs
- Pkcs7Signer.cs
- HttpCookiesSection.cs
- GcHandle.cs
- GridLengthConverter.cs
- JpegBitmapEncoder.cs
- VisualStyleRenderer.cs
- SQLBinaryStorage.cs
- hresults.cs
- TcpClientChannel.cs
- OleDbMetaDataFactory.cs
- PEFileReader.cs
- DesignerVerbCollection.cs
- LocalizabilityAttribute.cs
- ResourceExpressionEditor.cs
- Baml2006SchemaContext.cs
- OracleNumber.cs
- AutoResetEvent.cs
- storepermission.cs
- NavigationWindowAutomationPeer.cs
- Process.cs
- IdentitySection.cs
- XmlSchemaObjectTable.cs
- WmpBitmapEncoder.cs
- VisualTreeUtils.cs
- TraceSection.cs
- AutoResizedEvent.cs
- OleDbCommand.cs
- DispatchChannelSink.cs
- DataGridViewCell.cs
- PropertyGridEditorPart.cs
- XMLDiffLoader.cs
- TouchEventArgs.cs
- XsdDuration.cs
- AsyncResult.cs
- LinqDataSourceView.cs
- PixelShader.cs
- TransactionsSectionGroup.cs
- CompilerTypeWithParams.cs
- GridViewSelectEventArgs.cs
- path.cs
- DataGridPagerStyle.cs
- ServiceOperationParameter.cs
- TreeViewImageKeyConverter.cs
- WebResourceAttribute.cs
- NotifyCollectionChangedEventArgs.cs
- WpfKnownMemberInvoker.cs
- SystemIcmpV4Statistics.cs
- InvokeCompletedEventArgs.cs
- BufferedGraphicsManager.cs
- MultiPropertyDescriptorGridEntry.cs
- MergeLocalizationDirectives.cs
- ConfigViewGenerator.cs
- XmlDataDocument.cs
- ClockController.cs
- XmlArrayItemAttribute.cs
- BoolExpr.cs
- UInt64Converter.cs
- RunWorkerCompletedEventArgs.cs
- URLIdentityPermission.cs
- DesignerSerializerAttribute.cs
- ThreadPool.cs
- ScriptControl.cs
- ParameterModifier.cs
- OleDbConnectionInternal.cs
- IntPtr.cs
- FontSourceCollection.cs
- AssociativeAggregationOperator.cs
- NoResizeSelectionBorderGlyph.cs
- ComAwareEventInfo.cs
- ItemCollectionEditor.cs
- DrawingBrush.cs
- HostingEnvironmentSection.cs
- ArraySortHelper.cs
- TextInfo.cs
- FatalException.cs
- ArrayHelper.cs
- OracleBinary.cs
- NamedPermissionSet.cs
- SourceSwitch.cs
- LocatorBase.cs
- EntityDataSourceColumn.cs
- lengthconverter.cs
- JobCollate.cs
- TableCell.cs
- TextRangeEditLists.cs
- CallbackCorrelationInitializer.cs
- PrincipalPermission.cs
- FormViewActionList.cs
- OracleConnection.cs
- ReferencedCollectionType.cs
- JavascriptCallbackResponseProperty.cs
- EventHandlersDesigner.cs
- ObjectDataProvider.cs
- Exceptions.cs
- CacheSection.cs
- SequenceDesigner.cs
- Point3DConverter.cs