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
- ListItemConverter.cs
- PermissionAttributes.cs
- SoapFormatterSinks.cs
- Point4DConverter.cs
- SplayTreeNode.cs
- DiagnosticTrace.cs
- SQLInt64.cs
- filewebresponse.cs
- BaseTemplateCodeDomTreeGenerator.cs
- Converter.cs
- __ComObject.cs
- AutomationEventArgs.cs
- WorkflowDebuggerSteppingAttribute.cs
- TrustLevelCollection.cs
- ResourcePermissionBaseEntry.cs
- IODescriptionAttribute.cs
- TabControl.cs
- Image.cs
- XmlSerializationGeneratedCode.cs
- ReadOnlyAttribute.cs
- FilterElement.cs
- SamlAuthorizationDecisionClaimResource.cs
- ApplicationFileParser.cs
- StorageRoot.cs
- DataPager.cs
- StaticExtension.cs
- CachedPathData.cs
- RemotingSurrogateSelector.cs
- WindowsGraphics.cs
- DragDropManager.cs
- DesignerValidatorAdapter.cs
- DataGridViewCellCollection.cs
- ValidationError.cs
- MultiSelectRootGridEntry.cs
- UnhandledExceptionEventArgs.cs
- ProviderConnectionPointCollection.cs
- ConnectionsZone.cs
- PermissionSetEnumerator.cs
- AQNBuilder.cs
- BindingMAnagerBase.cs
- SmiSettersStream.cs
- _NTAuthentication.cs
- IIS7ConfigurationLoader.cs
- FileRegion.cs
- SuppressMessageAttribute.cs
- DispatchWrapper.cs
- MemberInfoSerializationHolder.cs
- VerticalAlignConverter.cs
- MetafileHeaderEmf.cs
- Operator.cs
- HotSpotCollection.cs
- XmlComplianceUtil.cs
- ScriptComponentDescriptor.cs
- DataGridViewColumnStateChangedEventArgs.cs
- DispatcherEventArgs.cs
- OdbcInfoMessageEvent.cs
- MouseCaptureWithinProperty.cs
- DataGridViewDataConnection.cs
- AutoFocusStyle.xaml.cs
- DataGridViewColumnCollection.cs
- ProviderConnectionPointCollection.cs
- CurrentChangingEventArgs.cs
- DTCTransactionManager.cs
- ExtractorMetadata.cs
- CharacterShapingProperties.cs
- ResXFileRef.cs
- BitmapEffectInput.cs
- StorageComplexTypeMapping.cs
- ExtentJoinTreeNode.cs
- GeneratedView.cs
- CodeIdentifiers.cs
- ValidationResult.cs
- TextServicesProperty.cs
- MenuRendererClassic.cs
- MasterPage.cs
- StdValidatorsAndConverters.cs
- FileRegion.cs
- List.cs
- LabelDesigner.cs
- sqlcontext.cs
- HttpCacheParams.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- Random.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- LayoutDump.cs
- RelatedImageListAttribute.cs
- SkewTransform.cs
- ArcSegment.cs
- SynchronousChannel.cs
- MasterPageBuildProvider.cs
- Exception.cs
- ToolStripControlHost.cs
- InvokeMethod.cs
- HttpCookiesSection.cs
- NamespaceEmitter.cs
- InputLangChangeRequestEvent.cs
- RenderData.cs
- FullTextLine.cs
- Reference.cs
- SqlClientFactory.cs