Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Description / ServiceSecurityAuditBehavior.cs / 1 / ServiceSecurityAuditBehavior.cs
//------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
namespace System.ServiceModel.Description
{
using System;
using System.ServiceModel.Channels;
using System.ServiceModel.Dispatcher;
using System.ServiceModel;
using System.Runtime.Serialization;
using System.ServiceModel.Security;
using System.Web.Security;
using System.Collections.ObjectModel;
using System.Collections.Generic;
using System.IdentityModel.Claims;
using System.IdentityModel.Policy;
using System.Runtime.CompilerServices;
public sealed class ServiceSecurityAuditBehavior : IServiceBehavior
{
internal const AuditLogLocation defaultAuditLogLocation = AuditLogLocation.Default;
internal const bool defaultSuppressAuditFailure = true;
internal const AuditLevel defaultServiceAuthorizationAuditLevel = AuditLevel.None;
internal const AuditLevel defaultMessageAuthenticationAuditLevel = AuditLevel.None;
AuditLogLocation auditLogLocation;
bool suppressAuditFailure;
AuditLevel serviceAuthorizationAuditLevel;
AuditLevel messageAuthenticationAuditLevel;
public ServiceSecurityAuditBehavior()
{
this.auditLogLocation = ServiceSecurityAuditBehavior.defaultAuditLogLocation;
this.suppressAuditFailure = ServiceSecurityAuditBehavior.defaultSuppressAuditFailure;
this.serviceAuthorizationAuditLevel = ServiceSecurityAuditBehavior.defaultServiceAuthorizationAuditLevel;
this.messageAuthenticationAuditLevel = ServiceSecurityAuditBehavior.defaultMessageAuthenticationAuditLevel;
}
ServiceSecurityAuditBehavior(ServiceSecurityAuditBehavior behavior)
{
this.auditLogLocation = behavior.auditLogLocation;
this.suppressAuditFailure = behavior.suppressAuditFailure;
this.serviceAuthorizationAuditLevel = behavior.serviceAuthorizationAuditLevel;
this.messageAuthenticationAuditLevel = behavior.messageAuthenticationAuditLevel;
}
public AuditLogLocation AuditLogLocation
{
get
{
return this.auditLogLocation;
}
set
{
if (!AuditLogLocationHelper.IsDefined(value))
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value"));
this.auditLogLocation = value;
}
}
public bool SuppressAuditFailure
{
get
{
return this.suppressAuditFailure;
}
set
{
this.suppressAuditFailure = value;
}
}
public AuditLevel ServiceAuthorizationAuditLevel
{
get
{
return this.serviceAuthorizationAuditLevel;
}
set
{
if (!AuditLevelHelper.IsDefined(value))
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value"));
this.serviceAuthorizationAuditLevel = value;
}
}
public AuditLevel MessageAuthenticationAuditLevel
{
get
{
return this.messageAuthenticationAuditLevel;
}
set
{
if (!AuditLevelHelper.IsDefined(value))
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value"));
this.messageAuthenticationAuditLevel = value;
}
}
internal ServiceSecurityAuditBehavior Clone()
{
return new ServiceSecurityAuditBehavior(this);
}
void IServiceBehavior.Validate(ServiceDescription description, ServiceHostBase serviceHostBase)
{
}
void IServiceBehavior.AddBindingParameters(ServiceDescription description, ServiceHostBase serviceHostBase, Collection endpoints, BindingParameterCollection parameters)
{
if (parameters == null)
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("parameters"));
parameters.Add(this);
}
void IServiceBehavior.ApplyDispatchBehavior(ServiceDescription description, ServiceHostBase serviceHostBase)
{
if (description == null)
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("description"));
if (serviceHostBase == null)
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("serviceHostBase"));
for (int i=0; i
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- JsonDeserializer.cs
- XmlCharCheckingWriter.cs
- SqlConnectionFactory.cs
- Resources.Designer.cs
- BatchStream.cs
- IListConverters.cs
- TypeInformation.cs
- GenericWebPart.cs
- BitmapSourceSafeMILHandle.cs
- TextElementAutomationPeer.cs
- EntityClassGenerator.cs
- EvidenceBase.cs
- ApplicationHost.cs
- ImageList.cs
- Emitter.cs
- Point.cs
- OracleLob.cs
- SharedConnectionWorkflowTransactionService.cs
- XmlWrappingWriter.cs
- SamlAuthorizationDecisionClaimResource.cs
- XmlResolver.cs
- RecordBuilder.cs
- ConfigurationElementProperty.cs
- LifetimeMonitor.cs
- OleDbDataReader.cs
- FileChangesMonitor.cs
- EventMetadata.cs
- QilTargetType.cs
- WinHttpWebProxyFinder.cs
- CodeCompileUnit.cs
- ModelPerspective.cs
- ResourceProviderFactory.cs
- CompositeCollectionView.cs
- ProfileEventArgs.cs
- ScriptingSectionGroup.cs
- StrokeIntersection.cs
- StylusTip.cs
- ObjectStateFormatter.cs
- SimpleExpression.cs
- EmptyTextWriter.cs
- AnimationStorage.cs
- MouseWheelEventArgs.cs
- PropertyEmitterBase.cs
- ComponentCommands.cs
- ImageField.cs
- LockCookie.cs
- LineProperties.cs
- Encoder.cs
- TextTreeTextElementNode.cs
- HijriCalendar.cs
- DataObjectFieldAttribute.cs
- GridViewUpdatedEventArgs.cs
- SqlDesignerDataSourceView.cs
- SequenceFullException.cs
- UrlMappingCollection.cs
- TypeSchema.cs
- TdsParserHelperClasses.cs
- NullableIntSumAggregationOperator.cs
- XMLSyntaxException.cs
- TcpChannelHelper.cs
- MemberAccessException.cs
- SQLUtility.cs
- ColumnMap.cs
- WebRequestModuleElementCollection.cs
- Atom10FormatterFactory.cs
- DateTimeConverter.cs
- MD5.cs
- DtcInterfaces.cs
- BuildResultCache.cs
- WasEndpointConfigContainer.cs
- TrustLevelCollection.cs
- Int32CAMarshaler.cs
- Oid.cs
- MembershipAdapter.cs
- GridViewRowEventArgs.cs
- QilLoop.cs
- ConfigurationStrings.cs
- PathFigureCollection.cs
- FileCodeGroup.cs
- VirtualPathExtension.cs
- EventProvider.cs
- EnumBuilder.cs
- GridPatternIdentifiers.cs
- EllipseGeometry.cs
- RangeBase.cs
- StoreAnnotationsMap.cs
- ICspAsymmetricAlgorithm.cs
- dataSvcMapFileLoader.cs
- AutoCompleteStringCollection.cs
- BitmapDecoder.cs
- Internal.cs
- assemblycache.cs
- DependencyObjectValidator.cs
- CodeTypeDeclarationCollection.cs
- ErasingStroke.cs
- SHA256CryptoServiceProvider.cs
- BaseTreeIterator.cs
- SelectionWordBreaker.cs
- DataServiceRequest.cs
- ObjectDataSourceEventArgs.cs