Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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. // // ==--== // 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Internal.cs
- SoapIncludeAttribute.cs
- DataServiceRequestOfT.cs
- WebPartUserCapability.cs
- DEREncoding.cs
- WpfWebRequestHelper.cs
- AmbientLight.cs
- MD5.cs
- MessageDecoder.cs
- DataTransferEventArgs.cs
- TextOnlyOutput.cs
- SingleStorage.cs
- RangeBase.cs
- Int32Rect.cs
- FormViewRow.cs
- _NegotiateClient.cs
- SqlXml.cs
- DetailsViewCommandEventArgs.cs
- LinkUtilities.cs
- Crc32.cs
- FunctionOverloadResolver.cs
- SHA256Managed.cs
- Pts.cs
- BoundPropertyEntry.cs
- remotingproxy.cs
- LayoutEditorPart.cs
- AnnouncementClient.cs
- CatalogZoneBase.cs
- HttpCachePolicyWrapper.cs
- ContextStack.cs
- WindowsSpinner.cs
- FlowDocumentReader.cs
- WCFBuildProvider.cs
- RowUpdatedEventArgs.cs
- DesignerActionTextItem.cs
- GcHandle.cs
- AutomationElementCollection.cs
- _ListenerResponseStream.cs
- FixedSOMContainer.cs
- _NestedMultipleAsyncResult.cs
- IList.cs
- ScriptResourceInfo.cs
- Pool.cs
- Rect3D.cs
- BitmapEffectRenderDataResource.cs
- OleDbTransaction.cs
- ButtonFieldBase.cs
- Int16Animation.cs
- RawAppCommandInputReport.cs
- JavaScriptString.cs
- Vector3DAnimationBase.cs
- COM2PropertyDescriptor.cs
- CellConstant.cs
- XmlSchema.cs
- SqlFunctionAttribute.cs
- EventPrivateKey.cs
- HttpValueCollection.cs
- RegexTypeEditor.cs
- ObjectFullSpanRewriter.cs
- XsdCachingReader.cs
- XmlSchemaValidationException.cs
- WebRequestModuleElementCollection.cs
- FixedTextPointer.cs
- DateTimeSerializationSection.cs
- CachedTypeface.cs
- CodeParameterDeclarationExpression.cs
- Tuple.cs
- StickyNoteHelper.cs
- InsufficientMemoryException.cs
- ObjectItemConventionAssemblyLoader.cs
- BmpBitmapDecoder.cs
- PageBuildProvider.cs
- Package.cs
- ControlAdapter.cs
- DesignerDataRelationship.cs
- ResourcePermissionBaseEntry.cs
- TypeLibConverter.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- LoadWorkflowCommand.cs
- TimelineGroup.cs
- X500Name.cs
- X509ThumbprintKeyIdentifierClause.cs
- RoutedUICommand.cs
- WebCategoryAttribute.cs
- Grid.cs
- ManualWorkflowSchedulerService.cs
- X509ThumbprintKeyIdentifierClause.cs
- ItemsPanelTemplate.cs
- GridViewRow.cs
- EDesignUtil.cs
- PermissionSetEnumerator.cs
- DataViewManagerListItemTypeDescriptor.cs
- SegmentInfo.cs
- ResourceAttributes.cs
- Point3D.cs
- ZipIOExtraFieldPaddingElement.cs
- DataControlPagerLinkButton.cs
- compensatingcollection.cs
- Configuration.cs
- PropertyInformationCollection.cs