Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- PropertyEntry.cs
- PrefixQName.cs
- PathGeometry.cs
- VSWCFServiceContractGenerator.cs
- ScriptingScriptResourceHandlerSection.cs
- TextSchema.cs
- WebRequestModuleElement.cs
- BaseTemplateCodeDomTreeGenerator.cs
- PkcsUtils.cs
- Listbox.cs
- NameValuePair.cs
- PrintDialog.cs
- HandlerBase.cs
- Scanner.cs
- ResXDataNode.cs
- DesigntimeLicenseContextSerializer.cs
- DataBindEngine.cs
- NativeMethods.cs
- Constraint.cs
- ActivityBindForm.Designer.cs
- TypeUtil.cs
- RC2CryptoServiceProvider.cs
- LocalizableAttribute.cs
- HitTestFilterBehavior.cs
- AccessorTable.cs
- CqlParser.cs
- ReadOnlyDataSource.cs
- RepeatButton.cs
- TextDecorationCollection.cs
- ObfuscateAssemblyAttribute.cs
- NestedContainer.cs
- TextTreeTextElementNode.cs
- TextBoxBase.cs
- FormatException.cs
- Polygon.cs
- CodeCompiler.cs
- VarRemapper.cs
- NativeMethodsOther.cs
- WebServicesDescriptionAttribute.cs
- IWorkflowDebuggerService.cs
- TimeSpan.cs
- PingReply.cs
- VisualStyleRenderer.cs
- GridViewCancelEditEventArgs.cs
- PointAnimationUsingPath.cs
- XhtmlTextWriter.cs
- ForwardPositionQuery.cs
- XmlLanguage.cs
- MetabaseServerConfig.cs
- TextStore.cs
- CellParaClient.cs
- HTTPAPI_VERSION.cs
- Base64Encoder.cs
- OdbcConnectionFactory.cs
- QuadraticBezierSegment.cs
- TypeConverterAttribute.cs
- DataGridCellsPanel.cs
- DifferencingCollection.cs
- StylusButtonCollection.cs
- TemplateParser.cs
- TemplateKey.cs
- CachedTypeface.cs
- Table.cs
- NativeCppClassAttribute.cs
- WebPartZoneBaseDesigner.cs
- DoubleLink.cs
- DataGridViewTopLeftHeaderCell.cs
- MultiBindingExpression.cs
- DescendentsWalker.cs
- ScopedMessagePartSpecification.cs
- URLMembershipCondition.cs
- IImplicitResourceProvider.cs
- IntSecurity.cs
- Int32AnimationBase.cs
- RenderData.cs
- RegexMatch.cs
- ConnectionStringSettingsCollection.cs
- ISAPIWorkerRequest.cs
- EncryptedKeyIdentifierClause.cs
- GroupDescription.cs
- FieldNameLookup.cs
- ExtendedProperty.cs
- TraceContextRecord.cs
- TemplatedMailWebEventProvider.cs
- SignedXml.cs
- UniformGrid.cs
- NameValueCollection.cs
- ClockGroup.cs
- FormsAuthenticationUserCollection.cs
- ImageSourceValueSerializer.cs
- DBDataPermission.cs
- initElementDictionary.cs
- AutomationElementIdentifiers.cs
- PriorityQueue.cs
- XmlTextWriter.cs
- Int16Animation.cs
- ActivityDesignerLayoutSerializers.cs
- HttpRequestTraceRecord.cs
- JavascriptCallbackMessageInspector.cs
- Msmq4PoisonHandler.cs