Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / clr / src / BCL / System / Globalization / EncodingDataItem.cs / 1 / EncodingDataItem.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== namespace System.Globalization { using System.Text; using System.Runtime.Remoting; using System; // // Data item for EncodingTable. Along with EncodingTable, they are used by // System.Text.Encoding. // // This class stores a pointer to the internal data and the index into that data // where our required information is found. We load the code page, flags and uiFamilyCodePage // immediately because they don't require creating an object. Creating any of the string // names is delayed until somebody actually asks for them and the names are then cached. [Serializable()] internal class CodePageDataItem { internal int m_dataIndex; internal int m_codePage; // UNUSED -- Kept for Everett serialization internal int m_uiFamilyCodePage; internal String m_webName; internal String m_headerName; internal String m_bodyName; internal String m_description; // UNUSED -- Kept for Everett serialization internal uint m_flags; unsafe internal CodePageDataItem(int dataIndex) { m_dataIndex = dataIndex; m_codePage = 0; // UNUSED -- Kept for Everett Serialization, but we always serialize a null object m_uiFamilyCodePage = EncodingTable.codePageDataPtr[dataIndex].uiFamilyCodePage; m_webName=null; m_headerName=null; m_bodyName=null; m_description=null; // UNUSED -- Kept for Everett serialization m_flags = EncodingTable.codePageDataPtr[dataIndex].flags; } virtual unsafe public String WebName { get { if (m_webName==null) { m_webName = new String(EncodingTable.codePageDataPtr[m_dataIndex].webName); } return m_webName; } } public virtual int UIFamilyCodePage { get { return m_uiFamilyCodePage; } } virtual unsafe public String HeaderName { get { if (m_headerName==null) { m_headerName = new String(EncodingTable.codePageDataPtr[m_dataIndex].headerName); } return m_headerName; } } virtual unsafe public String BodyName { get { if (m_bodyName==null) { m_bodyName = new String(EncodingTable.codePageDataPtr[m_dataIndex].bodyName); } return m_bodyName; } } virtual unsafe public uint Flags { get { return (m_flags); } } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ViewStateModeByIdAttribute.cs
- FileSystemEventArgs.cs
- XmlDataProvider.cs
- NetTcpBinding.cs
- EndpointNotFoundException.cs
- DecodeHelper.cs
- DynamicDocumentPaginator.cs
- sortedlist.cs
- WebScriptServiceHostFactory.cs
- MembershipValidatePasswordEventArgs.cs
- DoubleLink.cs
- SoapSchemaImporter.cs
- MinimizableAttributeTypeConverter.cs
- URI.cs
- PointAnimationClockResource.cs
- PromptStyle.cs
- AlphabeticalEnumConverter.cs
- UniqueEventHelper.cs
- VersionedStream.cs
- WebPartZoneCollection.cs
- ReliabilityContractAttribute.cs
- DateTimeOffset.cs
- InternalResources.cs
- SqlDelegatedTransaction.cs
- EncoderReplacementFallback.cs
- OutputScope.cs
- DataServiceRequest.cs
- DrawingImage.cs
- TemplateBindingExpressionConverter.cs
- WinEventTracker.cs
- SaveCardRequest.cs
- SoapObjectReader.cs
- HtmlGenericControl.cs
- _PooledStream.cs
- ReturnType.cs
- CatalogPartChrome.cs
- CheckBoxList.cs
- ExtenderControl.cs
- MetadataUtilsSmi.cs
- XmlILIndex.cs
- TemplateNameScope.cs
- StateDesignerConnector.cs
- XXXInfos.cs
- SoundPlayer.cs
- InputMethodStateChangeEventArgs.cs
- MatcherBuilder.cs
- Convert.cs
- XmlDictionary.cs
- ConfigDefinitionUpdates.cs
- SoapFault.cs
- QueryExpr.cs
- Button.cs
- FontFamilyConverter.cs
- ValuePattern.cs
- ClusterUtils.cs
- XmlSerializerOperationFormatter.cs
- ImageKeyConverter.cs
- ExtendedTransformFactory.cs
- MemoryRecordBuffer.cs
- TextDataBindingHandler.cs
- EntityDataSourceWizardForm.cs
- EdmComplexTypeAttribute.cs
- Array.cs
- BasicCommandTreeVisitor.cs
- XPathBuilder.cs
- WindowCollection.cs
- ControlCachePolicy.cs
- DeflateStream.cs
- StateItem.cs
- DefaultObjectMappingItemCollection.cs
- PhysicalOps.cs
- MetadataArtifactLoader.cs
- GuidConverter.cs
- ListViewItemEventArgs.cs
- DesignerEventService.cs
- DrawingGroupDrawingContext.cs
- TraceContextEventArgs.cs
- WorkerRequest.cs
- UserMapPath.cs
- InvalidWorkflowException.cs
- EdgeModeValidation.cs
- DirectoryInfo.cs
- Odbc32.cs
- HostingEnvironment.cs
- BitConverter.cs
- ReadOnlyTernaryTree.cs
- filewebresponse.cs
- PrintPreviewControl.cs
- NullableDoubleAverageAggregationOperator.cs
- LogicalExpr.cs
- PrivilegedConfigurationManager.cs
- BufferedGraphicsContext.cs
- ToolStripItemClickedEventArgs.cs
- WindowsTokenRoleProvider.cs
- SendMailErrorEventArgs.cs
- MonthChangedEventArgs.cs
- DataPager.cs
- InheritanceUI.cs
- SourceLineInfo.cs
- ToolStripOverflow.cs