Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx35 / System.ServiceModel.Web / System / ServiceModel / WebHttpSecurity.cs / 1305376 / WebHttpSecurity.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel { using System.Runtime; using System.ServiceModel.Channels; using System.ComponentModel; public sealed class WebHttpSecurity { internal const WebHttpSecurityMode DefaultMode = WebHttpSecurityMode.None; WebHttpSecurityMode mode; HttpTransportSecurity transportSecurity; bool isModeSet; public WebHttpSecurity() { this.transportSecurity = new HttpTransportSecurity(); } public WebHttpSecurityMode Mode { get { return this.mode; } set { if (!WebHttpSecurityModeHelper.IsDefined(value)) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value")); } this.mode = value; this.isModeSet = true; } } internal bool IsModeSet { get { return this.isModeSet; } } public HttpTransportSecurity Transport { get { return this.transportSecurity; } set { this.transportSecurity = (value == null) ? new HttpTransportSecurity() : value; } } internal void DisableTransportAuthentication(HttpTransportBindingElement http) { this.transportSecurity.DisableTransportAuthentication(http); } internal void EnableTransportAuthentication(HttpTransportBindingElement http) { this.transportSecurity.ConfigureTransportAuthentication(http); } internal void EnableTransportSecurity(HttpsTransportBindingElement https) { this.transportSecurity.ConfigureTransportProtectionAndAuthentication(https); } internal bool InternalShouldSerialize() { return this.ShouldSerializeMode() || this.ShouldSerializeTransport(); } [EditorBrowsable(EditorBrowsableState.Never)] public bool ShouldSerializeMode() { return this.Mode != DefaultMode; } [EditorBrowsable(EditorBrowsableState.Never)] public bool ShouldSerializeTransport() { return this.Transport.InternalShouldSerialize(); } } } // 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
- XmlILTrace.cs
- ArrayMergeHelper.cs
- ValidationSummary.cs
- Vector3DAnimationUsingKeyFrames.cs
- ExcludePathInfo.cs
- TextBoxDesigner.cs
- TransformerTypeCollection.cs
- StreamGeometryContext.cs
- BoundField.cs
- ClassHandlersStore.cs
- CookieHandler.cs
- SqlTrackingService.cs
- WebBrowserBase.cs
- GridViewUpdatedEventArgs.cs
- ToolStripDropTargetManager.cs
- SoapIncludeAttribute.cs
- Merger.cs
- CodeMemberMethod.cs
- VBCodeProvider.cs
- ExpressionLexer.cs
- AnimationException.cs
- DataSysAttribute.cs
- DialogWindow.cs
- DictionaryBase.cs
- RequiredFieldValidator.cs
- CompensationToken.cs
- DragStartedEventArgs.cs
- Errors.cs
- ScrollChrome.cs
- UInt32.cs
- NotifyIcon.cs
- Propagator.cs
- PropertyTabChangedEvent.cs
- DependentList.cs
- ProfileInfo.cs
- Console.cs
- EventDescriptorCollection.cs
- SelectorItemAutomationPeer.cs
- ConsoleTraceListener.cs
- AnnouncementService.cs
- UnsafeNativeMethods.cs
- GeneralTransform3DGroup.cs
- SqlServices.cs
- TextParagraphView.cs
- Color.cs
- _ListenerRequestStream.cs
- ComPersistableTypeElementCollection.cs
- DataBinding.cs
- ButtonField.cs
- Geometry.cs
- ResourceKey.cs
- GradientStop.cs
- XsltFunctions.cs
- StructuredType.cs
- sitestring.cs
- MimeWriter.cs
- SqlWebEventProvider.cs
- JsonDeserializer.cs
- BinHexEncoder.cs
- Renderer.cs
- BooleanToVisibilityConverter.cs
- DBDataPermission.cs
- NullEntityWrapper.cs
- DataGridParentRows.cs
- NamedPipeAppDomainProtocolHandler.cs
- SQLDateTime.cs
- EdmFunction.cs
- CollectionViewGroupInternal.cs
- EntitySet.cs
- _emptywebproxy.cs
- ISFClipboardData.cs
- Point3DCollection.cs
- RSAPKCS1SignatureFormatter.cs
- TabItemAutomationPeer.cs
- MouseGestureConverter.cs
- ObjectPropertyMapping.cs
- CheckedPointers.cs
- RelativeSource.cs
- ScaleTransform.cs
- VarRefManager.cs
- UserControl.cs
- SweepDirectionValidation.cs
- PeerDefaultCustomResolverClient.cs
- SpecialNameAttribute.cs
- WindowsComboBox.cs
- SectionRecord.cs
- DependsOnAttribute.cs
- FormViewModeEventArgs.cs
- HwndHostAutomationPeer.cs
- QueryRewriter.cs
- SafeLocalMemHandle.cs
- ToolStripProgressBar.cs
- Margins.cs
- RegexInterpreter.cs
- UnsafeNetInfoNativeMethods.cs
- Screen.cs
- followingquery.cs
- TemplatePropertyEntry.cs
- AssociationSet.cs
- MetabaseServerConfig.cs