Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Extensions / UI / UpdatePanelTriggerCollection.cs / 1305376 / UpdatePanelTriggerCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System; using System.Collections.ObjectModel; using System.Diagnostics.CodeAnalysis; using System.Web; public class UpdatePanelTriggerCollection : Collection{ private bool _initialized; private UpdatePanel _owner; public UpdatePanelTriggerCollection(UpdatePanel owner) { if (owner == null) { throw new ArgumentNullException("owner"); } _owner = owner; } public UpdatePanel Owner { get { return _owner; } } [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")] protected override void ClearItems() { foreach (UpdatePanelTrigger trigger in this) { trigger.SetOwner(null); } base.ClearItems(); } internal bool HasTriggered() { foreach (UpdatePanelTrigger trigger in this) { if (trigger.HasTriggered()) { return true; } } return false; } internal void Initialize() { foreach (UpdatePanelTrigger trigger in this) { trigger.Initialize(); } _initialized = true; } [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")] protected override void InsertItem(int index, UpdatePanelTrigger item) { item.SetOwner(Owner); if (_initialized) { item.Initialize(); } base.InsertItem(index, item); } [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")] protected override void RemoveItem(int index) { this[index].SetOwner(null); base.RemoveItem(index); } [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")] protected override void SetItem(int index, UpdatePanelTrigger item) { this[index].SetOwner(null); item.SetOwner(Owner); if (_initialized) { item.Initialize(); } base.SetItem(index, item); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System; using System.Collections.ObjectModel; using System.Diagnostics.CodeAnalysis; using System.Web; public class UpdatePanelTriggerCollection : Collection{ private bool _initialized; private UpdatePanel _owner; public UpdatePanelTriggerCollection(UpdatePanel owner) { if (owner == null) { throw new ArgumentNullException("owner"); } _owner = owner; } public UpdatePanel Owner { get { return _owner; } } [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")] protected override void ClearItems() { foreach (UpdatePanelTrigger trigger in this) { trigger.SetOwner(null); } base.ClearItems(); } internal bool HasTriggered() { foreach (UpdatePanelTrigger trigger in this) { if (trigger.HasTriggered()) { return true; } } return false; } internal void Initialize() { foreach (UpdatePanelTrigger trigger in this) { trigger.Initialize(); } _initialized = true; } [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")] protected override void InsertItem(int index, UpdatePanelTrigger item) { item.SetOwner(Owner); if (_initialized) { item.Initialize(); } base.InsertItem(index, item); } [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")] protected override void RemoveItem(int index) { this[index].SetOwner(null); base.RemoveItem(index); } [SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")] protected override void SetItem(int index, UpdatePanelTrigger item) { this[index].SetOwner(null); item.SetOwner(Owner); if (_initialized) { item.Initialize(); } base.SetItem(index, item); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WebProxyScriptElement.cs
- ListMarkerSourceInfo.cs
- ToolStripProgressBar.cs
- BulletChrome.cs
- CellTreeNodeVisitors.cs
- VectorAnimationBase.cs
- CrossAppDomainChannel.cs
- OptimisticConcurrencyException.cs
- ErrorHandler.cs
- RefExpr.cs
- PeerIPHelper.cs
- ModelTreeEnumerator.cs
- ContentOperations.cs
- UndoManager.cs
- ConnectionManagementElement.cs
- PersonalizationAdministration.cs
- GACMembershipCondition.cs
- autovalidator.cs
- XmlHelper.cs
- LineGeometry.cs
- ApplicationHost.cs
- XmlSchemaDocumentation.cs
- ListItem.cs
- DrawingState.cs
- InstanceCreationEditor.cs
- ColorPalette.cs
- ClientConfigurationHost.cs
- AssemblyInfo.cs
- BookmarkNameHelper.cs
- EntityException.cs
- WmlMobileTextWriter.cs
- ZipPackage.cs
- SqlRowUpdatingEvent.cs
- IndividualDeviceConfig.cs
- Triangle.cs
- Visual3DCollection.cs
- WebPageTraceListener.cs
- WindowsGraphics.cs
- ReturnValue.cs
- SafeArrayTypeMismatchException.cs
- FixUpCollection.cs
- InfoCardCryptoHelper.cs
- ObjectDataSourceEventArgs.cs
- MultiSelectRootGridEntry.cs
- CryptographicAttribute.cs
- DocumentScope.cs
- ObjectConverter.cs
- AnnotationObservableCollection.cs
- SplitterEvent.cs
- BindingContext.cs
- DynamicControlParameter.cs
- AsyncContentLoadedEventArgs.cs
- HttpPostProtocolReflector.cs
- SvcMapFileLoader.cs
- ParamArrayAttribute.cs
- SchemaInfo.cs
- ResourceReader.cs
- SoapAttributeAttribute.cs
- SerialStream.cs
- XmlConvert.cs
- WebReferencesBuildProvider.cs
- HttpServerChannel.cs
- StatusBarItemAutomationPeer.cs
- MetabaseReader.cs
- CodeMemberEvent.cs
- TextStore.cs
- DataGridViewSortCompareEventArgs.cs
- TextParagraph.cs
- File.cs
- EntitySqlQueryCacheKey.cs
- VisualStateChangedEventArgs.cs
- DetailsViewInsertEventArgs.cs
- Classification.cs
- FileReader.cs
- ThousandthOfEmRealPoints.cs
- IteratorFilter.cs
- XamlPathDataSerializer.cs
- DatePickerAutomationPeer.cs
- DataGridViewCellStyle.cs
- documentation.cs
- EventLogSession.cs
- LogWriteRestartAreaState.cs
- BinaryMessageEncodingElement.cs
- BitArray.cs
- ConfigXmlSignificantWhitespace.cs
- TranslateTransform.cs
- ParameterElement.cs
- RegexWorker.cs
- InputScopeNameConverter.cs
- NonParentingControl.cs
- RequestCacheValidator.cs
- HtmlGenericControl.cs
- TextSelectionHighlightLayer.cs
- TypeGeneratedEventArgs.cs
- ErrorWrapper.cs
- Html32TextWriter.cs
- IDReferencePropertyAttribute.cs
- MasterPageBuildProvider.cs
- Viewport2DVisual3D.cs
- LambdaCompiler.ControlFlow.cs