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
- MouseWheelEventArgs.cs
- DataBoundControl.cs
- ImageMap.cs
- InvalidCommandTreeException.cs
- DocumentViewerBase.cs
- SqlRowUpdatedEvent.cs
- ValueChangedEventManager.cs
- Utilities.cs
- Int16Animation.cs
- GeneralTransform3DGroup.cs
- MethodExpr.cs
- Solver.cs
- CqlLexerHelpers.cs
- UserControl.cs
- WindowsFormsHostAutomationPeer.cs
- BroadcastEventHelper.cs
- TransformerConfigurationWizardBase.cs
- StickyNote.cs
- SchemaImporterExtensionElement.cs
- ResourceProviderFactory.cs
- ImageSource.cs
- ConfigXmlSignificantWhitespace.cs
- RelationshipDetailsCollection.cs
- CAGDesigner.cs
- AsymmetricAlgorithm.cs
- SqlInternalConnectionSmi.cs
- XPathPatternBuilder.cs
- PersonalizationStateInfoCollection.cs
- SourceChangedEventArgs.cs
- XmlMemberMapping.cs
- TrackingStringDictionary.cs
- StringFormat.cs
- AdornedElementPlaceholder.cs
- Debug.cs
- SerializationInfoEnumerator.cs
- ReadingWritingEntityEventArgs.cs
- WriterOutput.cs
- GeometryGroup.cs
- DBCommand.cs
- Rectangle.cs
- mda.cs
- GenericUriParser.cs
- OneOfConst.cs
- Graph.cs
- NaturalLanguageHyphenator.cs
- RowUpdatedEventArgs.cs
- DocumentOrderQuery.cs
- DefaultPrintController.cs
- ProvidersHelper.cs
- PointConverter.cs
- Compiler.cs
- DataTemplate.cs
- FrameworkElement.cs
- SafeEventHandle.cs
- PropertyConverter.cs
- TreeChangeInfo.cs
- CodeTryCatchFinallyStatement.cs
- CodeVariableReferenceExpression.cs
- CompilerGeneratedAttribute.cs
- CreateUserErrorEventArgs.cs
- SqlLiftIndependentRowExpressions.cs
- WindowsUpDown.cs
- XsltArgumentList.cs
- DependencyObject.cs
- PropertyOrder.cs
- JpegBitmapDecoder.cs
- HttpModuleCollection.cs
- SortDescription.cs
- Exceptions.cs
- DesignBindingValueUIHandler.cs
- AsymmetricSignatureFormatter.cs
- MailWebEventProvider.cs
- PartialTrustVisibleAssemblyCollection.cs
- EntityModelBuildProvider.cs
- PrivacyNoticeBindingElementImporter.cs
- _SslStream.cs
- LabelDesigner.cs
- ConfigXmlAttribute.cs
- PropertyMappingExceptionEventArgs.cs
- ActivityCodeDomSerializer.cs
- CompatibleIComparer.cs
- StickyNoteContentControl.cs
- ServiceInfo.cs
- DataBindEngine.cs
- ScriptingJsonSerializationSection.cs
- DesignerRegion.cs
- MissingSatelliteAssemblyException.cs
- MeasureItemEvent.cs
- BitmapEffectGeneralTransform.cs
- Calendar.cs
- ExpressionBindingCollection.cs
- ExpressionHelper.cs
- TextSimpleMarkerProperties.cs
- TypeLibConverter.cs
- BaseCollection.cs
- VSWCFServiceContractGenerator.cs
- ToolStripControlHost.cs
- ApplicationBuildProvider.cs
- NativeMethods.cs
- EventDescriptorCollection.cs