Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / xsp / System / Web / Extensions / ui / UpdatePanelTriggerCollection.cs / 1 / 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.Security.Permissions; using System.Web; [ AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal), AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal) ] 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.Security.Permissions; using System.Web; [ AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal), AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal) ] 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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XamlTypeMapper.cs
- XpsStructure.cs
- GlobalProxySelection.cs
- PolicyException.cs
- DataGridViewRowPostPaintEventArgs.cs
- AssemblyHash.cs
- WebPartConnectionsCancelVerb.cs
- EqualityArray.cs
- EDesignUtil.cs
- WebContentFormatHelper.cs
- ExcCanonicalXml.cs
- DbMetaDataCollectionNames.cs
- MdiWindowListItemConverter.cs
- ValidationError.cs
- XmlHierarchicalDataSourceView.cs
- ConfigurationManagerInternal.cs
- DPCustomTypeDescriptor.cs
- HttpDebugHandler.cs
- EventSetter.cs
- SemanticResolver.cs
- DocumentReferenceCollection.cs
- IconHelper.cs
- UrlEncodedParameterWriter.cs
- FileAuthorizationModule.cs
- PrintEvent.cs
- SqlDataSourceConfigureFilterForm.cs
- SharedPerformanceCounter.cs
- DbXmlEnabledProviderManifest.cs
- UpdatePanelTrigger.cs
- GestureRecognizer.cs
- CustomErrorCollection.cs
- TextParaClient.cs
- PersonalizationState.cs
- PriorityItem.cs
- TextTreeText.cs
- ResourcesBuildProvider.cs
- QueryRelOp.cs
- GraphicsPath.cs
- MatrixStack.cs
- TransportManager.cs
- ConstraintEnumerator.cs
- PeerContact.cs
- BoundPropertyEntry.cs
- CompiledRegexRunnerFactory.cs
- BuilderElements.cs
- PolicyStatement.cs
- PseudoWebRequest.cs
- Decimal.cs
- ChineseLunisolarCalendar.cs
- CommonGetThemePartSize.cs
- HtmlDocument.cs
- SourceChangedEventArgs.cs
- FixedSOMElement.cs
- XPathDescendantIterator.cs
- ServiceModelSecurityTokenRequirement.cs
- ProvideValueServiceProvider.cs
- KeyFrames.cs
- CommandPlan.cs
- ControlTemplate.cs
- ConnectionConsumerAttribute.cs
- GroupByQueryOperator.cs
- AliasGenerator.cs
- SqlUnionizer.cs
- Stroke2.cs
- DependencyPropertyAttribute.cs
- ListViewContainer.cs
- PixelFormat.cs
- CompilationUtil.cs
- FormsAuthenticationEventArgs.cs
- PropertyPath.cs
- SafeSecurityHelper.cs
- CustomValidator.cs
- BamlResourceContent.cs
- TiffBitmapDecoder.cs
- XpsSerializationException.cs
- CodeGeneratorOptions.cs
- MD5.cs
- QueryableDataSourceHelper.cs
- SmtpDigestAuthenticationModule.cs
- RecordConverter.cs
- WizardPanel.cs
- RC2.cs
- SchemaEntity.cs
- EventItfInfo.cs
- StopStoryboard.cs
- ClearTypeHintValidation.cs
- HierarchicalDataBoundControlAdapter.cs
- RSAPKCS1KeyExchangeFormatter.cs
- PageStatePersister.cs
- BinHexDecoder.cs
- TaskScheduler.cs
- XamlFigureLengthSerializer.cs
- Graph.cs
- ProfileServiceManager.cs
- ParseElement.cs
- SimpleTextLine.cs
- XmlSchemaFacet.cs
- HttpValueCollection.cs
- EmptyStringExpandableObjectConverter.cs
- SubpageParaClient.cs