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
- QuotedPrintableStream.cs
- ResourceProviderFactory.cs
- CodePrimitiveExpression.cs
- OdbcConnectionStringbuilder.cs
- Section.cs
- DiagnosticTraceSource.cs
- Activity.cs
- FixUpCollection.cs
- PageTheme.cs
- sqlpipe.cs
- RemotingService.cs
- EdmEntityTypeAttribute.cs
- OperationAbortedException.cs
- RTLAwareMessageBox.cs
- EventSetter.cs
- MdiWindowListItemConverter.cs
- SafeNativeMethods.cs
- WindowsSspiNegotiation.cs
- ThreadAbortException.cs
- ZipIOExtraFieldZip64Element.cs
- CannotUnloadAppDomainException.cs
- ProfileGroupSettingsCollection.cs
- DataGrid.cs
- WebResourceUtil.cs
- _BaseOverlappedAsyncResult.cs
- TraceHandlerErrorFormatter.cs
- TreeNodeBindingCollection.cs
- ListViewCommandEventArgs.cs
- PenThreadWorker.cs
- PrivateFontCollection.cs
- DBSqlParserColumnCollection.cs
- CompiledQuery.cs
- DebugController.cs
- BindingContext.cs
- FontDriver.cs
- TableLayoutPanel.cs
- TypedDataSourceCodeGenerator.cs
- TabletDevice.cs
- Typeface.cs
- FullTextLine.cs
- XmlUtf8RawTextWriter.cs
- LoginCancelEventArgs.cs
- WindowsToolbarItemAsMenuItem.cs
- TreeNodeClickEventArgs.cs
- ToolStripManager.cs
- TypeConverter.cs
- DataGridViewImageCell.cs
- XmlTextReaderImplHelpers.cs
- Currency.cs
- DataGridViewRowCancelEventArgs.cs
- Vector3dCollection.cs
- __Error.cs
- TextContainer.cs
- Deserializer.cs
- DataBinding.cs
- ProfileModule.cs
- BitmapEffectDrawing.cs
- WinEventWrap.cs
- CharacterHit.cs
- ServicesUtilities.cs
- CompiledQuery.cs
- SiteMapNodeItem.cs
- WebRequestModulesSection.cs
- DecimalStorage.cs
- ExitEventArgs.cs
- Annotation.cs
- ProviderUtil.cs
- WebServiceHandler.cs
- ECDiffieHellmanCngPublicKey.cs
- AmbientProperties.cs
- ViewBase.cs
- EncryptedKey.cs
- TableRow.cs
- updateconfighost.cs
- TableAutomationPeer.cs
- MailBnfHelper.cs
- GPRECTF.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- ReliableInputConnection.cs
- SafeRightsManagementSessionHandle.cs
- HandlerMappingMemo.cs
- TemplateBindingExpression.cs
- Imaging.cs
- HttpConfigurationSystem.cs
- SqlGatherConsumedAliases.cs
- PageRequestManager.cs
- FragmentQueryProcessor.cs
- NativeRecognizer.cs
- UpdatePanelTrigger.cs
- OdbcCommand.cs
- WebPartsPersonalization.cs
- XmlJsonWriter.cs
- TagNameToTypeMapper.cs
- MenuItemStyle.cs
- ChannelBuilder.cs
- WebControlsSection.cs
- SqlBuffer.cs
- MatchAttribute.cs
- CommandSet.cs
- UTF8Encoding.cs