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
- DataControlExtensions.cs
- _OverlappedAsyncResult.cs
- Lock.cs
- CodeExporter.cs
- ModelEditingScope.cs
- _SecureChannel.cs
- WindowsNonControl.cs
- SocketElement.cs
- SubclassTypeValidatorAttribute.cs
- SqlParameterizer.cs
- PersistencePipeline.cs
- CfgParser.cs
- TimeoutHelper.cs
- MarshalByRefObject.cs
- EntityDataReader.cs
- TextServicesHost.cs
- AuthStoreRoleProvider.cs
- ColumnResizeAdorner.cs
- InputBinder.cs
- ConstraintStruct.cs
- ImageButton.cs
- TextBox.cs
- PrintPreviewGraphics.cs
- RenderData.cs
- BamlLocalizableResourceKey.cs
- PrintControllerWithStatusDialog.cs
- ImageAutomationPeer.cs
- HostElement.cs
- InternalPermissions.cs
- BitmapFrameDecode.cs
- ElementAction.cs
- AutomationTextAttribute.cs
- HtmlFormParameterWriter.cs
- DebugView.cs
- LogManagementAsyncResult.cs
- SymLanguageVendor.cs
- HtmlInputReset.cs
- FormViewUpdateEventArgs.cs
- RangeValueProviderWrapper.cs
- ProfileServiceManager.cs
- GifBitmapDecoder.cs
- DataPagerField.cs
- XmlUnspecifiedAttribute.cs
- SpecularMaterial.cs
- XmlArrayItemAttribute.cs
- DataSourceHelper.cs
- MemberPath.cs
- Control.cs
- EmptyImpersonationContext.cs
- SqlFactory.cs
- IndependentlyAnimatedPropertyMetadata.cs
- handlecollector.cs
- CompositionTarget.cs
- DBNull.cs
- RC2.cs
- RegexCompiler.cs
- ObjectDataProvider.cs
- ScriptModule.cs
- MenuItemAutomationPeer.cs
- ExpressionEditor.cs
- XsltContext.cs
- EditingCoordinator.cs
- Size3DConverter.cs
- DataSetViewSchema.cs
- BitmapEffectInput.cs
- MobileUserControlDesigner.cs
- XPathItem.cs
- InternalBase.cs
- XamlGridLengthSerializer.cs
- ResourceExpression.cs
- PackageDigitalSignature.cs
- GridViewRowEventArgs.cs
- CompositeDispatchFormatter.cs
- BreakRecordTable.cs
- IconConverter.cs
- XmlReaderSettings.cs
- AttributeUsageAttribute.cs
- GenerateTemporaryAssemblyTask.cs
- AssociationType.cs
- Signature.cs
- DataViewManagerListItemTypeDescriptor.cs
- GregorianCalendarHelper.cs
- WindowsImpersonationContext.cs
- securitymgrsite.cs
- GPRECTF.cs
- QuaternionRotation3D.cs
- CollectionTypeElement.cs
- GenericPrincipal.cs
- WebUtil.cs
- PageAdapter.cs
- MessageBox.cs
- NotificationContext.cs
- ConfigurationFileMap.cs
- WindowsTab.cs
- Point3D.cs
- ListViewGroupItemCollection.cs
- querybuilder.cs
- DoubleAnimationBase.cs
- WebPartConnectionsConfigureVerb.cs
- BatchParser.cs