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
- SqlServer2KCompatibilityCheck.cs
- CheckableControlBaseAdapter.cs
- InputDevice.cs
- Rect3D.cs
- CacheChildrenQuery.cs
- ThreadStaticAttribute.cs
- LineBreakRecord.cs
- TextEditorThreadLocalStore.cs
- AppDomain.cs
- TextProperties.cs
- SoapSchemaMember.cs
- HttpConfigurationContext.cs
- AsyncPostBackErrorEventArgs.cs
- AbstractSvcMapFileLoader.cs
- FormViewDeletedEventArgs.cs
- RegexCompilationInfo.cs
- SystemTcpConnection.cs
- ProjectionPlan.cs
- NavigatorOutput.cs
- Events.cs
- Control.cs
- Application.cs
- PropertyMappingExceptionEventArgs.cs
- MemoryMappedFile.cs
- SqlProviderManifest.cs
- FixedSOMElement.cs
- Style.cs
- HtmlInputButton.cs
- InteropDesigner.xaml.cs
- AssemblyInfo.cs
- listitem.cs
- LoginViewDesigner.cs
- AppModelKnownContentFactory.cs
- DataTableMappingCollection.cs
- COM2PictureConverter.cs
- ConnectionInterfaceCollection.cs
- TextParentUndoUnit.cs
- ContextStaticAttribute.cs
- GeometryConverter.cs
- DataGridViewColumnCollection.cs
- ArithmeticLiteral.cs
- CompiledAction.cs
- ReverseInheritProperty.cs
- AutomationPeer.cs
- SinglePageViewer.cs
- RuntimeArgumentHandle.cs
- PropertyPushdownHelper.cs
- Hex.cs
- ConstNode.cs
- LocatorManager.cs
- DataGridRowHeaderAutomationPeer.cs
- DynamicPropertyReader.cs
- Control.cs
- mda.cs
- ModifyActivitiesPropertyDescriptor.cs
- ModelItemDictionaryImpl.cs
- Html32TextWriter.cs
- GuidelineCollection.cs
- TlsSspiNegotiation.cs
- StoreAnnotationsMap.cs
- UnicodeEncoding.cs
- FrameworkContentElement.cs
- XmlSchemaFacet.cs
- CodeLinePragma.cs
- BinaryMethodMessage.cs
- ShaperBuffers.cs
- Rotation3DAnimation.cs
- BlockCollection.cs
- OrderedDictionary.cs
- CodeSnippetTypeMember.cs
- BindingGraph.cs
- LoaderAllocator.cs
- XmlSchemaAttributeGroup.cs
- MsmqOutputMessage.cs
- SByte.cs
- ScrollProviderWrapper.cs
- CancelAsyncOperationRequest.cs
- PersonalizationStateQuery.cs
- CodeObject.cs
- tooltip.cs
- Registry.cs
- WindowsSolidBrush.cs
- RowBinding.cs
- VolatileEnlistmentState.cs
- DataGridViewRow.cs
- ConstraintManager.cs
- DateBoldEvent.cs
- Compiler.cs
- DataGridViewRowCancelEventArgs.cs
- UdpMessageProperty.cs
- InfoCardListRequest.cs
- OLEDB_Enum.cs
- ReleaseInstanceMode.cs
- CalendarTable.cs
- UIElement3D.cs
- TextEditorDragDrop.cs
- DataRow.cs
- EntityContainerEntitySetDefiningQuery.cs
- OptimizedTemplateContentHelper.cs
- SchemeSettingElementCollection.cs