Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Configuration / ChannelEndpointElement.cs / 1 / ChannelEndpointElement.cs
//------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
namespace System.ServiceModel.Configuration
{
using System;
using System.ServiceModel.Channels;
using System.ServiceModel;
using System.Collections.Generic;
using System.Configuration;
using System.IdentityModel.Claims;
using System.IdentityModel.Policy;
using System.Security.Cryptography;
using System.ServiceModel.Configuration;
using System.Xml;
using System.Security;
public sealed partial class ChannelEndpointElement : ConfigurationElement, IConfigurationContextProviderInternal
{
///
/// Critical - stores information used in a security decision
///
[SecurityCritical]
EvaluationContextHelper contextHelper;
public ChannelEndpointElement() : base() { }
public ChannelEndpointElement(EndpointAddress address, string contractType)
: this()
{
if (address != null)
{
this.Address = address.Uri;
this.Headers.Headers = address.Headers;
if (null != address.Identity)
{
this.Identity.InitializeFrom(address.Identity);
}
}
this.Contract = contractType;
}
[ConfigurationProperty(ConfigurationStrings.Address, Options = ConfigurationPropertyOptions.None)]
public Uri Address
{
get {return (Uri) base[ConfigurationStrings.Address]; }
set {base[ConfigurationStrings.Address] = value; }
}
[ConfigurationProperty(ConfigurationStrings.BehaviorConfiguration, DefaultValue = "")]
[StringValidator(MinLength = 0)]
public string BehaviorConfiguration
{
get {return (string) base[ConfigurationStrings.BehaviorConfiguration]; }
set
{
if (String.IsNullOrEmpty(value))
{
value = String.Empty;
}
base[ConfigurationStrings.BehaviorConfiguration] = value;
}
}
[ConfigurationProperty(ConfigurationStrings.Binding, Options = ConfigurationPropertyOptions.IsRequired)]
[StringValidator(MinLength = 1)]
public string Binding
{
get {return (string) base[ConfigurationStrings.Binding]; }
set
{
if (string.IsNullOrEmpty(value))
{
value = string.Empty;
}
base[ConfigurationStrings.Binding] = value;
}
}
[ConfigurationProperty(ConfigurationStrings.BindingConfiguration, DefaultValue = "")]
[StringValidator(MinLength = 0)]
public string BindingConfiguration
{
get {return (string) base[ConfigurationStrings.BindingConfiguration]; }
set
{
if (string.IsNullOrEmpty(value))
{
value = string.Empty;
}
base[ConfigurationStrings.BindingConfiguration] = value;
}
}
[ConfigurationProperty(ConfigurationStrings.Contract, Options = ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey)]
[StringValidator(MinLength = 1)]
public string Contract
{
get {return (string) base[ConfigurationStrings.Contract]; }
set
{
if (String.IsNullOrEmpty(value))
{
value = String.Empty;
}
base[ConfigurationStrings.Contract] = value;
}
}
[ConfigurationProperty(ConfigurationStrings.Headers)]
public AddressHeaderCollectionElement Headers
{
get {return (AddressHeaderCollectionElement) base[ConfigurationStrings.Headers]; }
}
[ConfigurationProperty(ConfigurationStrings.Identity)]
public IdentityElement Identity
{
get {return (IdentityElement) base[ConfigurationStrings.Identity]; }
}
[ConfigurationProperty(ConfigurationStrings.Name, DefaultValue = "", Options = ConfigurationPropertyOptions.IsKey)]
[StringValidator(MinLength = 0)]
public string Name
{
get {return (string) base[ConfigurationStrings.Name]; }
set
{
if (string.IsNullOrEmpty(value))
{
value = string.Empty;
}
base[ConfigurationStrings.Name] = value;
}
}
///
/// Critical - accesses critical field contextHelper
///
[SecurityCritical]
protected override void Reset(ConfigurationElement parentElement)
{
this.contextHelper.OnReset(parentElement);
base.Reset(parentElement);
}
ContextInformation IConfigurationContextProviderInternal.GetEvaluationContext()
{
return this.EvaluationContext;
}
///
/// Critical -- accesses critical field contextHelper
/// RequiresReview -- the return value will be used for a security decision -- see comment in interface definition
///
[SecurityCritical]
ContextInformation IConfigurationContextProviderInternal.GetOriginalEvaluationContext()
{
return this.contextHelper.GetOriginalContext(this);
}
}
}
// 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
- FragmentQueryProcessor.cs
- CustomAttributeBuilder.cs
- AutomationPatternInfo.cs
- DataGridHeaderBorder.cs
- ContextMenuStripGroupCollection.cs
- Zone.cs
- MailWebEventProvider.cs
- MasterPageBuildProvider.cs
- HatchBrush.cs
- XslTransformFileEditor.cs
- RepeaterDesigner.cs
- ToolStripGripRenderEventArgs.cs
- DPAPIProtectedConfigurationProvider.cs
- KeyValueSerializer.cs
- GenericEnumConverter.cs
- StateDesigner.LayoutSelectionGlyph.cs
- SoapReflectionImporter.cs
- FontStretch.cs
- TagNameToTypeMapper.cs
- ValidationHelpers.cs
- SelectionEditor.cs
- ServerValidateEventArgs.cs
- XhtmlBasicCalendarAdapter.cs
- DeploymentSection.cs
- StylusTip.cs
- DesignerTextBoxAdapter.cs
- oledbconnectionstring.cs
- ToolStripPanelRow.cs
- ellipse.cs
- PerfService.cs
- RegexCompilationInfo.cs
- UInt64.cs
- OrthographicCamera.cs
- BamlVersionHeader.cs
- SendKeys.cs
- DeviceContext2.cs
- ActivationServices.cs
- SoapAttributeOverrides.cs
- TextDecorationCollectionConverter.cs
- SchemaSetCompiler.cs
- ContextMenu.cs
- SqlCacheDependencyDatabaseCollection.cs
- XhtmlBasicPageAdapter.cs
- OperatingSystem.cs
- WebPermission.cs
- DataGridColumnFloatingHeader.cs
- PeerPresenceInfo.cs
- Thumb.cs
- AttachmentService.cs
- TableCellCollection.cs
- HttpRawResponse.cs
- Message.cs
- ScriptingRoleServiceSection.cs
- ColumnPropertiesGroup.cs
- DataKey.cs
- ObjectStateEntry.cs
- ResourceContainer.cs
- ConfigXmlCDataSection.cs
- ScopeElementCollection.cs
- Native.cs
- TraceEventCache.cs
- MessageSecurityProtocol.cs
- DecoderExceptionFallback.cs
- TransactionFlowBindingElement.cs
- WebCategoryAttribute.cs
- MultiTouchSystemGestureLogic.cs
- PagePropertiesChangingEventArgs.cs
- SimpleType.cs
- DataTransferEventArgs.cs
- ObjectConverter.cs
- SqlExpander.cs
- XmlNodeChangedEventManager.cs
- _AuthenticationState.cs
- SystemSounds.cs
- ManagedWndProcTracker.cs
- wgx_commands.cs
- ProxyGenerationError.cs
- OptimalBreakSession.cs
- FastPropertyAccessor.cs
- DataGridViewCheckBoxCell.cs
- SafeUserTokenHandle.cs
- EntityDataSourceColumn.cs
- DataServiceProcessingPipelineEventArgs.cs
- StaticTextPointer.cs
- HMACSHA384.cs
- FontStretch.cs
- VirtualizingStackPanel.cs
- PolygonHotSpot.cs
- HttpListenerRequest.cs
- ServiceProviders.cs
- COM2TypeInfoProcessor.cs
- InfoCardRSAPKCS1KeyExchangeDeformatter.cs
- MimeTypeAttribute.cs
- PolicyValidationException.cs
- BindingWorker.cs
- KnownAssemblyEntry.cs
- SqlProfileProvider.cs
- EntityConnectionStringBuilder.cs
- BuildProvider.cs
- AsymmetricKeyExchangeFormatter.cs