Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx35 / System.ServiceModel.Web / System / ServiceModel / Web / AspNetCacheProfileAttribute.cs / 1305376 / AspNetCacheProfileAttribute.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Web { using System.ServiceModel.Activation; using System.ServiceModel.Channels; using System.ServiceModel.Description; using System.ServiceModel.Dispatcher; [AttributeUsage(AttributeTargets.Method)] public sealed class AspNetCacheProfileAttribute : Attribute, IOperationBehavior { string cacheProfileName; public AspNetCacheProfileAttribute(string cacheProfileName) { this.cacheProfileName = cacheProfileName; } public string CacheProfileName { get { return this.cacheProfileName; } } public void AddBindingParameters(OperationDescription operationDescription, BindingParameterCollection bindingParameters) { } // do nothing public void ApplyClientBehavior(OperationDescription operationDescription, ClientOperation clientOperation) { } // do nothing public void ApplyDispatchBehavior(OperationDescription operationDescription, DispatchOperation dispatchOperation) { if (!AspNetEnvironment.Current.AspNetCompatibilityEnabled) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException(SR2.CacheProfileOnlySupportedInAspNetCompatibilityMode)); } if (operationDescription.Behaviors.Find() == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR2.CacheProfileAttributeOnlyWithGet)); } dispatchOperation.ParameterInspectors.Add(new CachingParameterInspector(this.cacheProfileName)); } public void Validate(OperationDescription operationDescription) { // validation happens in ApplyDispatchBehavior because it is dispatcher specific } } } // 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
- TreeViewDataItemAutomationPeer.cs
- contentDescriptor.cs
- TextDecorationUnitValidation.cs
- InputProcessorProfiles.cs
- InheritablePropertyChangeInfo.cs
- SqlLiftWhereClauses.cs
- GcHandle.cs
- Lazy.cs
- CrossSiteScriptingValidation.cs
- MarshalDirectiveException.cs
- TemplatePropertyEntry.cs
- LocalValueEnumerator.cs
- HttpStreams.cs
- ToolBarOverflowPanel.cs
- SqlDataSourceFilteringEventArgs.cs
- AddingNewEventArgs.cs
- PresentationAppDomainManager.cs
- PropagatorResult.cs
- DesignerActionPanel.cs
- FormsAuthentication.cs
- KeyedCollection.cs
- EventLog.cs
- PenThread.cs
- HwndSourceParameters.cs
- SchemaElementDecl.cs
- Rect3DValueSerializer.cs
- DrawingContextWalker.cs
- StorageEntityTypeMapping.cs
- LineGeometry.cs
- TagMapInfo.cs
- FtpRequestCacheValidator.cs
- PipelineModuleStepContainer.cs
- Range.cs
- AnimationTimeline.cs
- MethodCallExpression.cs
- dsa.cs
- SecurityException.cs
- SimpleWebHandlerParser.cs
- SemaphoreSecurity.cs
- HtmlAnchor.cs
- DictionaryCustomTypeDescriptor.cs
- SchemaImporterExtension.cs
- X509Chain.cs
- XmlAttributeOverrides.cs
- StaticFileHandler.cs
- PageRequestManager.cs
- ScrollViewer.cs
- FastEncoder.cs
- TableAutomationPeer.cs
- RotateTransform.cs
- GradientBrush.cs
- NavigationPropertyEmitter.cs
- PropertyManager.cs
- DataGridViewCellStyleEditor.cs
- TextRangeEdit.cs
- CodeTypeMember.cs
- ListViewTableCell.cs
- Hashtable.cs
- DetailsViewPageEventArgs.cs
- UpdateTracker.cs
- MapPathBasedVirtualPathProvider.cs
- activationcontext.cs
- SourceFilter.cs
- WebScriptServiceHostFactory.cs
- XmlSignificantWhitespace.cs
- MetadataSource.cs
- backend.cs
- ComponentDispatcher.cs
- SmtpDigestAuthenticationModule.cs
- Window.cs
- Hyperlink.cs
- HttpDictionary.cs
- FilteredAttributeCollection.cs
- RootBrowserWindowAutomationPeer.cs
- CellParagraph.cs
- MachineKeySection.cs
- WebErrorHandler.cs
- HelloMessageApril2005.cs
- ImmutableCollection.cs
- IssuanceLicense.cs
- RequestCacheManager.cs
- ContextProperty.cs
- JoinSymbol.cs
- ConnectionProviderAttribute.cs
- EdmToObjectNamespaceMap.cs
- ListViewGroupConverter.cs
- IDQuery.cs
- SerializerWriterEventHandlers.cs
- LinkLabelLinkClickedEvent.cs
- RpcCryptoContext.cs
- XmlArrayAttribute.cs
- XamlReaderHelper.cs
- PeerApplicationLaunchInfo.cs
- BrowserCapabilitiesCompiler.cs
- DesignBindingValueUIHandler.cs
- ObjectParameterCollection.cs
- LazyLoadBehavior.cs
- RegexCompiler.cs
- SessionParameter.cs
- _BasicClient.cs