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
- ShapingEngine.cs
- ClientOptions.cs
- Size.cs
- DbConnectionStringCommon.cs
- MdImport.cs
- SemanticResultValue.cs
- ImportContext.cs
- DtdParser.cs
- HiddenField.cs
- CodeCastExpression.cs
- WebPartDeleteVerb.cs
- WSSecurityOneDotOneSendSecurityHeader.cs
- SafeRightsManagementSessionHandle.cs
- XmlSchemaAppInfo.cs
- Converter.cs
- DeclarativeCatalogPart.cs
- oledbconnectionstring.cs
- MemberRelationshipService.cs
- RoleService.cs
- PerspectiveCamera.cs
- XamlNamespaceHelper.cs
- TrackBar.cs
- ISAPIRuntime.cs
- ChannelBinding.cs
- PeerNameRecordCollection.cs
- FrameworkPropertyMetadata.cs
- BodyWriter.cs
- SyndicationDeserializer.cs
- DataControlCommands.cs
- DesignerPerfEventProvider.cs
- SpeechRecognitionEngine.cs
- Command.cs
- WeakEventTable.cs
- ProxyAttribute.cs
- DecoderExceptionFallback.cs
- Section.cs
- ChannelTraceRecord.cs
- ConfigurationSectionGroupCollection.cs
- oledbmetadatacolumnnames.cs
- OleDbParameterCollection.cs
- ZoomPercentageConverter.cs
- FixUp.cs
- AnnotationHighlightLayer.cs
- ForeignKeyConstraint.cs
- OrderingInfo.cs
- ServicePointManager.cs
- Message.cs
- ProtocolsConfiguration.cs
- RegexReplacement.cs
- ListDictionaryInternal.cs
- DateTimeOffsetConverter.cs
- SmiEventSink.cs
- PagedDataSource.cs
- KnownBoxes.cs
- MSAAWinEventWrap.cs
- TextEditor.cs
- IUnknownConstantAttribute.cs
- StateMachineDesignerPaint.cs
- XmlSignificantWhitespace.cs
- CodeStatementCollection.cs
- FilterEventArgs.cs
- wmiprovider.cs
- XmlCharCheckingReader.cs
- ContentElement.cs
- OleDbErrorCollection.cs
- MenuItemCollection.cs
- SortQuery.cs
- WebConfigurationFileMap.cs
- ListViewGroup.cs
- HttpCookie.cs
- RSACryptoServiceProvider.cs
- ProtocolsConfigurationEntry.cs
- ProgressPage.cs
- Comparer.cs
- WriteableBitmap.cs
- OrderedDictionaryStateHelper.cs
- StringSource.cs
- TraceLevelHelper.cs
- RoleManagerModule.cs
- InfoCardProofToken.cs
- LinkUtilities.cs
- ACL.cs
- DescendentsWalkerBase.cs
- EntityDataSourceView.cs
- SmtpDigestAuthenticationModule.cs
- RegexCode.cs
- ImmutablePropertyDescriptorGridEntry.cs
- Form.cs
- SystemIdentity.cs
- Invariant.cs
- GridViewRowPresenterBase.cs
- _Win32.cs
- TraceContextEventArgs.cs
- LazyTextWriterCreator.cs
- EventsTab.cs
- Registry.cs
- PreviewPageInfo.cs
- SqlServer2KCompatibilityCheck.cs
- ProfilePropertyMetadata.cs
- PowerModeChangedEventArgs.cs