Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DateTimeConverter.cs
- GradientBrush.cs
- BitHelper.cs
- GlyphsSerializer.cs
- UICuesEvent.cs
- WebBrowserHelper.cs
- MetadataArtifactLoaderCompositeFile.cs
- XmlEncodedRawTextWriter.cs
- SrgsElementFactoryCompiler.cs
- UnsettableComboBox.cs
- TimeSpan.cs
- NamespaceEmitter.cs
- objectquery_tresulttype.cs
- StorageScalarPropertyMapping.cs
- EventListener.cs
- XmlCharacterData.cs
- CodeAssignStatement.cs
- TransportSecurityBindingElement.cs
- CompiledQuery.cs
- DoubleKeyFrameCollection.cs
- IDictionary.cs
- UnauthorizedAccessException.cs
- ImageMap.cs
- Update.cs
- EventManager.cs
- Trigger.cs
- ExpressionBindingCollection.cs
- ClientBuildManagerCallback.cs
- RelationshipManager.cs
- Cursor.cs
- ConfigXmlComment.cs
- WebPartExportVerb.cs
- AutomationPropertyInfo.cs
- IResourceProvider.cs
- DSASignatureDeformatter.cs
- WindowsStatic.cs
- _AutoWebProxyScriptEngine.cs
- InvokePattern.cs
- HWStack.cs
- EntryPointNotFoundException.cs
- ValueQuery.cs
- FormDocumentDesigner.cs
- MILUtilities.cs
- FixedHyperLink.cs
- ConvertTextFrag.cs
- Pool.cs
- CommonXSendMessage.cs
- HtmlInputControl.cs
- Matrix.cs
- PointIndependentAnimationStorage.cs
- XmlNavigatorStack.cs
- HostExecutionContextManager.cs
- UserValidatedEventArgs.cs
- TableLayoutPanelResizeGlyph.cs
- ProfileSettingsCollection.cs
- FormsAuthentication.cs
- SizeIndependentAnimationStorage.cs
- InputLanguageCollection.cs
- ObjectConverter.cs
- ProxyFragment.cs
- BrowserCapabilitiesCompiler.cs
- SchemaHelper.cs
- TextServicesLoader.cs
- ErrorWebPart.cs
- InvalidOperationException.cs
- OperatingSystem.cs
- QueryCursorEventArgs.cs
- DataBindingExpressionBuilder.cs
- DataControlFieldCollection.cs
- InputManager.cs
- PropertyGrid.cs
- ToolStripGrip.cs
- Int32Converter.cs
- ExtendedPropertyDescriptor.cs
- ValidationErrorInfo.cs
- DataTable.cs
- BinaryObjectInfo.cs
- UrlRoutingHandler.cs
- ImageMapEventArgs.cs
- ScriptReferenceBase.cs
- PipelineModuleStepContainer.cs
- SocketInformation.cs
- ActivityWithResultValueSerializer.cs
- LookupNode.cs
- BasePattern.cs
- SqlRecordBuffer.cs
- Gdiplus.cs
- BitVec.cs
- shaperfactoryquerycacheentry.cs
- DefaultDialogButtons.cs
- WmlControlAdapter.cs
- InputMethodStateChangeEventArgs.cs
- WebPartMinimizeVerb.cs
- NativeMethods.cs
- DesignerAttribute.cs
- _RequestLifetimeSetter.cs
- ActivitySurrogate.cs
- ServiceModelEnumValidatorAttribute.cs
- FixUp.cs
- BrowserCapabilitiesFactoryBase.cs