Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / MessageContractMemberAttribute.cs / 1 / MessageContractMemberAttribute.cs
//------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
namespace System.ServiceModel
{
using System.Runtime.Serialization;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using System.ServiceModel.Security;
using System.Net.Security;
public abstract class MessageContractMemberAttribute : Attribute
{
string name;
string ns;
bool isNameSetExplicit;
bool isNamespaceSetExplicit;
ProtectionLevel protectionLevel = ProtectionLevel.None;
bool hasProtectionLevel = false;
internal const string NamespacePropertyName = "Namespace";
public string Namespace
{
get { return ns; }
set
{
if (value == null)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("value");
}
if (value.Length > 0)
{
NamingHelper.CheckUriProperty(value, "Namespace");
}
ns = value;
isNamespaceSetExplicit = true;
}
}
internal bool IsNamespaceSetExplicit
{
get { return isNamespaceSetExplicit; }
}
internal const string NamePropertyName = "Name";
public string Name
{
get { return name; }
set
{
if (value == null)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("value");
}
if (value == string.Empty)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value",
SR.GetString(SR.SFxNameCannotBeEmpty)));
}
name = value; isNameSetExplicit = true;
}
}
internal bool IsNameSetExplicit
{
get { return isNameSetExplicit; }
}
internal const string ProtectionLevelPropertyName = "ProtectionLevel";
public ProtectionLevel ProtectionLevel
{
get
{
return this.protectionLevel;
}
set
{
if (!ProtectionLevelHelper.IsDefined(value))
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value"));
this.protectionLevel = value;
this.hasProtectionLevel = true;
}
}
public bool HasProtectionLevel
{
get { return this.hasProtectionLevel; }
}
}
}
// 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
- CancellationToken.cs
- OdbcPermission.cs
- DataGridSortCommandEventArgs.cs
- XdrBuilder.cs
- BufferBuilder.cs
- ProjectedWrapper.cs
- SQLBoolean.cs
- Freezable.cs
- sqlinternaltransaction.cs
- ZipIOLocalFileDataDescriptor.cs
- SynchronizationLockException.cs
- TextParagraphCache.cs
- HeaderedContentControl.cs
- DelegateTypeInfo.cs
- ApplicationSecurityInfo.cs
- _AuthenticationState.cs
- SharedRuntimeState.cs
- DllNotFoundException.cs
- SafeProcessHandle.cs
- PinnedBufferMemoryStream.cs
- SafeNativeHandle.cs
- PolyBezierSegment.cs
- HebrewNumber.cs
- _HTTPDateParse.cs
- PermissionAttributes.cs
- ObjectDataSourceMethodEventArgs.cs
- PreProcessInputEventArgs.cs
- FontWeight.cs
- Stackframe.cs
- MergePropertyDescriptor.cs
- AppSettings.cs
- XmlnsDefinitionAttribute.cs
- SQLSingle.cs
- TextSchema.cs
- regiisutil.cs
- ItemContainerGenerator.cs
- webeventbuffer.cs
- ChannelFactoryRefCache.cs
- ResourcePool.cs
- PointIndependentAnimationStorage.cs
- SafeEventLogReadHandle.cs
- SQLString.cs
- StrongBox.cs
- MarkupExtensionParser.cs
- ObservableDictionary.cs
- MultiDataTrigger.cs
- AssemblyContextControlItem.cs
- EventDescriptorCollection.cs
- FacetValues.cs
- FormParameter.cs
- ObjectTag.cs
- DataGridAutoFormat.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- ResXResourceSet.cs
- ToolboxItem.cs
- OdbcEnvironment.cs
- DefaultPerformanceCounters.cs
- GridViewSelectEventArgs.cs
- PropertyGroupDescription.cs
- OrderedEnumerableRowCollection.cs
- WindowsFormsHost.cs
- LayoutDump.cs
- SymbolDocumentGenerator.cs
- AuthenticationConfig.cs
- ContentControl.cs
- RuleSetDialog.cs
- ErrorFormatterPage.cs
- HyperLinkField.cs
- CLRBindingWorker.cs
- EncoderParameters.cs
- OutputWindow.cs
- HttpChannelFactory.cs
- StreamDocument.cs
- SecuritySessionSecurityTokenAuthenticator.cs
- XmlCharCheckingWriter.cs
- ToolStripCodeDomSerializer.cs
- StringUtil.cs
- TextEditorThreadLocalStore.cs
- CommandValueSerializer.cs
- ObsoleteAttribute.cs
- PrePrepareMethodAttribute.cs
- InstanceData.cs
- CurrentChangingEventManager.cs
- TextTreeUndoUnit.cs
- XPathItem.cs
- Typography.cs
- PostBackOptions.cs
- ProxyElement.cs
- QilXmlReader.cs
- DataControlPagerLinkButton.cs
- CachedFontFace.cs
- Italic.cs
- LazyTextWriterCreator.cs
- BinaryParser.cs
- GroupBoxRenderer.cs
- EncryptedXml.cs
- PageCodeDomTreeGenerator.cs
- SchemaConstraints.cs
- DataTableReaderListener.cs
- ToolboxDataAttribute.cs