Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Globalization / GlobalizationAssembly.cs / 1305376 / GlobalizationAssembly.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== namespace System.Globalization { using System; using System.Reflection; using System.Collections; using System.Collections.Generic; using System.Threading; using System.Security; using System.Security.Principal; using System.Security.Permissions; using System.Runtime.CompilerServices; using System.Runtime.ConstrainedExecution; using System.Runtime.Versioning; using System.IO; using System.Diagnostics.Contracts; /*=================================GlobalizationAssembly========================== ** ** This class provides the table loading wrapper that calls GetManifestResourceStream ** ** It used to provide an idea for sort versioning, but that proved to not work ** ============================================================================*/ internal sealed class GlobalizationAssembly { // ---------------------------------------------------------------------------------------------------- // // Instance data members and instance methods. // // --------------------------------------------------------------------------------------------------- [System.Security.SecurityCritical] // auto-generated [ResourceExposure(ResourceScope.Process)] [ResourceConsumption(ResourceScope.Machine, ResourceScope.Process)] internal unsafe static byte* GetGlobalizationResourceBytePtr(Assembly assembly, String tableName) { Contract.Assert(assembly != null, "assembly can not be null. This should be generally the mscorlib.dll assembly."); Contract.Assert(tableName != null, "table name can not be null"); Stream stream = assembly.GetManifestResourceStream(tableName); UnmanagedMemoryStream bytesStream = stream as UnmanagedMemoryStream; if (bytesStream != null) { byte* bytes = bytesStream.PositionPointer; if (bytes != null) { return (bytes); } } Contract.Assert( false, String.Format( CultureInfo.CurrentCulture, "Didn't get the resource table {0} for System.Globalization from {1}", tableName, assembly)); // We can not continue if we can't get the resource. throw new InvalidOperationException(); } } } // 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
- CorePropertiesFilter.cs
- HostSecurityManager.cs
- SectionUpdates.cs
- WebBrowserEvent.cs
- DataControlField.cs
- ValueQuery.cs
- SystemIcons.cs
- RawContentTypeMapper.cs
- HttpModuleAction.cs
- OdbcInfoMessageEvent.cs
- ComponentChangedEvent.cs
- Wizard.cs
- SqlInfoMessageEvent.cs
- SelectionBorderGlyph.cs
- EditorPartCollection.cs
- ClientSettingsStore.cs
- TypeDescriptionProvider.cs
- HandlerBase.cs
- StateRuntime.cs
- PropertyItem.cs
- UnsettableComboBox.cs
- QualificationDataAttribute.cs
- ListViewCommandEventArgs.cs
- AppSettings.cs
- PropertyBuilder.cs
- CompensatableTransactionScopeActivity.cs
- MailBnfHelper.cs
- WCFServiceClientProxyGenerator.cs
- ScriptReferenceBase.cs
- ArrayList.cs
- BaseTypeViewSchema.cs
- ChannelTerminatedException.cs
- PolygonHotSpot.cs
- TypeConverterBase.cs
- HtmlInputRadioButton.cs
- StandardCommands.cs
- StrongTypingException.cs
- QilChoice.cs
- MD5CryptoServiceProvider.cs
- EntityDataSourceDataSelectionPanel.cs
- BindingExpression.cs
- ItemContainerGenerator.cs
- ManipulationPivot.cs
- DataTableReaderListener.cs
- TypedDataSetSchemaImporterExtensionFx35.cs
- ConfigXmlElement.cs
- ExcCanonicalXml.cs
- Sequence.cs
- complextypematerializer.cs
- Expression.cs
- Animatable.cs
- MergeFailedEvent.cs
- TextTreeRootNode.cs
- TdsParameterSetter.cs
- RuntimeWrappedException.cs
- EventLog.cs
- DataFormats.cs
- ItemCollection.cs
- FormViewModeEventArgs.cs
- NotImplementedException.cs
- RangeValueProviderWrapper.cs
- GridItem.cs
- EmptyEnumerable.cs
- PropertyMap.cs
- JournalEntryStack.cs
- ArithmeticException.cs
- FontStretches.cs
- RegularExpressionValidator.cs
- RelationshipNavigation.cs
- ISO2022Encoding.cs
- DesignSurfaceServiceContainer.cs
- JapaneseLunisolarCalendar.cs
- HtmlTableCellCollection.cs
- XmlParserContext.cs
- TrustLevelCollection.cs
- GridEntry.cs
- hebrewshape.cs
- CopyAttributesAction.cs
- DiscreteKeyFrames.cs
- TextBoxAutomationPeer.cs
- XmlILAnnotation.cs
- Html32TextWriter.cs
- CellNormalizer.cs
- ProxyWebPart.cs
- BitVector32.cs
- ProtocolsConfiguration.cs
- IProvider.cs
- WebPartAddingEventArgs.cs
- DataGridViewHitTestInfo.cs
- ModelServiceImpl.cs
- PropertyGrid.cs
- WebPageTraceListener.cs
- XpsImage.cs
- Base64Encoder.cs
- Menu.cs
- ViewBox.cs
- HashUtility.cs
- EmbeddedObject.cs
- ProfileEventArgs.cs
- EdmComplexPropertyAttribute.cs