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
- DataTableClearEvent.cs
- Style.cs
- FileVersionInfo.cs
- CacheSection.cs
- XamlDesignerSerializationManager.cs
- InplaceBitmapMetadataWriter.cs
- DigitShape.cs
- FormViewModeEventArgs.cs
- XmlKeywords.cs
- LineVisual.cs
- XhtmlBasicControlAdapter.cs
- RuntimeWrappedException.cs
- TextCompositionManager.cs
- ExpressionBinding.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- EntitySqlQueryCacheEntry.cs
- PageWrapper.cs
- CursorInteropHelper.cs
- RuntimeConfigLKG.cs
- CodePrimitiveExpression.cs
- XmlChildNodes.cs
- IpcManager.cs
- PathStreamGeometryContext.cs
- RowToFieldTransformer.cs
- CatalogZoneAutoFormat.cs
- TimeIntervalCollection.cs
- Annotation.cs
- RTLAwareMessageBox.cs
- ItemsPanelTemplate.cs
- ExtendedPropertyDescriptor.cs
- StatusCommandUI.cs
- BamlStream.cs
- SoapIgnoreAttribute.cs
- DateTimeParse.cs
- SqlInternalConnectionTds.cs
- DataBindingHandlerAttribute.cs
- WizardPanel.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- autovalidator.cs
- CompilerLocalReference.cs
- HtmlMobileTextWriter.cs
- LostFocusEventManager.cs
- ZipIOBlockManager.cs
- CodeTypeReferenceCollection.cs
- DBCommand.cs
- ArgumentsParser.cs
- FramingFormat.cs
- SystemThemeKey.cs
- DataGridAutoFormat.cs
- ToolStripPanel.cs
- Geometry3D.cs
- BindableAttribute.cs
- ProcessHostServerConfig.cs
- FocusManager.cs
- xmlglyphRunInfo.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- BitmapImage.cs
- Screen.cs
- FileRegion.cs
- KeyTime.cs
- MulticastNotSupportedException.cs
- WeakKeyDictionary.cs
- SoapFault.cs
- XPathNodeIterator.cs
- PromptStyle.cs
- HiddenField.cs
- ReadOnlyKeyedCollection.cs
- CheckBox.cs
- LocalizabilityAttribute.cs
- DataListCommandEventArgs.cs
- InvalidFilterCriteriaException.cs
- DataServiceStreamResponse.cs
- BamlCollectionHolder.cs
- UnsafeNativeMethodsTablet.cs
- _ChunkParse.cs
- StringCollectionMarkupSerializer.cs
- ToolStripSplitStackLayout.cs
- DataControlImageButton.cs
- LicenseManager.cs
- DataConnectionHelper.cs
- NativeMethods.cs
- SafeNativeMethods.cs
- ZipIOBlockManager.cs
- DefaultWorkflowTransactionService.cs
- DesignerDataColumn.cs
- Boolean.cs
- ListBindingConverter.cs
- MenuTracker.cs
- securestring.cs
- CfgSemanticTag.cs
- DesignBindingEditor.cs
- ContentPosition.cs
- FileUtil.cs
- PropertyTabAttribute.cs
- DefaultCommandConverter.cs
- SessionEndingEventArgs.cs
- TagPrefixInfo.cs
- ApplicationInfo.cs
- Region.cs
- ObjectTag.cs