Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / clr / src / BCL / System / Text / SurrogateEncoder.cs / 1 / SurrogateEncoder.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // WARNING: // // This is just an IObjectReference proxy for the former V1.1 Surrogate Encoder // All this does is make an encoder of the correct type, it DOES NOT maintain state. namespace System.Text { using System; using System.Runtime.Serialization; using System.Security.Permissions; /*=================================SurrogateEncoder================================== ** This class is here only to deserialize the SurrogateEncoder class from Everett (V1.1) into ** Appropriate Whidbey (V2.0) objects. ==============================================================================*/ [Serializable()] internal sealed class SurrogateEncoder : ISerializable, IObjectReference { // Might need this when GetRealObjecting [NonSerialized] private Encoding realEncoding = null; // Constructor called by serialization. internal SurrogateEncoder(SerializationInfo info, StreamingContext context) { // Any info? if (info==null) throw new ArgumentNullException("info"); // All versions have a code page this.realEncoding = (Encoding)info.GetValue("m_encoding", typeof(Encoding)); } // Just get it from GetEncoding public Object GetRealObject(StreamingContext context) { // Need to get our Encoding's Encoder return this.realEncoding.GetEncoder(); } // ISerializable implementation [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.SerializationFormatter)] void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) { // We cannot ever call this. BCLDebug.Assert(false, "Didn't expect to make it to SurrogateEncoder.GetObjectData"); throw new ArgumentException(Environment.GetResourceString("Arg_ExecutionEngineException")); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- OleDbException.cs
- BulletChrome.cs
- SamlDoNotCacheCondition.cs
- PluralizationServiceUtil.cs
- FixedSOMLineRanges.cs
- SkinIDTypeConverter.cs
- VectorAnimationUsingKeyFrames.cs
- ClassImporter.cs
- TransformPattern.cs
- ObjectStateManager.cs
- DataServiceProviderMethods.cs
- LinqExpressionNormalizer.cs
- ItemContainerGenerator.cs
- RemotingConfigParser.cs
- StylusEditingBehavior.cs
- IntSecurity.cs
- HyperLinkColumn.cs
- XPathScanner.cs
- ActivityCodeGenerator.cs
- FrameworkTemplate.cs
- ValueQuery.cs
- SplashScreen.cs
- WebPartHeaderCloseVerb.cs
- ObjectIDGenerator.cs
- MobileCategoryAttribute.cs
- SafeHandles.cs
- StringInfo.cs
- PenLineCapValidation.cs
- ListViewTableRow.cs
- DataGridViewColumnCollectionDialog.cs
- AssociatedControlConverter.cs
- XmlRawWriterWrapper.cs
- URI.cs
- AppliedDeviceFiltersEditor.cs
- X509PeerCertificateAuthenticationElement.cs
- BaseParser.cs
- SerializationInfoEnumerator.cs
- Wizard.cs
- CodeGroup.cs
- DictionaryBase.cs
- GrammarBuilder.cs
- ConfigurationElementProperty.cs
- WebPartDisplayModeCollection.cs
- TypeInitializationException.cs
- ButtonColumn.cs
- Dictionary.cs
- LogicalCallContext.cs
- NameValueSectionHandler.cs
- Matrix3DValueSerializer.cs
- DocumentEventArgs.cs
- SettingsSection.cs
- LifetimeServices.cs
- VersionValidator.cs
- IssuanceTokenProviderBase.cs
- BlurBitmapEffect.cs
- Random.cs
- CacheSection.cs
- BitmapEffect.cs
- ClockController.cs
- ellipse.cs
- TranslateTransform3D.cs
- GeneratedView.cs
- ServicesUtilities.cs
- SystemIcmpV4Statistics.cs
- ProfilePropertyMetadata.cs
- RoutedEventConverter.cs
- SmtpDigestAuthenticationModule.cs
- ReferentialConstraint.cs
- KerberosSecurityTokenProvider.cs
- ToolStripArrowRenderEventArgs.cs
- SQLBinaryStorage.cs
- DisplayNameAttribute.cs
- FrameworkElementFactoryMarkupObject.cs
- Restrictions.cs
- CqlLexerHelpers.cs
- ArcSegment.cs
- ButtonRenderer.cs
- TransformGroup.cs
- WorkflowDesignerMessageFilter.cs
- DoubleLinkListEnumerator.cs
- ImageCodecInfoPrivate.cs
- CacheVirtualItemsEvent.cs
- KeyboardEventArgs.cs
- MultipartIdentifier.cs
- TableCellCollection.cs
- bindurihelper.cs
- CriticalExceptions.cs
- Marshal.cs
- RegexGroupCollection.cs
- ClientScriptItemCollection.cs
- Matrix3DConverter.cs
- SafeFileMapViewHandle.cs
- CodeParameterDeclarationExpression.cs
- MulticastNotSupportedException.cs
- ObjectDataSource.cs
- OleDbException.cs
- SelectionItemPattern.cs
- BitmapSource.cs
- ArgIterator.cs
- ExceptionUtil.cs