Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / FaultContractAttribute.cs / 1 / FaultContractAttribute.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel { using System.Reflection; using System.ServiceModel.Security; using System.Net.Security; using System.ServiceModel.Description; [AttributeUsage(ServiceModelAttributeTargets.OperationContract, AllowMultiple = true, Inherited = false)] public sealed class FaultContractAttribute : Attribute { string action; string name; string ns; Type type; ProtectionLevel protectionLevel = ProtectionLevel.None; bool hasProtectionLevel = false; public FaultContractAttribute(Type detailType) { if (detailType == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("detailType")); this.type = detailType; } public Type DetailType { get { return this.type; } } public string Action { get { return this.action; } set { if (value == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("value"); this.action = value; } } public string Name { get { return this.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))); this.name = value; } } public string Namespace { get { return this.ns; } set { if (!string.IsNullOrEmpty(value)) NamingHelper.CheckUriProperty(value, "Namespace"); this.ns = value; } } 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
- CustomErrorsSection.cs
- XmlSchemaSimpleContent.cs
- OnOperation.cs
- DataGridViewLinkColumn.cs
- LoopExpression.cs
- ArraySegment.cs
- StylusEditingBehavior.cs
- DebugHandleTracker.cs
- FormViewUpdatedEventArgs.cs
- ConfigurationException.cs
- ToolBarButtonClickEvent.cs
- NumericExpr.cs
- GridViewUpdateEventArgs.cs
- DesignerHost.cs
- View.cs
- TransformerInfoCollection.cs
- ThicknessAnimationBase.cs
- ComplexPropertyEntry.cs
- DataSourceCacheDurationConverter.cs
- DecimalConstantAttribute.cs
- AssemblyCache.cs
- ClientScriptManager.cs
- InternalRelationshipCollection.cs
- UserControlDesigner.cs
- Oci.cs
- DbProviderManifest.cs
- SafeLibraryHandle.cs
- FixedNode.cs
- RectangleGeometry.cs
- RectValueSerializer.cs
- StylusPointPropertyUnit.cs
- WinEventHandler.cs
- DataSourceHelper.cs
- ServiceHttpHandlerFactory.cs
- CodeDelegateCreateExpression.cs
- Size.cs
- WebPartHeaderCloseVerb.cs
- ElapsedEventArgs.cs
- SelectionChangedEventArgs.cs
- remotingproxy.cs
- UnmanagedMemoryStream.cs
- SafeHandles.cs
- ContentValidator.cs
- Configuration.cs
- WinFormsUtils.cs
- ArrayListCollectionBase.cs
- CallTemplateAction.cs
- CustomValidator.cs
- ToggleProviderWrapper.cs
- PropertyInfoSet.cs
- SimpleRecyclingCache.cs
- PrintControllerWithStatusDialog.cs
- ColorConverter.cs
- Rect.cs
- HyperLinkStyle.cs
- SQLByteStorage.cs
- InteropAutomationProvider.cs
- TypeToTreeConverter.cs
- ConsumerConnectionPointCollection.cs
- StylusEventArgs.cs
- CompositeFontFamily.cs
- HierarchicalDataBoundControlAdapter.cs
- RegexCaptureCollection.cs
- CookieProtection.cs
- PrintController.cs
- isolationinterop.cs
- DecoderExceptionFallback.cs
- CodeEntryPointMethod.cs
- Binding.cs
- FilterQuery.cs
- EditingCoordinator.cs
- OLEDB_Util.cs
- DefaultTextStore.cs
- CharacterString.cs
- PrivilegedConfigurationManager.cs
- DrawTreeNodeEventArgs.cs
- WeakReferenceKey.cs
- SystemIPInterfaceStatistics.cs
- XmlSchemaCompilationSettings.cs
- WindowAutomationPeer.cs
- PointLight.cs
- NumericExpr.cs
- TdsParserStateObject.cs
- StreamWriter.cs
- UniqueEventHelper.cs
- PrimitiveDataContract.cs
- PersonalizationAdministration.cs
- WebPartRestoreVerb.cs
- File.cs
- DataList.cs
- ILGenerator.cs
- Stylesheet.cs
- DictationGrammar.cs
- XamlReader.cs
- UInt64Storage.cs
- PageRanges.cs
- ScaleTransform.cs
- precedingquery.cs
- VersionPair.cs
- LogRestartAreaEnumerator.cs