Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Configuration / WindowsStreamSecurityElement.cs / 1 / WindowsStreamSecurityElement.cs
//------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
namespace System.ServiceModel.Configuration
{
using System.ComponentModel;
using System.Configuration;
using System.Globalization;
using System.Net.Security;
using System.Text;
using System.ServiceModel.Channels;
public sealed partial class WindowsStreamSecurityElement : BindingElementExtensionElement
{
public WindowsStreamSecurityElement()
{
}
[ConfigurationProperty(ConfigurationStrings.ProtectionLevel, DefaultValue = ConnectionOrientedTransportDefaults.ProtectionLevel)]
[StandardRuntimeEnumValidator(typeof(ProtectionLevel))]
public ProtectionLevel ProtectionLevel
{
get { return (ProtectionLevel)base[ConfigurationStrings.ProtectionLevel]; }
set { base[ConfigurationStrings.ProtectionLevel] = value; }
}
public override void ApplyConfiguration(BindingElement bindingElement)
{
base.ApplyConfiguration(bindingElement);
WindowsStreamSecurityBindingElement windowsBindingElement =
(WindowsStreamSecurityBindingElement)bindingElement;
windowsBindingElement.ProtectionLevel = this.ProtectionLevel;
}
protected internal override BindingElement CreateBindingElement()
{
WindowsStreamSecurityBindingElement windowsBindingElement
= new WindowsStreamSecurityBindingElement();
this.ApplyConfiguration(windowsBindingElement);
return windowsBindingElement;
}
public override Type BindingElementType
{
get { return typeof(WindowsStreamSecurityBindingElement); }
}
public override void CopyFrom(ServiceModelExtensionElement from)
{
base.CopyFrom(from);
WindowsStreamSecurityElement source = (WindowsStreamSecurityElement)from;
#pragma warning suppress 56506 // [....], base.CopyFrom() validates the argument
this.ProtectionLevel = source.ProtectionLevel;
}
protected internal override void InitializeFrom(BindingElement bindingElement)
{
base.InitializeFrom(bindingElement);
WindowsStreamSecurityBindingElement windowsBindingElement
= (WindowsStreamSecurityBindingElement)bindingElement;
this.ProtectionLevel = windowsBindingElement.ProtectionLevel;
}
}
}
// 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
- AttachedProperty.cs
- TypeDependencyAttribute.cs
- selecteditemcollection.cs
- DeadCharTextComposition.cs
- DecoderReplacementFallback.cs
- MultiView.cs
- Tokenizer.cs
- SpoolingTaskBase.cs
- FileCodeGroup.cs
- Constraint.cs
- ConstructorBuilder.cs
- CorrelationManager.cs
- ContentPlaceHolder.cs
- SqlRowUpdatedEvent.cs
- IntranetCredentialPolicy.cs
- HostingEnvironmentException.cs
- GenericUriParser.cs
- ComPlusDiagnosticTraceSchemas.cs
- SiteMembershipCondition.cs
- Cursors.cs
- QueryPageSettingsEventArgs.cs
- Update.cs
- CookielessData.cs
- PublisherIdentityPermission.cs
- ComponentCollection.cs
- ResourceManager.cs
- AppDomainProtocolHandler.cs
- NullableBoolConverter.cs
- TextElementEnumerator.cs
- ReferencedType.cs
- SymmetricSecurityProtocolFactory.cs
- Subtree.cs
- TableLayoutPanelBehavior.cs
- GlobalDataBindingHandler.cs
- BaseHashHelper.cs
- DocumentApplication.cs
- Zone.cs
- OraclePermissionAttribute.cs
- ClockGroup.cs
- WindowsRichEdit.cs
- HttpRequestCacheValidator.cs
- JsonReader.cs
- DataTablePropertyDescriptor.cs
- OleDbParameter.cs
- TokenBasedSetEnumerator.cs
- Binding.cs
- OracleRowUpdatedEventArgs.cs
- MenuItem.cs
- PersistChildrenAttribute.cs
- GridViewPageEventArgs.cs
- VersionPair.cs
- ClassValidator.cs
- DynamicResourceExtension.cs
- SimpleType.cs
- CodeExporter.cs
- RowsCopiedEventArgs.cs
- PropertyChangedEventArgs.cs
- TextParagraphProperties.cs
- DeflateEmulationStream.cs
- ClientSideProviderDescription.cs
- TextRangeAdaptor.cs
- StreamSecurityUpgradeProvider.cs
- Margins.cs
- GlyphingCache.cs
- File.cs
- xdrvalidator.cs
- WebPartZoneBase.cs
- CorrelationQueryBehavior.cs
- StartUpEventArgs.cs
- DatagridviewDisplayedBandsData.cs
- InternalBufferOverflowException.cs
- DataTableNewRowEvent.cs
- _ListenerResponseStream.cs
- XmlBufferReader.cs
- FunctionParameter.cs
- TabControlEvent.cs
- Application.cs
- InstanceCreationEditor.cs
- WebPartTransformerAttribute.cs
- WithStatement.cs
- XmlEntityReference.cs
- FixedPageStructure.cs
- CqlGenerator.cs
- BitStream.cs
- ValueConversionAttribute.cs
- ClonableStack.cs
- PolygonHotSpot.cs
- XmlObjectSerializerReadContextComplex.cs
- DBDataPermissionAttribute.cs
- ClientRolePrincipal.cs
- ECDiffieHellmanCngPublicKey.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- List.cs
- CommandID.cs
- AddressAccessDeniedException.cs
- Image.cs
- WaitHandleCannotBeOpenedException.cs
- ViewPort3D.cs
- TextProviderWrapper.cs
- HideDisabledControlAdapter.cs