Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / MessageContractAttribute.cs / 1 / MessageContractAttribute.cs
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------
namespace System.ServiceModel
{
using System.Reflection;
using System.ServiceModel.Channels;
using System.Net.Security;
using System.ServiceModel.Security;
using System.ServiceModel.Description;
[AttributeUsage(ServiceModelAttributeTargets.MessageContract, AllowMultiple = false)]
public sealed class MessageContractAttribute : Attribute
{
bool isWrapped = true;
string wrappedName;
string wrappedNs;
ProtectionLevel protectionLevel = ProtectionLevel.None;
bool hasProtectionLevel = false;
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; }
}
public bool IsWrapped
{
get { return isWrapped; }
set { isWrapped = value; }
}
public string WrapperName
{
get
{
return wrappedName;
}
set
{
if (value == null)
throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("value");
if (value == string.Empty)
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value",
SR.GetString(SR.SFxWrapperNameCannotBeEmpty)));
wrappedName = value;
}
}
public string WrapperNamespace
{
get
{
return wrappedNs;
}
set
{
if (!string.IsNullOrEmpty(value))
NamingHelper.CheckUriProperty(value, "WrapperNamespace");
wrappedNs = value;
}
}
}
}
// 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
- Substitution.cs
- RegexTypeEditor.cs
- MultipleViewProviderWrapper.cs
- PlainXmlSerializer.cs
- EpmContentSerializer.cs
- PropertyEmitter.cs
- KerberosSecurityTokenAuthenticator.cs
- SqlRewriteScalarSubqueries.cs
- GlobalItem.cs
- CharEntityEncoderFallback.cs
- Comparer.cs
- RC2CryptoServiceProvider.cs
- StrongNameMembershipCondition.cs
- XmlSchemaInferenceException.cs
- WebPartsSection.cs
- ConfigurationValidatorBase.cs
- TextEditorLists.cs
- InputQueue.cs
- ValuePattern.cs
- CollectionViewSource.cs
- AsyncParams.cs
- TrackBarRenderer.cs
- SoapProtocolReflector.cs
- ToolStripItemEventArgs.cs
- DrawingServices.cs
- ArrayList.cs
- PaperSource.cs
- InfoCardRSACryptoProvider.cs
- SystemThemeKey.cs
- XmlValidatingReaderImpl.cs
- CodeDomDesignerLoader.cs
- ReachSerializationCacheItems.cs
- WeakEventManager.cs
- ResourceExpression.cs
- GenericPrincipal.cs
- FilterElement.cs
- HtmlInputRadioButton.cs
- CatalogZoneDesigner.cs
- EmbeddedMailObject.cs
- CaseInsensitiveHashCodeProvider.cs
- ResourceDisplayNameAttribute.cs
- CurrentChangedEventManager.cs
- XmlSchemaDocumentation.cs
- _FtpControlStream.cs
- DetailsViewPagerRow.cs
- Tokenizer.cs
- baseaxisquery.cs
- ListControl.cs
- GenerateHelper.cs
- PropertyPath.cs
- ObservableDictionary.cs
- ASCIIEncoding.cs
- ResourceReferenceExpression.cs
- EventListener.cs
- PresentationTraceSources.cs
- BuildManager.cs
- RadioButtonAutomationPeer.cs
- FixedSOMPageElement.cs
- WebPartDisplayModeCancelEventArgs.cs
- XmlMemberMapping.cs
- HttpWrapper.cs
- EditorOptionAttribute.cs
- SoapElementAttribute.cs
- DesignerDataStoredProcedure.cs
- Formatter.cs
- InternalConfigHost.cs
- SafeFileHandle.cs
- Geometry.cs
- SelectedCellsCollection.cs
- Verify.cs
- FixUpCollection.cs
- PositiveTimeSpanValidator.cs
- MetadataElement.cs
- InitializingNewItemEventArgs.cs
- LayoutEvent.cs
- ImageDrawing.cs
- ButtonField.cs
- UserControl.cs
- TimeManager.cs
- GenerateScriptTypeAttribute.cs
- WebConfigurationHostFileChange.cs
- ColumnHeaderConverter.cs
- ExpressionPrinter.cs
- SrgsRule.cs
- CombinedTcpChannel.cs
- EmptyReadOnlyDictionaryInternal.cs
- UInt16.cs
- QilChoice.cs
- SimpleWebHandlerParser.cs
- ReceiveContextCollection.cs
- RowTypeElement.cs
- TextTreeTextNode.cs
- TrustLevelCollection.cs
- NavigationService.cs
- RoutedCommand.cs
- WmlControlAdapter.cs
- LayoutDump.cs
- DelegatingConfigHost.cs
- Reference.cs
- AttachedAnnotation.cs