Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / FaultReasonText.cs / 1 / FaultReasonText.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel { using System.Globalization; using System.Threading; public class FaultReasonText { string xmlLang; string text; public FaultReasonText(string text) { if (text == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("text")); this.text = text; this.xmlLang = CultureInfo.CurrentCulture.Name; } public FaultReasonText(string text, string xmlLang) { if (text == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("text")); if (xmlLang == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("xmlLang")); this.text = text; this.xmlLang = xmlLang; } public FaultReasonText(string text, CultureInfo cultureInfo) { if (text == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("text")); if (cultureInfo == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("cultureInfo")); this.text = text; this.xmlLang = cultureInfo.Name; } public bool Matches(CultureInfo cultureInfo) { if (cultureInfo == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("cultureInfo")); return xmlLang == cultureInfo.Name; } public string XmlLang { get { return xmlLang; } } public string Text { get { return text; } } } } // 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
- DescendantBaseQuery.cs
- AuthorizationRuleCollection.cs
- ItemDragEvent.cs
- MembershipValidatePasswordEventArgs.cs
- XmlSchema.cs
- QilReplaceVisitor.cs
- ListBoxItem.cs
- EventDescriptor.cs
- WindowsPrincipal.cs
- IntegerValidatorAttribute.cs
- Int16Animation.cs
- QueryCacheEntry.cs
- XmlSchemaSimpleTypeRestriction.cs
- ReaderWriterLock.cs
- ConnectionStringsExpressionBuilder.cs
- TokenBasedSetEnumerator.cs
- IntegerCollectionEditor.cs
- XmlDataImplementation.cs
- ProxySimple.cs
- AncestorChangedEventArgs.cs
- DispatcherExceptionFilterEventArgs.cs
- ADConnectionHelper.cs
- ServiceControllerDesigner.cs
- FontConverter.cs
- StoryFragments.cs
- IdentitySection.cs
- MenuRenderer.cs
- PersistNameAttribute.cs
- TextEndOfLine.cs
- MimeMapping.cs
- ExternalException.cs
- ObjectStateFormatter.cs
- StaticExtension.cs
- ActionItem.cs
- SelectorItemAutomationPeer.cs
- BuildDependencySet.cs
- _AutoWebProxyScriptHelper.cs
- NetworkInterface.cs
- ActivityValidator.cs
- WebPartRestoreVerb.cs
- Clause.cs
- BinaryFormatterWriter.cs
- KeyedCollection.cs
- RequestCache.cs
- HttpStreamMessageEncoderFactory.cs
- QuaternionAnimation.cs
- CLSCompliantAttribute.cs
- RelationshipEndMember.cs
- TextSimpleMarkerProperties.cs
- PrintPreviewControl.cs
- StrokeNodeOperations.cs
- x509utils.cs
- ToolStripContextMenu.cs
- ParseChildrenAsPropertiesAttribute.cs
- RelatedPropertyManager.cs
- CodeCompileUnit.cs
- UserControlAutomationPeer.cs
- BitmapFrameDecode.cs
- OdbcErrorCollection.cs
- WebPartZone.cs
- DataKey.cs
- NavigationProgressEventArgs.cs
- PathGradientBrush.cs
- ControlDesigner.cs
- StringFunctions.cs
- ToolStripItemCollection.cs
- IChannel.cs
- MergeFailedEvent.cs
- ExternalException.cs
- ConfigurationPropertyCollection.cs
- XmlEntity.cs
- SrgsItemList.cs
- Point4D.cs
- SafeRegistryHandle.cs
- IdentityHolder.cs
- ProvidePropertyAttribute.cs
- TraceProvider.cs
- MediaPlayerState.cs
- METAHEADER.cs
- BamlLocalizableResource.cs
- AddValidationError.cs
- VersionPair.cs
- IISUnsafeMethods.cs
- PageParserFilter.cs
- DataGridViewTextBoxColumn.cs
- ParameterEditorUserControl.cs
- ScriptResourceMapping.cs
- Formatter.cs
- ImageListStreamer.cs
- DiscardableAttribute.cs
- BitSet.cs
- MetadataCacheItem.cs
- InkSerializer.cs
- CodePropertyReferenceExpression.cs
- PageRanges.cs
- LinkUtilities.cs
- MediaPlayer.cs
- HexParser.cs
- SignatureHelper.cs
- XmlSchemaResource.cs