Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Description / CallbackDebugBehavior.cs / 1 / CallbackDebugBehavior.cs
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------
namespace System.ServiceModel.Description
{
using System.ServiceModel.Channels;
using System.ServiceModel;
using System.ServiceModel.Dispatcher;
using System.Runtime.Serialization;
using System.Collections.ObjectModel;
using System.Collections.Generic;
public class CallbackDebugBehavior : IEndpointBehavior
{
bool includeExceptionDetailInFaults = false;
public CallbackDebugBehavior(bool includeExceptionDetailInFaults)
{
this.includeExceptionDetailInFaults = includeExceptionDetailInFaults;
}
public bool IncludeExceptionDetailInFaults
{
get { return this.includeExceptionDetailInFaults; }
set { this.includeExceptionDetailInFaults = value; }
}
void IEndpointBehavior.Validate(ServiceEndpoint serviceEndpoint)
{
}
void IEndpointBehavior.AddBindingParameters(ServiceEndpoint serviceEndpoint, BindingParameterCollection bindingParameters)
{
}
void IEndpointBehavior.ApplyDispatchBehavior(ServiceEndpoint serviceEndpoint, EndpointDispatcher endpointDispatcher)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(
SR.GetString(SR.SFXEndpointBehaviorUsedOnWrongSide, typeof(CallbackDebugBehavior).Name)));
}
void IEndpointBehavior.ApplyClientBehavior(ServiceEndpoint serviceEndpoint, ClientRuntime behavior)
{
ChannelDispatcher channelDispatcher = behavior.CallbackDispatchRuntime.ChannelDispatcher;
if (channelDispatcher != null && this.includeExceptionDetailInFaults)
{
channelDispatcher.IncludeExceptionDetailInFaults = true;
}
}
}
}
// 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
- Vector3D.cs
- BamlVersionHeader.cs
- TraceRecord.cs
- UnmanagedHandle.cs
- RoleManagerEventArgs.cs
- KernelTypeValidation.cs
- AssemblyResourceLoader.cs
- JpegBitmapDecoder.cs
- SecurityDocument.cs
- XmlSchemaImporter.cs
- CrossContextChannel.cs
- ipaddressinformationcollection.cs
- ResolveInfo.cs
- DomainUpDown.cs
- RegexRunnerFactory.cs
- ListViewInsertedEventArgs.cs
- COAUTHIDENTITY.cs
- XmlFormatWriterGenerator.cs
- TypeExtension.cs
- CookieParameter.cs
- DispatcherSynchronizationContext.cs
- BitSet.cs
- SerializationFieldInfo.cs
- SrgsDocumentParser.cs
- PerformanceCounterManager.cs
- VectorAnimationBase.cs
- LicenseProviderAttribute.cs
- DataKeyCollection.cs
- EntityDataSourceColumn.cs
- LinearQuaternionKeyFrame.cs
- ShapingEngine.cs
- SelectedDatesCollection.cs
- PersonalizationProviderHelper.cs
- ResolveResponse.cs
- FreezableDefaultValueFactory.cs
- FileRecordSequenceCompletedAsyncResult.cs
- ProfileGroupSettings.cs
- NonSerializedAttribute.cs
- Translator.cs
- SqlDataSourceEnumerator.cs
- XPathNodeList.cs
- TimelineGroup.cs
- SafeNativeMethods.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- DataGridViewColumnCollection.cs
- MemberDescriptor.cs
- SQLDoubleStorage.cs
- XAMLParseException.cs
- Rectangle.cs
- ScriptingWebServicesSectionGroup.cs
- CodeDirectoryCompiler.cs
- HttpConfigurationContext.cs
- XmlSchemaAttributeGroupRef.cs
- Main.cs
- VirtualPathProvider.cs
- ReferentialConstraint.cs
- VBCodeProvider.cs
- Block.cs
- MethodRental.cs
- TemplateControlCodeDomTreeGenerator.cs
- RegexGroup.cs
- URLAttribute.cs
- TableLayout.cs
- OptimizedTemplateContentHelper.cs
- LoginUtil.cs
- ControlUtil.cs
- _IPv4Address.cs
- ExpressionBuilderCollection.cs
- ExtendedPropertyDescriptor.cs
- DocumentEventArgs.cs
- Drawing.cs
- XmlCharCheckingReader.cs
- BackgroundWorker.cs
- HttpContext.cs
- SystemUdpStatistics.cs
- UrlPropertyAttribute.cs
- ProtocolsSection.cs
- SerializationHelper.cs
- Unit.cs
- QueryFunctions.cs
- ToolboxItemWrapper.cs
- RuntimeCompatibilityAttribute.cs
- WeakRefEnumerator.cs
- DataTableNameHandler.cs
- SecurityTokenContainer.cs
- HandleCollector.cs
- WindowsAuthenticationEventArgs.cs
- xsdvalidator.cs
- XmlSerializableServices.cs
- ScrollProviderWrapper.cs
- HttpCachePolicyElement.cs
- StringComparer.cs
- CodePropertyReferenceExpression.cs
- ColorInterpolationModeValidation.cs
- RawStylusInput.cs
- CustomPopupPlacement.cs
- DecimalAnimationBase.cs
- ObjectNotFoundException.cs
- ScriptReferenceBase.cs
- ConfigXmlCDataSection.cs