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
- MasterPageParser.cs
- AutoResetEvent.cs
- InvalidOleVariantTypeException.cs
- Int16.cs
- ViewGenResults.cs
- FaultPropagationQuery.cs
- Publisher.cs
- CredentialCache.cs
- AxisAngleRotation3D.cs
- RoleGroupCollection.cs
- DrawItemEvent.cs
- ExtendedPropertyCollection.cs
- ConfigurationElement.cs
- SortedList.cs
- ResourceSetExpression.cs
- DataObjectPastingEventArgs.cs
- DataTableReader.cs
- TabOrder.cs
- GPStream.cs
- WebPartEditorOkVerb.cs
- securitymgrsite.cs
- Bidi.cs
- DependencyProperty.cs
- ValuePatternIdentifiers.cs
- DbBuffer.cs
- NumberSubstitution.cs
- StylusPointProperties.cs
- DocumentPaginator.cs
- Int64Storage.cs
- AVElementHelper.cs
- XmlWriterSettings.cs
- BamlTreeMap.cs
- ErrorTolerantObjectWriter.cs
- FilterFactory.cs
- InternalCache.cs
- BaseDataBoundControl.cs
- DataRowComparer.cs
- X509Chain.cs
- IsolatedStorage.cs
- HttpServerVarsCollection.cs
- AppearanceEditorPart.cs
- DataGridBoolColumn.cs
- Color.cs
- PageCatalogPart.cs
- COM2ExtendedTypeConverter.cs
- CodeObject.cs
- XamlTreeBuilderBamlRecordWriter.cs
- ProxyAttribute.cs
- WsatAdminException.cs
- CounterCreationData.cs
- StateDesigner.TransitionInfo.cs
- XPathChildIterator.cs
- RecordBuilder.cs
- DynamicResourceExtension.cs
- CustomLineCap.cs
- AnonymousIdentificationSection.cs
- EventMemberCodeDomSerializer.cs
- StructuredCompositeActivityDesigner.cs
- StaticExtensionConverter.cs
- _Events.cs
- ListView.cs
- RegexMatchCollection.cs
- HtmlInputFile.cs
- XmlDataCollection.cs
- ContextDataSourceContextData.cs
- XmlNamespaceManager.cs
- ToolStripDropDownButton.cs
- XsdBuilder.cs
- PrePostDescendentsWalker.cs
- PowerEase.cs
- ClientProxyGenerator.cs
- QueryStringParameter.cs
- XmlCharCheckingReader.cs
- OdbcConnectionFactory.cs
- DataGridViewCellStyleContentChangedEventArgs.cs
- DataKey.cs
- BindingMAnagerBase.cs
- _RequestCacheProtocol.cs
- ImagingCache.cs
- PermissionSetEnumerator.cs
- OpenFileDialog.cs
- RegistryKey.cs
- ModuleElement.cs
- NativeMethods.cs
- ProfileService.cs
- EncodingStreamWrapper.cs
- ServiceRouteHandler.cs
- ServicePoint.cs
- EventSetter.cs
- ResourcePermissionBase.cs
- PatternMatcher.cs
- AttributeEmitter.cs
- ListItemCollection.cs
- System.Data_BID.cs
- GridEntryCollection.cs
- Panel.cs
- DataFormats.cs
- DictionaryTraceRecord.cs
- autovalidator.cs
- CompositionAdorner.cs