Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Text / SurrogateEncoder.cs / 1305376 / 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; using System.Diagnostics.Contracts; /*=================================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"); Contract.EndContractBlock(); // All versions have a code page this.realEncoding = (Encoding)info.GetValue("m_encoding", typeof(Encoding)); } // Just get it from GetEncoding [System.Security.SecurityCritical] // auto-generated public Object GetRealObject(StreamingContext context) { // Need to get our Encoding's Encoder return this.realEncoding.GetEncoder(); } #if FEATURE_SERIALIZATION // ISerializable implementation [System.Security.SecurityCritical] // auto-generated_required void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) { // We cannot ever call this. Contract.Assert(false, "Didn't expect to make it to SurrogateEncoder.GetObjectData"); throw new ArgumentException(Environment.GetResourceString("Arg_ExecutionEngineException")); } #endif } } // 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
- ScrollChrome.cs
- BaseParser.cs
- ScrollBarRenderer.cs
- EntityDataSourceReferenceGroup.cs
- HttpConfigurationContext.cs
- CaseExpr.cs
- ColumnCollection.cs
- ObjectToModelValueConverter.cs
- PopupControlService.cs
- DATA_BLOB.cs
- ColorTransformHelper.cs
- TextEditorLists.cs
- ObjectListSelectEventArgs.cs
- TemplateEditingFrame.cs
- FrameworkContentElement.cs
- ComplexLine.cs
- ServiceEndpointCollection.cs
- ToolStripItemBehavior.cs
- WebPartZoneCollection.cs
- InternalSafeNativeMethods.cs
- SiteOfOriginPart.cs
- TableAdapterManagerMethodGenerator.cs
- MarshalDirectiveException.cs
- SpeechSeg.cs
- NodeFunctions.cs
- X500Name.cs
- FileDataSourceCache.cs
- ConfigurationElementProperty.cs
- HttpBindingExtension.cs
- ToggleProviderWrapper.cs
- HttpPostLocalhostServerProtocol.cs
- WithParamAction.cs
- CurrentChangingEventArgs.cs
- FrameSecurityDescriptor.cs
- MultiAsyncResult.cs
- ReferenceEqualityComparer.cs
- GridViewRowPresenter.cs
- ValueOfAction.cs
- SessionStateUtil.cs
- KerberosRequestorSecurityToken.cs
- TransactionFlowOption.cs
- DataGridViewRowCollection.cs
- XmlArrayItemAttributes.cs
- KeyProperty.cs
- SweepDirectionValidation.cs
- SerTrace.cs
- CurrentChangedEventManager.cs
- AllowedAudienceUriElementCollection.cs
- SoapSchemaImporter.cs
- GridPattern.cs
- FigureHelper.cs
- ISAPIRuntime.cs
- ContentHostHelper.cs
- VisualProxy.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- BodyGlyph.cs
- OpCopier.cs
- MenuItem.cs
- Security.cs
- KeyInfo.cs
- SqlSelectStatement.cs
- DocumentGridContextMenu.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- ScrollProviderWrapper.cs
- SchemaMapping.cs
- AngleUtil.cs
- RelationshipEndMember.cs
- PaginationProgressEventArgs.cs
- InvalidPipelineStoreException.cs
- ToolBarButton.cs
- BaseCAMarshaler.cs
- AttributeData.cs
- XmlSchemaValidationException.cs
- SqlConnectionFactory.cs
- NamespaceList.cs
- LogEntry.cs
- VarRefManager.cs
- NeutralResourcesLanguageAttribute.cs
- UnsafeNativeMethods.cs
- FindProgressChangedEventArgs.cs
- AuthenticateEventArgs.cs
- SystemInformation.cs
- HttpContextWrapper.cs
- Random.cs
- ReversePositionQuery.cs
- DataGridViewComboBoxEditingControl.cs
- EditingMode.cs
- SecureUICommand.cs
- ExpandableObjectConverter.cs
- Maps.cs
- Condition.cs
- DataContext.cs
- TimeSpanConverter.cs
- ProviderConnectionPointCollection.cs
- TCEAdapterGenerator.cs
- UIElement.cs
- PathFigure.cs
- XamlFilter.cs
- SoapIgnoreAttribute.cs
- ScopelessEnumAttribute.cs