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
- FontSourceCollection.cs
- columnmapfactory.cs
- ObjectConverter.cs
- ContextItemManager.cs
- FormsIdentity.cs
- CacheSection.cs
- Helpers.cs
- TextFormattingConverter.cs
- AuthStoreRoleProvider.cs
- Content.cs
- MouseGestureConverter.cs
- StringToken.cs
- TextDecorations.cs
- httpapplicationstate.cs
- SystemFonts.cs
- LayoutUtils.cs
- DataGridViewRowHeaderCell.cs
- LayoutEditorPart.cs
- Page.cs
- ErrorHandlingReceiver.cs
- PointCollection.cs
- XmlIgnoreAttribute.cs
- ClientApiGenerator.cs
- LinqToSqlWrapper.cs
- PersistChildrenAttribute.cs
- QilTargetType.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- DBBindings.cs
- SchemaExporter.cs
- LocalizationParserHooks.cs
- _NetworkingPerfCounters.cs
- TimeoutTimer.cs
- EntityDataSourceChangedEventArgs.cs
- ScriptingProfileServiceSection.cs
- PhysicalFontFamily.cs
- HandlerBase.cs
- DataGridRow.cs
- WebBaseEventKeyComparer.cs
- CustomLineCap.cs
- OperationDescription.cs
- HttpModuleCollection.cs
- RegexRunnerFactory.cs
- Delegate.cs
- SqlGenericUtil.cs
- KnownTypesProvider.cs
- StylusEventArgs.cs
- StringConverter.cs
- XmlDownloadManager.cs
- UnsafeNativeMethods.cs
- ChangeInterceptorAttribute.cs
- ComponentSerializationService.cs
- EmbeddedMailObject.cs
- GregorianCalendarHelper.cs
- KeyMatchBuilder.cs
- StateWorkerRequest.cs
- NoneExcludedImageIndexConverter.cs
- WebPartDisplayModeCancelEventArgs.cs
- KerberosTicketHashIdentifierClause.cs
- FontStyleConverter.cs
- XmlSerializer.cs
- TreeChangeInfo.cs
- TableLayoutPanelResizeGlyph.cs
- FuncCompletionCallbackWrapper.cs
- Subset.cs
- DataGridHeaderBorder.cs
- HMACSHA384.cs
- ControlBuilderAttribute.cs
- AndMessageFilter.cs
- FileReader.cs
- HtmlTableCellCollection.cs
- SqlConnectionPoolGroupProviderInfo.cs
- RegionData.cs
- FieldBuilder.cs
- PseudoWebRequest.cs
- AsymmetricSignatureDeformatter.cs
- EncryptedType.cs
- Convert.cs
- GradientStop.cs
- DataSourceExpression.cs
- URI.cs
- DataControlButton.cs
- Aggregates.cs
- QueryParameter.cs
- BitmapEncoder.cs
- TabControl.cs
- ByteStreamGeometryContext.cs
- RSAOAEPKeyExchangeDeformatter.cs
- Barrier.cs
- InputProcessorProfiles.cs
- NavigationProperty.cs
- HttpServerVarsCollection.cs
- SemanticTag.cs
- BaseUriHelper.cs
- CngAlgorithm.cs
- WebPartZoneBase.cs
- Transform3DCollection.cs
- Int32.cs
- XsltLoader.cs
- BookmarkResumptionRecord.cs
- SemanticResultKey.cs