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
- EntityProviderFactory.cs
- Base64Decoder.cs
- Figure.cs
- SqlRowUpdatingEvent.cs
- CodeCatchClauseCollection.cs
- Vector3dCollection.cs
- FontStretches.cs
- ExecutorLocksHeldException.cs
- DataServiceKeyAttribute.cs
- VisualTarget.cs
- SQLString.cs
- Enum.cs
- XmlSchemaAll.cs
- DefaultClaimSet.cs
- AtomicFile.cs
- MatchAttribute.cs
- TimelineGroup.cs
- ExpressionBuilderCollection.cs
- ProcessInfo.cs
- DbConvert.cs
- DataGridViewRowStateChangedEventArgs.cs
- DataGridViewMethods.cs
- SecuritySessionFilter.cs
- UserControlFileEditor.cs
- JsonSerializer.cs
- ConversionContext.cs
- WebPartVerbsEventArgs.cs
- ChildTable.cs
- JsonReader.cs
- LeftCellWrapper.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- Attachment.cs
- AccessDataSourceView.cs
- FixedFindEngine.cs
- CodeMethodInvokeExpression.cs
- XhtmlCssHandler.cs
- SkipQueryOptionExpression.cs
- ClearTypeHintValidation.cs
- EntityDesignerDataSourceView.cs
- StringReader.cs
- TimelineGroup.cs
- SingletonConnectionReader.cs
- SignatureToken.cs
- COM2IPerPropertyBrowsingHandler.cs
- EndOfStreamException.cs
- X509Certificate2.cs
- RegionData.cs
- SelectedPathEditor.cs
- PageThemeParser.cs
- WmiEventSink.cs
- TransformProviderWrapper.cs
- ReachDocumentReferenceSerializer.cs
- BitmapEffect.cs
- VersionedStreamOwner.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- ChildTable.cs
- CodeGotoStatement.cs
- ViewGenResults.cs
- PaperSource.cs
- EventSetter.cs
- BamlStream.cs
- VSDExceptions.cs
- CodeDomComponentSerializationService.cs
- DataSourceListEditor.cs
- GridLength.cs
- FontStyleConverter.cs
- XmlText.cs
- ManifestResourceInfo.cs
- EDesignUtil.cs
- SingleTagSectionHandler.cs
- IconBitmapDecoder.cs
- NetworkStream.cs
- ObjectDataSourceMethodEventArgs.cs
- baseaxisquery.cs
- WmfPlaceableFileHeader.cs
- LiteralText.cs
- EntityContainer.cs
- ImageIndexConverter.cs
- NetTcpSecurity.cs
- ReadOnlyDictionary.cs
- XmlSiteMapProvider.cs
- ThreadExceptionEvent.cs
- ObjectAssociationEndMapping.cs
- ExpressionConverter.cs
- NetCodeGroup.cs
- OutOfMemoryException.cs
- XmlSchemaInclude.cs
- BuildProvidersCompiler.cs
- MetadataPropertyvalue.cs
- TypeInitializationException.cs
- DrawingGroupDrawingContext.cs
- ReadOnlyTernaryTree.cs
- ProgressBar.cs
- shaperfactoryquerycachekey.cs
- RowType.cs
- EditorPartChrome.cs
- XmlLoader.cs
- CategoryValueConverter.cs
- IndividualDeviceConfig.cs
- SspiSafeHandles.cs