Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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);
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// ==++==
//
// 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);
}
}
}
}
// 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
- WebPartZoneBaseDesigner.cs
- Deserializer.cs
- TransformProviderWrapper.cs
- DataBindingExpressionBuilder.cs
- OpCodes.cs
- ImageAttributes.cs
- BigInt.cs
- HtmlSelect.cs
- DataListItemCollection.cs
- AsymmetricAlgorithm.cs
- DesignerSerializationOptionsAttribute.cs
- DataSourceXmlElementAttribute.cs
- HttpRuntimeSection.cs
- ConfigurationValues.cs
- _Rfc2616CacheValidators.cs
- Matrix.cs
- InlineUIContainer.cs
- DataView.cs
- XmlCharCheckingWriter.cs
- XmlLanguage.cs
- HideDisabledControlAdapter.cs
- MetadataSerializer.cs
- RemotingSurrogateSelector.cs
- MaskedTextProvider.cs
- DBConnectionString.cs
- InternalPolicyElement.cs
- NativeMethods.cs
- shaperfactoryquerycacheentry.cs
- InvalidDataException.cs
- NullRuntimeConfig.cs
- EditCommandColumn.cs
- TextRangeEditTables.cs
- UnicodeEncoding.cs
- ButtonFlatAdapter.cs
- BinaryVersion.cs
- SoapExtensionImporter.cs
- Compress.cs
- FontStretch.cs
- EditingCommands.cs
- TemplateDefinition.cs
- SchemaTableOptionalColumn.cs
- SourceElementsCollection.cs
- BitmapEffectState.cs
- LocalFileSettingsProvider.cs
- SimpleBitVector32.cs
- HttpWrapper.cs
- HttpWriter.cs
- TextTreeInsertUndoUnit.cs
- DataGridViewCellStyleChangedEventArgs.cs
- SourceFileInfo.cs
- PackageDigitalSignature.cs
- translator.cs
- CookieProtection.cs
- StatusStrip.cs
- RichTextBox.cs
- FileDocument.cs
- FileDialog.cs
- TdsParserSafeHandles.cs
- ToolStripSeparatorRenderEventArgs.cs
- ComPlusServiceHost.cs
- File.cs
- HtmlTernaryTree.cs
- PrintingPermission.cs
- XmlSchemaNotation.cs
- Camera.cs
- DesignerWithHeader.cs
- Dictionary.cs
- MetadataSource.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- ProfileSection.cs
- BindToObject.cs
- LocalizedNameDescriptionPair.cs
- ClientOperation.cs
- CompressedStack.cs
- CompilerScope.Storage.cs
- WebPartManagerInternals.cs
- XmlWellformedWriter.cs
- ContentDefinition.cs
- XmlArrayItemAttribute.cs
- RenderOptions.cs
- ProxyWebPart.cs
- HttpSessionStateWrapper.cs
- SessionIDManager.cs
- Deflater.cs
- EDesignUtil.cs
- HttpModulesSection.cs
- LinkLabelLinkClickedEvent.cs
- RC2.cs
- Translator.cs
- CreateUserErrorEventArgs.cs
- MenuTracker.cs
- TemplateApplicationHelper.cs
- BitmapEffectInput.cs
- Point3DCollection.cs
- DataGridTextBoxColumn.cs
- GroupBoxAutomationPeer.cs
- CodeAttributeDeclaration.cs
- DataStorage.cs
- PersonalizationDictionary.cs