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
- StyleSelector.cs
- IteratorDescriptor.cs
- GetParentChain.cs
- XmlSchemaAll.cs
- ColorDialog.cs
- WasEndpointConfigContainer.cs
- TreeNodeClickEventArgs.cs
- CellCreator.cs
- ActiveDocumentEvent.cs
- DataControlField.cs
- HttpServerVarsCollection.cs
- CopyNamespacesAction.cs
- ResourceDescriptionAttribute.cs
- KeyValueInternalCollection.cs
- DataGridCell.cs
- SqlProcedureAttribute.cs
- SqlConnectionManager.cs
- Button.cs
- DataFormat.cs
- XhtmlBasicCommandAdapter.cs
- ReadOnlyHierarchicalDataSourceView.cs
- DocumentSchemaValidator.cs
- ValueTable.cs
- nulltextcontainer.cs
- ScriptManagerProxy.cs
- DataGridViewIntLinkedList.cs
- CodeGeneratorOptions.cs
- EventLogEntryCollection.cs
- DynamicVirtualDiscoSearcher.cs
- BasicExpressionVisitor.cs
- XsdCachingReader.cs
- Misc.cs
- Crypto.cs
- TextFormatterContext.cs
- ProxyManager.cs
- ThreadAttributes.cs
- ProbeMatchesApril2005.cs
- AssemblyInfo.cs
- CommandExpr.cs
- WebPartEditVerb.cs
- DateTimeUtil.cs
- HWStack.cs
- SystemIcons.cs
- DesignerWithHeader.cs
- RectangleGeometry.cs
- SafeThreadHandle.cs
- SubordinateTransaction.cs
- EmptyEnumerator.cs
- CompoundFileReference.cs
- BuildResultCache.cs
- PrimitiveSchema.cs
- RawKeyboardInputReport.cs
- State.cs
- WindowsListViewGroup.cs
- TemplateContentLoader.cs
- ProfileModule.cs
- RIPEMD160.cs
- WindowsGraphics.cs
- EnumerableRowCollection.cs
- SystemDiagnosticsSection.cs
- SplitterCancelEvent.cs
- VariableAction.cs
- WebConvert.cs
- MapPathBasedVirtualPathProvider.cs
- LinqDataSourceUpdateEventArgs.cs
- FormatVersion.cs
- TreeView.cs
- WebPartDescription.cs
- HttpPostedFile.cs
- ServiceSettingsResponseInfo.cs
- HtmlMeta.cs
- Deflater.cs
- TraceLog.cs
- ColumnWidthChangedEvent.cs
- CorrelationToken.cs
- WindowsPrincipal.cs
- InputScope.cs
- HttpCapabilitiesBase.cs
- BaseInfoTable.cs
- CatalogZone.cs
- PrintDialogDesigner.cs
- SimpleWorkerRequest.cs
- StylusEventArgs.cs
- AuthenticationModuleElement.cs
- BuilderElements.cs
- OneOfScalarConst.cs
- ProgressBarBrushConverter.cs
- AbstractExpressions.cs
- followingsibling.cs
- HttpModuleCollection.cs
- CodeAttributeDeclaration.cs
- SystemFonts.cs
- ConfigurationManager.cs
- RequestNavigateEventArgs.cs
- TextProperties.cs
- ThicknessAnimation.cs
- LinkedResourceCollection.cs
- ErrorWebPart.cs
- AnonymousIdentificationSection.cs
- CompiledQuery.cs