Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / NetFx35 / System.ServiceModel.Web / SR.cs / 1 / SR.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel { using System; using System.Reflection; using System.Globalization; using System.Resources; using System.Text; using System.ComponentModel; using System.Collections.Generic; using System.ServiceModel.Web; [AttributeUsage(AttributeTargets.All)] sealed class SR2DescriptionAttribute : DescriptionAttribute { public SR2DescriptionAttribute(string description) { DescriptionValue = SR2.ResourceManager.GetString(description, SR2.Culture); } public SR2DescriptionAttribute(string description, string resourceSet) { ResourceManager rm = new ResourceManager(resourceSet, Assembly.GetExecutingAssembly()); DescriptionValue = rm.GetString(description); Fx.Assert(DescriptionValue != null, string.Format(CultureInfo.CurrentCulture, "String resource {0} not found.", new object[] { description })); } } [AttributeUsage(AttributeTargets.All)] sealed class SR2CategoryAttribute : CategoryAttribute { string resourceSet = String.Empty; public SR2CategoryAttribute(string category) : base(category) { } public SR2CategoryAttribute(string category, string resourceSet) : base(category) { this.resourceSet = resourceSet; } protected override string GetLocalizedString(string value) { if (this.resourceSet.Length > 0) { ResourceManager rm = new ResourceManager(resourceSet, Assembly.GetExecutingAssembly()); String localizedString = rm.GetString(value); Fx.Assert(localizedString != null, string.Format(CultureInfo.CurrentCulture, "String resource {0} not found.", new object[] { value })); return localizedString; } else { return SR2.ResourceManager.GetString(value, SR2.Culture); } } } [AttributeUsage(AttributeTargets.All)] sealed class SR2DisplayNameAttribute : DisplayNameAttribute { public SR2DisplayNameAttribute(string name) { DisplayNameValue = SR2.ResourceManager.GetString(name, SR2.Culture); } public SR2DisplayNameAttribute(string name, string resourceSet) { ResourceManager rm = new ResourceManager(resourceSet, Assembly.GetExecutingAssembly()); DisplayNameValue = rm.GetString(name); Fx.Assert(DisplayNameValue != null, string.Format(CultureInfo.CurrentCulture, "String resource {0} not found.", new object[] { name })); } } ////// This is a stub for auto-generated resource class, providing GetString function. Usage: /// /// string s = SR2.GetString(SR2.MyIdenfitier); /// sealed partial class SR2 { internal static string GetString(string name, params object[] args) { return GetString(resourceCulture, name, args); } internal static string GetString(CultureInfo culture, string name, params object[] args) { if (args != null && args.Length > 0) { return string.Format(culture, name, args); } else { return name; } } } } // 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
- FormParameter.cs
- SelectionProviderWrapper.cs
- XmlDataCollection.cs
- JoinElimination.cs
- WaitForChangedResult.cs
- BindingListCollectionView.cs
- Camera.cs
- GenericQueueSurrogate.cs
- ThreadStateException.cs
- ArithmeticException.cs
- followingquery.cs
- NativeMethods.cs
- arclist.cs
- CngProvider.cs
- SourceElementsCollection.cs
- Internal.cs
- ObjectConverter.cs
- IApplicationTrustManager.cs
- DoubleAnimationUsingPath.cs
- MouseGestureValueSerializer.cs
- HtmlInputImage.cs
- TypefaceCollection.cs
- ArgumentException.cs
- DataStreamFromComStream.cs
- FormsAuthenticationCredentials.cs
- Point3DConverter.cs
- BaseTransportHeaders.cs
- QueryableFilterRepeater.cs
- ScrollBarAutomationPeer.cs
- OrderingQueryOperator.cs
- HttpConfigurationContext.cs
- HttpAsyncResult.cs
- ThemeDictionaryExtension.cs
- OracleBoolean.cs
- BrowserCapabilitiesFactoryBase.cs
- TypographyProperties.cs
- ContourSegment.cs
- XmlTypeMapping.cs
- XmlSchemaInfo.cs
- GroupAggregateExpr.cs
- DataBindingList.cs
- SynchronizationContext.cs
- TrustSection.cs
- UITypeEditor.cs
- PersonalizationStateQuery.cs
- SystemIPAddressInformation.cs
- DataGridViewCellPaintingEventArgs.cs
- cryptoapiTransform.cs
- CopyOnWriteList.cs
- ContractsBCL.cs
- StructureChangedEventArgs.cs
- WmfPlaceableFileHeader.cs
- QilCloneVisitor.cs
- DefaultHttpHandler.cs
- NativeMsmqMessage.cs
- StylusPlugin.cs
- _LoggingObject.cs
- ServiceOperation.cs
- AutomationAttributeInfo.cs
- MatrixCamera.cs
- InternalResources.cs
- PersonalizableTypeEntry.cs
- CompositeDataBoundControl.cs
- Util.cs
- FlowNode.cs
- Profiler.cs
- ThemeableAttribute.cs
- SecurityTokenResolver.cs
- TransactionManager.cs
- BitmapDecoder.cs
- WebPartCatalogAddVerb.cs
- DataTableReader.cs
- HttpBrowserCapabilitiesBase.cs
- ProcessHostMapPath.cs
- ColumnTypeConverter.cs
- CreateUserWizard.cs
- GridViewRow.cs
- CompositeCollectionView.cs
- ListenerElementsCollection.cs
- MarshalByRefObject.cs
- TrackingDataItem.cs
- PolicyChain.cs
- TimeoutException.cs
- DomainUpDown.cs
- PassportPrincipal.cs
- StorageEntitySetMapping.cs
- RegionIterator.cs
- ApplicationServicesHostFactory.cs
- PageSettings.cs
- MimeMapping.cs
- ExpressionPrefixAttribute.cs
- BindingElementCollection.cs
- NativeWindow.cs
- InvokeBinder.cs
- MaskDesignerDialog.cs
- PointCollection.cs
- State.cs
- VScrollProperties.cs
- TextHintingModeValidation.cs
- Matrix3DConverter.cs