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
- AdornerLayer.cs
- RsaSecurityToken.cs
- HtmlEmptyTagControlBuilder.cs
- DataBindingHandlerAttribute.cs
- ADMembershipUser.cs
- NativeMethods.cs
- PersistChildrenAttribute.cs
- ItemsControl.cs
- ControllableStoryboardAction.cs
- CodeIdentifiers.cs
- MaterializeFromAtom.cs
- Expression.cs
- cryptoapiTransform.cs
- StandardOleMarshalObject.cs
- MatrixStack.cs
- XmlSchemaType.cs
- ConditionChanges.cs
- DefaultWorkflowLoaderService.cs
- MergablePropertyAttribute.cs
- Vars.cs
- WebPartEditVerb.cs
- MenuCommand.cs
- Activator.cs
- WindowsGraphics.cs
- CommandEventArgs.cs
- DataTable.cs
- RtfToXamlReader.cs
- NamespaceExpr.cs
- HwndProxyElementProvider.cs
- GroupBoxRenderer.cs
- DetailsViewActionList.cs
- ScopeCollection.cs
- PeoplePickerWrapper.cs
- NativeMethods.cs
- RuntimeConfig.cs
- ValidationEventArgs.cs
- ToolboxComponentsCreatedEventArgs.cs
- XmlSchemaImport.cs
- CollectionConverter.cs
- RequestQueue.cs
- FlowDocument.cs
- OrCondition.cs
- RegexGroupCollection.cs
- GlyphShapingProperties.cs
- XmlEnumAttribute.cs
- DataRowView.cs
- MultiByteCodec.cs
- XamlFrame.cs
- ToolStripSystemRenderer.cs
- FormViewUpdatedEventArgs.cs
- Path.cs
- DeploymentSection.cs
- EdmToObjectNamespaceMap.cs
- TreeNode.cs
- SystemFonts.cs
- PropertyTabChangedEvent.cs
- DataFieldConverter.cs
- QuaternionAnimationBase.cs
- DataGridViewIntLinkedList.cs
- HyperLinkStyle.cs
- CursorConverter.cs
- SqlUtil.cs
- InvokePatternIdentifiers.cs
- RoutedCommand.cs
- ByteAnimationBase.cs
- DynamicVirtualDiscoSearcher.cs
- DateTimeFormatInfoScanner.cs
- WindowsContainer.cs
- ImpersonateTokenRef.cs
- wmiprovider.cs
- ScrollPattern.cs
- ToolboxComponentsCreatedEventArgs.cs
- VectorAnimationBase.cs
- ReadOnlyDataSourceView.cs
- TextChange.cs
- UnauthorizedWebPart.cs
- ValueSerializer.cs
- UInt64Storage.cs
- NativeMethods.cs
- TypeResolvingOptions.cs
- Matrix3D.cs
- CustomValidator.cs
- ExternalException.cs
- Internal.cs
- EventLogPermissionEntry.cs
- Point3DAnimation.cs
- SafeCoTaskMem.cs
- Matrix.cs
- HttpRequestCacheValidator.cs
- XmlWellformedWriter.cs
- ImpersonationOption.cs
- BufferCache.cs
- XmlNodeChangedEventArgs.cs
- OleDragDropHandler.cs
- SQlBooleanStorage.cs
- _AutoWebProxyScriptEngine.cs
- XmlDataDocument.cs
- ProvidePropertyAttribute.cs
- MenuItemStyleCollection.cs
- HandledMouseEvent.cs