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
- DPTypeDescriptorContext.cs
- InvalidPipelineStoreException.cs
- HwndSourceParameters.cs
- DataKeyPropertyAttribute.cs
- ToolStripDropDownItem.cs
- BinaryVersion.cs
- HwndTarget.cs
- SecurityContext.cs
- StateManagedCollection.cs
- TextEncodedRawTextWriter.cs
- StateDesignerConnector.cs
- DeadCharTextComposition.cs
- EntityDataSourceViewSchema.cs
- CompiledRegexRunner.cs
- ServiceObjectContainer.cs
- File.cs
- KnownTypesHelper.cs
- TypeNameParser.cs
- FixedDocumentSequencePaginator.cs
- DropShadowEffect.cs
- BinaryObjectWriter.cs
- ScriptControlDescriptor.cs
- ExpressionValueEditor.cs
- DataGridViewCellCancelEventArgs.cs
- IERequestCache.cs
- DictionaryContent.cs
- InlinedAggregationOperator.cs
- SoapIncludeAttribute.cs
- WindowsSidIdentity.cs
- DefinitionBase.cs
- X509Utils.cs
- ListView.cs
- UITypeEditor.cs
- _FtpDataStream.cs
- Point4D.cs
- HtmlShimManager.cs
- RbTree.cs
- MiniModule.cs
- HtmlInputImage.cs
- ThreadPool.cs
- Debug.cs
- SeekStoryboard.cs
- TypeBuilderInstantiation.cs
- ScopeElement.cs
- RtfNavigator.cs
- LogAppendAsyncResult.cs
- PopupControlService.cs
- _LocalDataStoreMgr.cs
- TimeSpanConverter.cs
- ColorBuilder.cs
- NameTable.cs
- ByteStreamGeometryContext.cs
- COAUTHIDENTITY.cs
- FileIOPermission.cs
- DefaultBinder.cs
- SqlIdentifier.cs
- SafeEventLogWriteHandle.cs
- CodeGenerator.cs
- XmlValidatingReader.cs
- ProcessThread.cs
- Wizard.cs
- DataGridRelationshipRow.cs
- SqlDataSourceSelectingEventArgs.cs
- StringUtil.cs
- ThumbButtonInfoCollection.cs
- Converter.cs
- DesignerOptionService.cs
- ToolStripDropDownItem.cs
- PaperSource.cs
- CodeTypeReferenceCollection.cs
- ManipulationDelta.cs
- SystemInformation.cs
- baseaxisquery.cs
- ToolStripDesigner.cs
- ComboBoxRenderer.cs
- WindowsGraphics2.cs
- ListControl.cs
- DataAccessException.cs
- GridItemPatternIdentifiers.cs
- DataTemplateSelector.cs
- AutoCompleteStringCollection.cs
- XamlParser.cs
- AssertSection.cs
- Type.cs
- TextServicesLoader.cs
- BitVector32.cs
- ConfigXmlText.cs
- SecurityTokenValidationException.cs
- TransformPattern.cs
- TextServicesPropertyRanges.cs
- EdmMember.cs
- XsdDataContractImporter.cs
- AuthorizationSection.cs
- TextRunProperties.cs
- TextRangeBase.cs
- XmlSecureResolver.cs
- XmlMembersMapping.cs
- DateTimeOffset.cs
- Page.cs
- HttpCacheVaryByContentEncodings.cs