Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DoubleLinkListEnumerator.cs
- ScriptMethodAttribute.cs
- documentsequencetextpointer.cs
- NodeFunctions.cs
- DeobfuscatingStream.cs
- ProgressBar.cs
- EventLogEntryCollection.cs
- wgx_commands.cs
- PointConverter.cs
- AutomationPatternInfo.cs
- AuthenticationModulesSection.cs
- DecoderReplacementFallback.cs
- SourceInterpreter.cs
- TreeViewHitTestInfo.cs
- ContextTokenTypeConverter.cs
- FreezableOperations.cs
- ProfileService.cs
- IconEditor.cs
- ValidationEventArgs.cs
- ToolBarDesigner.cs
- CryptoKeySecurity.cs
- WebPartVerbsEventArgs.cs
- BuildProvidersCompiler.cs
- Boolean.cs
- TileBrush.cs
- TypeDefinition.cs
- ScrollViewer.cs
- ZoneLinkButton.cs
- XmlTextEncoder.cs
- ApplicationSettingsBase.cs
- DSGeneratorProblem.cs
- PublisherMembershipCondition.cs
- ListDictionaryInternal.cs
- XomlCompilerResults.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- CanExecuteRoutedEventArgs.cs
- ConfigurationPropertyAttribute.cs
- QilSortKey.cs
- ContextMenuStrip.cs
- FlowNode.cs
- Vector3dCollection.cs
- UserMapPath.cs
- RequestCacheEntry.cs
- _AutoWebProxyScriptEngine.cs
- InvalidOperationException.cs
- WmlCalendarAdapter.cs
- DocumentEventArgs.cs
- XmlSchemaComplexContentRestriction.cs
- CultureInfoConverter.cs
- ResourceContainer.cs
- WebBrowserSiteBase.cs
- HttpCacheParams.cs
- Switch.cs
- WebServiceData.cs
- DependencyPropertyChangedEventArgs.cs
- Msec.cs
- SecurityDocument.cs
- isolationinterop.cs
- TableRow.cs
- SoapEnumAttribute.cs
- StyleModeStack.cs
- ScriptingScriptResourceHandlerSection.cs
- ConfigurationPropertyCollection.cs
- MouseBinding.cs
- TextEditorMouse.cs
- PathStreamGeometryContext.cs
- PrintPreviewDialog.cs
- WebPartDisplayModeCancelEventArgs.cs
- XmlDataFileEditor.cs
- ListBase.cs
- ControlParameter.cs
- WebPartDisplayModeEventArgs.cs
- BitmapMetadata.cs
- CodeTryCatchFinallyStatement.cs
- Relationship.cs
- DbProviderFactoriesConfigurationHandler.cs
- AppDomainFactory.cs
- MatrixAnimationUsingPath.cs
- PartialList.cs
- ToolStripItemEventArgs.cs
- MetadataFile.cs
- DesignerContextDescriptor.cs
- ColorBlend.cs
- PasswordTextContainer.cs
- FileDataSourceCache.cs
- SamlAttributeStatement.cs
- GatewayIPAddressInformationCollection.cs
- PrintSystemException.cs
- JsonSerializer.cs
- CursorConverter.cs
- SqlFormatter.cs
- ZipIOBlockManager.cs
- WebPartHelpVerb.cs
- TemplateBindingExpressionConverter.cs
- TextServicesCompartmentContext.cs
- GuidConverter.cs
- ModelUtilities.cs
- AsyncCompletedEventArgs.cs
- ObjectStateFormatter.cs
- RectangleF.cs