Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Configuration / EndpointAddressElementBase.cs / 1 / EndpointAddressElementBase.cs
//------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
namespace System.ServiceModel.Configuration
{
using System;
using System.ServiceModel;
using System.Configuration;
using System.ServiceModel.Channels;
using System.Xml;
public partial class EndpointAddressElementBase : ConfigurationElement
{
protected EndpointAddressElementBase()
{
}
[ConfigurationProperty(ConfigurationStrings.Address, DefaultValue = null, Options = ConfigurationPropertyOptions.IsRequired)]
public Uri Address
{
get {return (Uri) base[ConfigurationStrings.Address]; }
set {base[ConfigurationStrings.Address] = 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]; }
}
internal protected void Copy(EndpointAddressElementBase source)
{
if (this.IsReadOnly())
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(SR.GetString(SR.ConfigReadOnly)));
}
if (null == source)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("source");
}
this.Address = source.Address;
this.Headers.Headers = source.Headers.Headers;
PropertyInformationCollection properties = source.ElementInformation.Properties;
if (properties[ConfigurationStrings.Identity].ValueOrigin != PropertyValueOrigin.Default)
{
this.Identity.Copy(source.Identity);
}
}
public void InitializeFrom(EndpointAddress endpointAddress)
{
if (null == endpointAddress)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("endpointAddress");
}
this.Address = endpointAddress.Uri;
this.Headers.Headers = endpointAddress.Headers;
if (null != endpointAddress.Identity)
{
this.Identity.InitializeFrom(endpointAddress.Identity);
}
}
}
}
// 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
- HitTestFilterBehavior.cs
- ClientApiGenerator.cs
- Run.cs
- IdentityModelDictionary.cs
- CodeThrowExceptionStatement.cs
- OracleParameter.cs
- BindingWorker.cs
- WindowsListViewGroupHelper.cs
- SmiEventSink_DeferedProcessing.cs
- SynchronizedDispatch.cs
- UseAttributeSetsAction.cs
- KeyNameIdentifierClause.cs
- DateTimePicker.cs
- BamlLocalizableResourceKey.cs
- InvokeBase.cs
- RichTextBox.cs
- MimeMultiPart.cs
- PrivilegedConfigurationManager.cs
- ListViewAutomationPeer.cs
- SelectionRangeConverter.cs
- Model3DGroup.cs
- LifetimeServices.cs
- ClientTargetCollection.cs
- SafeThreadHandle.cs
- BinaryCommonClasses.cs
- SkinIDTypeConverter.cs
- ContentControl.cs
- cookiecontainer.cs
- Errors.cs
- LicenseManager.cs
- DataViewSetting.cs
- CurrentTimeZone.cs
- ClockGroup.cs
- SystemResourceHost.cs
- Matrix.cs
- Compress.cs
- InputMethodStateTypeInfo.cs
- VisualStyleRenderer.cs
- StateMachineSubscriptionManager.cs
- RegexRunner.cs
- ChineseLunisolarCalendar.cs
- WebPartUserCapability.cs
- WhitespaceReader.cs
- StatusBarDesigner.cs
- FacetEnabledSchemaElement.cs
- Error.cs
- controlskin.cs
- RefreshEventArgs.cs
- SByteConverter.cs
- WebPartZone.cs
- AttachmentCollection.cs
- EventLogSession.cs
- XmlElement.cs
- CompiledQuery.cs
- IPPacketInformation.cs
- EventRoute.cs
- CompilerParameters.cs
- RefType.cs
- VisualStyleRenderer.cs
- KeyboardEventArgs.cs
- ColorContext.cs
- DataRowCollection.cs
- DependentList.cs
- Exception.cs
- ServerProtocol.cs
- AttachmentService.cs
- DataGridDetailsPresenter.cs
- ListItemsPage.cs
- CheckedListBox.cs
- MergablePropertyAttribute.cs
- RowUpdatingEventArgs.cs
- _SslStream.cs
- ConsoleCancelEventArgs.cs
- CrossContextChannel.cs
- ThemeDictionaryExtension.cs
- Transform3DGroup.cs
- XmlCompatibilityReader.cs
- InputChannelBinder.cs
- CodeTypeDelegate.cs
- EpmCustomContentWriterNodeData.cs
- JoinCqlBlock.cs
- BaseValidatorDesigner.cs
- TakeQueryOptionExpression.cs
- DesignerValidatorAdapter.cs
- WebControlParameterProxy.cs
- FileDataSource.cs
- AdapterSwitches.cs
- TaskbarItemInfo.cs
- VolatileResourceManager.cs
- PartialCachingAttribute.cs
- ExpandableObjectConverter.cs
- PasswordPropertyTextAttribute.cs
- WebSysDisplayNameAttribute.cs
- IndexerNameAttribute.cs
- NameValueConfigurationElement.cs
- ZipArchive.cs
- CachedBitmap.cs
- webclient.cs
- CollectionViewGroup.cs
- BuildProvidersCompiler.cs