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
- StateBag.cs
- ResourcesGenerator.cs
- TablePatternIdentifiers.cs
- DBBindings.cs
- XmlSchemaInclude.cs
- XamlPointCollectionSerializer.cs
- DbTypeMap.cs
- ACL.cs
- dsa.cs
- IntegerValidatorAttribute.cs
- AttachedPropertyInfo.cs
- VectorCollection.cs
- ByteKeyFrameCollection.cs
- Variable.cs
- ValidationError.cs
- TimeSpanValidatorAttribute.cs
- UIElementCollection.cs
- HttpServerVarsCollection.cs
- AdapterSwitches.cs
- SpeechRecognitionEngine.cs
- MissingSatelliteAssemblyException.cs
- DropSourceBehavior.cs
- CodeAttributeDeclaration.cs
- ListControlBuilder.cs
- TrackBarRenderer.cs
- InfoCard.cs
- QuaternionKeyFrameCollection.cs
- RectangleGeometry.cs
- ColorAnimation.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- SecurityElement.cs
- precedingsibling.cs
- NonSerializedAttribute.cs
- AutomationAttributeInfo.cs
- MasterPageParser.cs
- ResourceProviderFactory.cs
- HtmlFormParameterWriter.cs
- RowTypeElement.cs
- NewItemsContextMenuStrip.cs
- webeventbuffer.cs
- StateDesigner.LayoutSelectionGlyph.cs
- DictionaryBase.cs
- MediaContext.cs
- _DynamicWinsockMethods.cs
- DataGridViewCellStateChangedEventArgs.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- ViewStateModeByIdAttribute.cs
- ApplicationTrust.cs
- SelectionRange.cs
- DataGridViewComboBoxCell.cs
- PropertyCondition.cs
- SynchronizedInputHelper.cs
- UnsafeCollabNativeMethods.cs
- httpapplicationstate.cs
- CodePageUtils.cs
- GeneralTransform3DTo2D.cs
- ColorTranslator.cs
- InputMethod.cs
- QilVisitor.cs
- ProgressBar.cs
- SqlRowUpdatedEvent.cs
- XamlPointCollectionSerializer.cs
- BooleanAnimationBase.cs
- X509UI.cs
- DataGridHeaderBorder.cs
- AccessKeyManager.cs
- RegexCompiler.cs
- webeventbuffer.cs
- ProviderSettings.cs
- FixUp.cs
- SQLDecimal.cs
- ReaderWriterLock.cs
- ReadOnlyTernaryTree.cs
- GenericUriParser.cs
- StructuredProperty.cs
- SafeArrayRankMismatchException.cs
- Avt.cs
- ChtmlFormAdapter.cs
- NullExtension.cs
- IntPtr.cs
- TextBlockAutomationPeer.cs
- MimeWriter.cs
- AspNetSynchronizationContext.cs
- AtomContentProperty.cs
- DynamicMetaObject.cs
- ExtendedProperty.cs
- FileDialog.cs
- ObjectDataSourceSelectingEventArgs.cs
- SizeLimitedCache.cs
- Track.cs
- PropertyInformation.cs
- DateTimeConverter.cs
- TextViewElement.cs
- NetworkAddressChange.cs
- CustomCredentialPolicy.cs
- XmlNamespaceMapping.cs
- XmlReader.cs
- DescendantOverDescendantQuery.cs
- XmlAttributes.cs
- HwndSource.cs