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
- PermissionSetEnumerator.cs
- ReaderWriterLock.cs
- GroupDescription.cs
- TaskFileService.cs
- MetadataItemSerializer.cs
- VariableDesigner.xaml.cs
- Figure.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- ActivityValidator.cs
- FormatVersion.cs
- CodeArrayCreateExpression.cs
- DurableInstanceProvider.cs
- BaseConfigurationRecord.cs
- CategoryState.cs
- ContentIterators.cs
- PlatformCulture.cs
- WebPartUtil.cs
- ByteAnimationBase.cs
- Int32CollectionValueSerializer.cs
- MDIClient.cs
- dtdvalidator.cs
- TextTabProperties.cs
- ButtonStandardAdapter.cs
- bidPrivateBase.cs
- Formatter.cs
- EntityConnection.cs
- WebPartDisplayModeEventArgs.cs
- PermissionListSet.cs
- ContextQuery.cs
- ExternalFile.cs
- DataGridViewTextBoxColumn.cs
- DataIdProcessor.cs
- IPeerNeighbor.cs
- BuildProvider.cs
- TextSearch.cs
- BreakRecordTable.cs
- tibetanshape.cs
- Vars.cs
- AxisAngleRotation3D.cs
- Application.cs
- InvokerUtil.cs
- EventLogEntryCollection.cs
- GlobalItem.cs
- PageContentAsyncResult.cs
- DBConnectionString.cs
- EvidenceBase.cs
- XmlSchemaObject.cs
- MarkerProperties.cs
- DataMemberConverter.cs
- WebSysDisplayNameAttribute.cs
- ComplexObject.cs
- SetterBaseCollection.cs
- WebColorConverter.cs
- CanonicalFormWriter.cs
- COM2IPerPropertyBrowsingHandler.cs
- FunctionQuery.cs
- Thread.cs
- ObjectTag.cs
- MailWebEventProvider.cs
- EdmSchemaAttribute.cs
- MessageDesigner.cs
- WebPartConnectionsConnectVerb.cs
- ScriptReference.cs
- CodePageUtils.cs
- Table.cs
- SqlRowUpdatingEvent.cs
- WebBrowser.cs
- X509Chain.cs
- RenderingEventArgs.cs
- MemberHolder.cs
- SerialPort.cs
- ToolboxBitmapAttribute.cs
- MenuAdapter.cs
- ApplicationActivator.cs
- TdsParserStaticMethods.cs
- ConfigXmlSignificantWhitespace.cs
- ConnectionStringsExpressionBuilder.cs
- XmlParser.cs
- diagnosticsswitches.cs
- ExpressionCopier.cs
- hebrewshape.cs
- DbConnectionOptions.cs
- HwndAppCommandInputProvider.cs
- ExtensionQuery.cs
- EditorAttribute.cs
- FormsAuthenticationConfiguration.cs
- BindStream.cs
- ServiceBuildProvider.cs
- ListView.cs
- RequestUriProcessor.cs
- MessageDecoder.cs
- DataSourceCacheDurationConverter.cs
- GeometryModel3D.cs
- ServiceHostingEnvironment.cs
- ProtectedProviderSettings.cs
- MembershipPasswordException.cs
- GlobalDataBindingHandler.cs
- BinaryWriter.cs
- RepeaterItemEventArgs.cs
- ObjectDataSource.cs