Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Text / DecoderBestFitFallback.cs / 1305376 / DecoderBestFitFallback.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // DecoderBestFitFallback.cs // // This is used internally to create best fit behavior as per the original windows best fit behavior. // namespace System.Text { using System; using System.Text; using System.Threading; using System.Diagnostics.Contracts; [Serializable] internal sealed class InternalDecoderBestFitFallback : DecoderFallback { // Our variables internal Encoding encoding = null; internal char[] arrayBestFit = null; internal char cReplacement = '?'; internal InternalDecoderBestFitFallback(Encoding encoding) { // Need to load our replacement characters table. this.encoding = encoding; this.bIsMicrosoftBestFitFallback = true; } public override DecoderFallbackBuffer CreateFallbackBuffer() { return new InternalDecoderBestFitFallbackBuffer(this); } // Maximum number of characters that this instance of this fallback could return public override int MaxCharCount { get { return 1; } } public override bool Equals(Object value) { InternalDecoderBestFitFallback that = value as InternalDecoderBestFitFallback; if (that != null) { return (this.encoding.CodePage == that.encoding.CodePage); } return (false); } public override int GetHashCode() { return this.encoding.CodePage; } } internal sealed class InternalDecoderBestFitFallbackBuffer : DecoderFallbackBuffer { // Our variables internal char cBestFit = '\0'; internal int iCount = -1; internal int iSize; private InternalDecoderBestFitFallback oFallback; // Private object for locking instead of locking on a public type for SQL reliability work. private static Object s_InternalSyncObject; private static Object InternalSyncObject { get { if (s_InternalSyncObject == null) { Object o = new Object(); Interlocked.CompareExchange
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XsdValidatingReader.cs
- ZeroOpNode.cs
- KeyPressEvent.cs
- QilList.cs
- GlyphManager.cs
- ParallelRangeManager.cs
- WebEvents.cs
- TextParagraphProperties.cs
- _SSPISessionCache.cs
- DependencyPropertyDescriptor.cs
- HttpFileCollection.cs
- EmptyStringExpandableObjectConverter.cs
- PenThreadPool.cs
- Delegate.cs
- CachedPathData.cs
- MsmqInputChannelListener.cs
- ContextBase.cs
- BlobPersonalizationState.cs
- UniqueIdentifierService.cs
- XmlBinaryReader.cs
- ValueExpressions.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- CodeTypeOfExpression.cs
- LockedAssemblyCache.cs
- securitymgrsite.cs
- CodeDelegateInvokeExpression.cs
- safemediahandle.cs
- BitmapEffectGroup.cs
- ChangeConflicts.cs
- NetworkStream.cs
- Image.cs
- ControllableStoryboardAction.cs
- WindowsListViewItem.cs
- Vars.cs
- DefaultValueMapping.cs
- DefaultValueTypeConverter.cs
- MulticastDelegate.cs
- PixelFormats.cs
- DeleteHelper.cs
- ObjectListCommandEventArgs.cs
- ApplyHostConfigurationBehavior.cs
- DashStyle.cs
- TextTreeTextNode.cs
- MachineKeyConverter.cs
- Track.cs
- ExcludePathInfo.cs
- AttributeSetAction.cs
- MarshalByValueComponent.cs
- InkPresenter.cs
- DataStreams.cs
- CodeEventReferenceExpression.cs
- DataGridViewButtonColumn.cs
- PrintDocument.cs
- SingleKeyFrameCollection.cs
- DataServiceConfiguration.cs
- DesigntimeLicenseContextSerializer.cs
- QilStrConcatenator.cs
- Pair.cs
- CodeTypeConstructor.cs
- PackageRelationshipCollection.cs
- OdbcPermission.cs
- EDesignUtil.cs
- ISAPIWorkerRequest.cs
- UnwrappedTypesXmlSerializerManager.cs
- MembershipPasswordException.cs
- IndentedWriter.cs
- OperationCanceledException.cs
- AlternateView.cs
- OutputCacheSection.cs
- AutomationProperties.cs
- DataTableTypeConverter.cs
- columnmapkeybuilder.cs
- WebRequestModulesSection.cs
- IdentityValidationException.cs
- RecognizeCompletedEventArgs.cs
- GenericFlowSwitchHelper.cs
- RegexMatchCollection.cs
- IERequestCache.cs
- FtpCachePolicyElement.cs
- DefaultAsyncDataDispatcher.cs
- Schema.cs
- IDReferencePropertyAttribute.cs
- WebConfigurationHost.cs
- StateRuntime.cs
- DynamicMethod.cs
- MailHeaderInfo.cs
- Point.cs
- AnnotationHelper.cs
- CreateParams.cs
- UrlPropertyAttribute.cs
- Font.cs
- OleServicesContext.cs
- WmlLiteralTextAdapter.cs
- BufferedGraphics.cs
- SqlTriggerContext.cs
- UnhandledExceptionEventArgs.cs
- EntityModelBuildProvider.cs
- SerializerWriterEventHandlers.cs
- DragDeltaEventArgs.cs
- StylusCaptureWithinProperty.cs