Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Cache / SubstitutionResponseElement.cs / 1305376 / SubstitutionResponseElement.cs
using System; using System.Runtime.Serialization; using System.Security.Permissions; using System.Web; using System.Web.Caching; using System.Web.Compilation; namespace System.Web.Caching { [Serializable] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Unrestricted)] public class SubstitutionResponseElement: ResponseElement { [NonSerialized] private HttpResponseSubstitutionCallback _callback; private string _targetTypeName; private string _methodName; public HttpResponseSubstitutionCallback Callback { get { return _callback; } } private SubstitutionResponseElement() { } // hide default constructor public SubstitutionResponseElement(HttpResponseSubstitutionCallback callback) { if (callback == null) throw new ArgumentNullException("callback"); _callback = callback; } [OnSerializing()] private void OnSerializingMethod(StreamingContext context) { // create a string representation of the callback _targetTypeName = System.Web.UI.Util.GetAssemblyQualifiedTypeName(_callback.Method.ReflectedType); _methodName = _callback.Method.Name; } [OnDeserialized()] private void OnDeserializedMethod(StreamingContext context) { // re-create each ValidationCallbackInfo from its string representation Type target = BuildManager.GetType(_targetTypeName, true /*throwOnFail*/, false /*ignoreCase*/); _callback = (HttpResponseSubstitutionCallback) Delegate.CreateDelegate(typeof(HttpResponseSubstitutionCallback), target, _methodName); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- EdmType.cs
- DataKey.cs
- ReliableMessagingHelpers.cs
- SafeRightsManagementHandle.cs
- AsyncOperation.cs
- FlowDocumentScrollViewer.cs
- DataTableNewRowEvent.cs
- AppDomainFactory.cs
- ShowExpandedMultiValueConverter.cs
- FixedPage.cs
- COM2IProvidePropertyBuilderHandler.cs
- CertificateManager.cs
- FixedPageAutomationPeer.cs
- TagPrefixAttribute.cs
- NameValuePair.cs
- ReflectionUtil.cs
- AuthenticationService.cs
- X509ScopedServiceCertificateElement.cs
- DbException.cs
- Int16AnimationUsingKeyFrames.cs
- WorkflowInlining.cs
- XmlTextAttribute.cs
- QilTypeChecker.cs
- PTProvider.cs
- dataSvcMapFileLoader.cs
- ControlCollection.cs
- ClientScriptManagerWrapper.cs
- HttpException.cs
- MultiPageTextView.cs
- PersonalizationProvider.cs
- TableRowGroupCollection.cs
- EdgeModeValidation.cs
- RuntimeHandles.cs
- Guid.cs
- DropShadowBitmapEffect.cs
- ChtmlTextWriter.cs
- COAUTHINFO.cs
- VariableAction.cs
- FlowPanelDesigner.cs
- PersonalizationStateInfo.cs
- ReadOnlyHierarchicalDataSourceView.cs
- FrameworkElementAutomationPeer.cs
- XhtmlBasicImageAdapter.cs
- XmlStreamStore.cs
- ContentPathSegment.cs
- UriExt.cs
- DataTableTypeConverter.cs
- Transform.cs
- DynamicDiscoSearcher.cs
- RequestCache.cs
- HttpClientProtocol.cs
- BinaryFormatterWriter.cs
- AttachedAnnotationChangedEventArgs.cs
- OpCellTreeNode.cs
- ThreadInterruptedException.cs
- InsufficientExecutionStackException.cs
- TabControlCancelEvent.cs
- ScriptingRoleServiceSection.cs
- SqlCacheDependency.cs
- DesignerActionHeaderItem.cs
- GestureRecognizer.cs
- LineUtil.cs
- SpecularMaterial.cs
- InstanceKeyCompleteException.cs
- WebPartHeaderCloseVerb.cs
- TextTreeRootTextBlock.cs
- SqlCacheDependency.cs
- HttpInputStream.cs
- ClientApiGenerator.cs
- SafeNativeMethods.cs
- BulletDecorator.cs
- PrintDocument.cs
- WorkflowMarkupSerializer.cs
- NamedObjectList.cs
- Accessors.cs
- Options.cs
- Parser.cs
- wmiutil.cs
- ByteRangeDownloader.cs
- SamlAuthenticationClaimResource.cs
- OleDbConnectionInternal.cs
- AssemblyResolver.cs
- PageScaling.cs
- SmiEventSink_DeferedProcessing.cs
- ToolboxItem.cs
- EventListener.cs
- ActivationServices.cs
- IdleTimeoutMonitor.cs
- TextHidden.cs
- HttpPostLocalhostServerProtocol.cs
- EmptyTextWriter.cs
- DefaultAssemblyResolver.cs
- ErrorWebPart.cs
- UnsafeNativeMethods.cs
- CodeNamespaceCollection.cs
- FrameworkContentElementAutomationPeer.cs
- SafeBitVector32.cs
- ImageFormat.cs
- AdornedElementPlaceholder.cs
- StringStorage.cs