Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / ServiceContractAttribute.cs / 1 / ServiceContractAttribute.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel { using System; using System.ServiceModel.Description; using System.Transactions; using System.ServiceModel.Channels; using System.Runtime.CompilerServices; using System.Net.Security; using System.ServiceModel.Security; [AttributeUsage(ServiceModelAttributeTargets.ServiceContract, Inherited = false, AllowMultiple = false)] public sealed class ServiceContractAttribute : Attribute { Type callbackContract = null; string configurationName; string name; string ns; SessionMode sessionMode; ProtectionLevel protectionLevel = ProtectionLevel.None; bool hasProtectionLevel = false; public string ConfigurationName { get { return this.configurationName; } set { if (value == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("value"); } if (value == string.Empty) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value", SR.GetString(SR.SFxConfigurationNameCannotBeEmpty))); } this.configurationName = value; } } 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; } } public string Namespace { get { return ns; } set { if (!string.IsNullOrEmpty(value)) NamingHelper.CheckUriProperty(value, "Namespace"); ns = value; } } 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 SessionMode SessionMode { get { return this.sessionMode; } set { if (!SessionModeHelper.IsDefined(value)) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("value")); } this.sessionMode = value; } } public Type CallbackContract { get { return this.callbackContract; } set { this.callbackContract = 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
- DropShadowBitmapEffect.cs
- ConsumerConnectionPoint.cs
- ListViewDeletedEventArgs.cs
- ArcSegment.cs
- BrowserCapabilitiesCompiler.cs
- NativeObjectSecurity.cs
- WindowsScroll.cs
- RadioButton.cs
- BamlBinaryReader.cs
- GZipStream.cs
- CompilationUtil.cs
- TargetParameterCountException.cs
- HtmlHead.cs
- PngBitmapDecoder.cs
- SystemDropShadowChrome.cs
- MD5.cs
- DataGridViewSelectedCellCollection.cs
- CLSCompliantAttribute.cs
- OracleException.cs
- Inflater.cs
- ListViewItem.cs
- RequiredFieldValidator.cs
- XPathConvert.cs
- RootBrowserWindowProxy.cs
- Int32EqualityComparer.cs
- XmlNamespaceMapping.cs
- HijriCalendar.cs
- Int32AnimationUsingKeyFrames.cs
- TraceListener.cs
- ReliableDuplexSessionChannel.cs
- PackageDigitalSignature.cs
- ReversePositionQuery.cs
- InspectionWorker.cs
- WindowsFont.cs
- IntSecurity.cs
- CellParagraph.cs
- OrElse.cs
- ResourceSet.cs
- SimpleApplicationHost.cs
- MessageVersionConverter.cs
- BaseTemplateBuildProvider.cs
- CommandDevice.cs
- ConnectionPoint.cs
- WebPartConnectionCollection.cs
- GridViewColumnHeaderAutomationPeer.cs
- ProcessInfo.cs
- Calendar.cs
- ControlPaint.cs
- MaskInputRejectedEventArgs.cs
- TableLayoutColumnStyleCollection.cs
- DataGridTableStyleMappingNameEditor.cs
- DataSetViewSchema.cs
- RightsManagementEncryptionTransform.cs
- EncryptedReference.cs
- Mapping.cs
- IndicCharClassifier.cs
- X509InitiatorCertificateClientElement.cs
- ObjectDataSourceStatusEventArgs.cs
- TargetParameterCountException.cs
- PathTooLongException.cs
- MenuTracker.cs
- FromRequest.cs
- SendActivity.cs
- RoutedEventArgs.cs
- SQLBinaryStorage.cs
- WorkflowValidationFailedException.cs
- LabelLiteral.cs
- Activity.cs
- HttpRequest.cs
- XpsFontSubsetter.cs
- HashHelper.cs
- ObjectListItem.cs
- IntSecurity.cs
- PermissionRequestEvidence.cs
- NumberSubstitution.cs
- DesignerView.xaml.cs
- DefaultPropertyAttribute.cs
- CodeGroup.cs
- SmiGettersStream.cs
- MetafileHeader.cs
- WithParamAction.cs
- PerformanceCounterCategory.cs
- IntSecurity.cs
- XmlText.cs
- ActivityTrace.cs
- SiteMapDataSource.cs
- AnnotationStore.cs
- DataBoundControlAdapter.cs
- MenuItemCollection.cs
- EmissiveMaterial.cs
- Matrix.cs
- ImageButton.cs
- DynamicDiscoSearcher.cs
- BamlBinaryReader.cs
- MasterPage.cs
- ApplicationException.cs
- PreservationFileWriter.cs
- ZoneMembershipCondition.cs
- Parsers.cs
- DataKey.cs