Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntityDesign / Design / System / Data / Entity / Design / PluralizationService / PluralizationService.cs / 1305376 / PluralizationService.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Globalization; using System.Data.Entity.Design.Common; namespace System.Data.Entity.Design.PluralizationServices { [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Pluralization")] public abstract class PluralizationService { public CultureInfo Culture { get; protected set; } public abstract bool IsPlural(string word); public abstract bool IsSingular(string word); public abstract string Pluralize(string word); public abstract string Singularize(string word); ////// Factory method for PluralizationService. Only support english pluralization. /// Please set the PluralizationService on the System.Data.Entity.Design.EntityModelSchemaGenerator /// to extend the service to other locales. /// /// CultureInfo ///PluralizationService public static PluralizationService CreateService(CultureInfo culture) { EDesignUtil.CheckArgumentNull(culture, "culture"); if (culture.TwoLetterISOLanguageName == "en") { return new EnglishPluralizationService(); } else { throw new NotImplementedException("We don't support locales other than english yet"); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Globalization; using System.Data.Entity.Design.Common; namespace System.Data.Entity.Design.PluralizationServices { [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Pluralization")] public abstract class PluralizationService { public CultureInfo Culture { get; protected set; } public abstract bool IsPlural(string word); public abstract bool IsSingular(string word); public abstract string Pluralize(string word); public abstract string Singularize(string word); ////// Factory method for PluralizationService. Only support english pluralization. /// Please set the PluralizationService on the System.Data.Entity.Design.EntityModelSchemaGenerator /// to extend the service to other locales. /// /// CultureInfo ///PluralizationService public static PluralizationService CreateService(CultureInfo culture) { EDesignUtil.CheckArgumentNull(culture, "culture"); if (culture.TwoLetterISOLanguageName == "en") { return new EnglishPluralizationService(); } else { throw new NotImplementedException("We don't support locales other than english yet"); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- EncryptedKey.cs
- SpeechSynthesizer.cs
- SoapFormatExtensions.cs
- _LazyAsyncResult.cs
- DesignTimeParseData.cs
- EncryptedKeyIdentifierClause.cs
- NotifyCollectionChangedEventArgs.cs
- PolicyValidator.cs
- PasswordTextNavigator.cs
- StrokeFIndices.cs
- DesigntimeLicenseContext.cs
- HashFinalRequest.cs
- PageRequestManager.cs
- HtmlGenericControl.cs
- SafeFindHandle.cs
- CompilationUnit.cs
- ActivationServices.cs
- GridViewSortEventArgs.cs
- EntityDataSourceChangedEventArgs.cs
- XhtmlTextWriter.cs
- DrawItemEvent.cs
- LogWriteRestartAreaAsyncResult.cs
- SqlServer2KCompatibilityCheck.cs
- CompilationPass2TaskInternal.cs
- DesignerActionPropertyItem.cs
- PolyQuadraticBezierSegment.cs
- ComponentConverter.cs
- EventLevel.cs
- CodeNamespaceImport.cs
- IdSpace.cs
- ThreadStaticAttribute.cs
- PageThemeParser.cs
- ObjectDataSourceFilteringEventArgs.cs
- EditorBrowsableAttribute.cs
- EndpointIdentityConverter.cs
- ZoneIdentityPermission.cs
- UpdatePanel.cs
- WebPartDisplayModeCollection.cs
- RelationshipDetailsRow.cs
- BitConverter.cs
- PropertyDescriptorGridEntry.cs
- SecondaryIndex.cs
- DoubleUtil.cs
- WorkflowServiceHost.cs
- TextHidden.cs
- FileSecurity.cs
- ExceptQueryOperator.cs
- HasCopySemanticsAttribute.cs
- DesignerVerb.cs
- CodeSubDirectory.cs
- ParamArrayAttribute.cs
- AppDomainManager.cs
- Site.cs
- HijriCalendar.cs
- Figure.cs
- MessageContractMemberAttribute.cs
- UnmanagedMarshal.cs
- PerfProviderCollection.cs
- XAMLParseException.cs
- LambdaCompiler.Statements.cs
- AssemblyUtil.cs
- XsltArgumentList.cs
- XmlTypeMapping.cs
- FamilyCollection.cs
- FloatMinMaxAggregationOperator.cs
- FirstMatchCodeGroup.cs
- XmlDictionaryWriter.cs
- Base64Encoder.cs
- ApplicationCommands.cs
- GrowingArray.cs
- NameValueCollection.cs
- DataGridRow.cs
- LabelLiteral.cs
- XmlUtf8RawTextWriter.cs
- Geometry.cs
- SoapProtocolImporter.cs
- BaseInfoTable.cs
- AssemblyNameUtility.cs
- BuildResultCache.cs
- Cursor.cs
- RelationshipType.cs
- CompiledIdentityConstraint.cs
- ManagementScope.cs
- SplitterPanelDesigner.cs
- ConvertEvent.cs
- MetabaseReader.cs
- EFTableProvider.cs
- Label.cs
- SiteOfOriginContainer.cs
- ThumbAutomationPeer.cs
- AssemblyInfo.cs
- RuntimeWrappedException.cs
- DoubleKeyFrameCollection.cs
- ConnectionPoint.cs
- Collection.cs
- ObjectConverter.cs
- CompilerParameters.cs
- IndexedEnumerable.cs
- DataGridViewCheckBoxColumn.cs
- RecordBuilder.cs