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
- LineServicesRun.cs
- XmlnsPrefixAttribute.cs
- DataObject.cs
- StateMachine.cs
- QueryableDataSource.cs
- DataGridParentRows.cs
- EventHandlerList.cs
- XComponentModel.cs
- ObjectViewListener.cs
- PaperSize.cs
- SuppressMessageAttribute.cs
- HttpCookie.cs
- XmlObjectSerializerWriteContext.cs
- HasCopySemanticsAttribute.cs
- ListParagraph.cs
- SafeSystemMetrics.cs
- FloatSumAggregationOperator.cs
- JsonSerializer.cs
- FocusTracker.cs
- ChunkedMemoryStream.cs
- DataSourceView.cs
- ViewStateModeByIdAttribute.cs
- InfocardInteractiveChannelInitializer.cs
- HTTP_SERVICE_CONFIG_URLACL_PARAM.cs
- XPathItem.cs
- SortedDictionary.cs
- ColumnWidthChangedEvent.cs
- MonitoringDescriptionAttribute.cs
- ButtonChrome.cs
- DbMetaDataColumnNames.cs
- Literal.cs
- AnnotationResource.cs
- RunInstallerAttribute.cs
- ProjectionQueryOptionExpression.cs
- processwaithandle.cs
- AlternateViewCollection.cs
- Latin1Encoding.cs
- PreviewPrintController.cs
- Int32KeyFrameCollection.cs
- DataGridViewSelectedCellCollection.cs
- GcSettings.cs
- SiteMapPath.cs
- HandlerBase.cs
- GB18030Encoding.cs
- GroupJoinQueryOperator.cs
- SelectionProcessor.cs
- ButtonPopupAdapter.cs
- ProgressBarHighlightConverter.cs
- SymbolMethod.cs
- InkCanvasFeedbackAdorner.cs
- HttpClientProtocol.cs
- _NativeSSPI.cs
- TwoPhaseCommit.cs
- ReplyAdapterChannelListener.cs
- LogStream.cs
- FontEmbeddingManager.cs
- DocumentNUp.cs
- Matrix3D.cs
- RectAnimationBase.cs
- nulltextcontainer.cs
- ContentDisposition.cs
- OdbcException.cs
- As.cs
- DataGridViewSortCompareEventArgs.cs
- recordstate.cs
- CompilerInfo.cs
- UInt16Converter.cs
- RandomNumberGenerator.cs
- EntityViewContainer.cs
- SerializationException.cs
- DelayedRegex.cs
- AssociationEndMember.cs
- Item.cs
- SQLInt32.cs
- HashCodeCombiner.cs
- ZipIOModeEnforcingStream.cs
- CharEntityEncoderFallback.cs
- DataSourceXmlSubItemAttribute.cs
- DecimalConverter.cs
- UriExt.cs
- MonthCalendar.cs
- SapiRecoInterop.cs
- GradientStop.cs
- AppLevelCompilationSectionCache.cs
- DesignerActionTextItem.cs
- Point3DAnimation.cs
- PropertyEmitter.cs
- SafeBuffer.cs
- CommonRemoteMemoryBlock.cs
- Util.cs
- _ContextAwareResult.cs
- DetailsViewDesigner.cs
- InfoCardTrace.cs
- QilValidationVisitor.cs
- GridLength.cs
- PriorityRange.cs
- ProjectionCamera.cs
- FontDifferentiator.cs
- StateRuntime.cs
- TextTreeFixupNode.cs