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
- LinearQuaternionKeyFrame.cs
- XsdCachingReader.cs
- ObjectDataSourceDisposingEventArgs.cs
- MasterPageCodeDomTreeGenerator.cs
- ThreadInterruptedException.cs
- infer.cs
- AnonymousIdentificationModule.cs
- ServiceReflector.cs
- _NestedMultipleAsyncResult.cs
- PeerNameResolver.cs
- KeyValueInternalCollection.cs
- SocketAddress.cs
- NamespaceEmitter.cs
- MaterializeFromAtom.cs
- HttpException.cs
- CancellationTokenSource.cs
- NullExtension.cs
- TemplateAction.cs
- StrictAndMessageFilter.cs
- _emptywebproxy.cs
- ToolStripDropDownClosedEventArgs.cs
- WebEventTraceProvider.cs
- PackageRelationshipSelector.cs
- OpenFileDialog.cs
- ColorConverter.cs
- AdornerLayer.cs
- SeparatorAutomationPeer.cs
- OdbcFactory.cs
- ResourcesGenerator.cs
- HttpCachePolicy.cs
- List.cs
- HtmlContainerControl.cs
- DataServiceException.cs
- ConnectionPool.cs
- AlphaSortedEnumConverter.cs
- TextFormatterImp.cs
- ProfilePropertyNameValidator.cs
- ApplicationDirectory.cs
- PeerChannelFactory.cs
- SoapReflector.cs
- XmlDocumentFieldSchema.cs
- ValueConversionAttribute.cs
- PageContentCollection.cs
- VisemeEventArgs.cs
- WorkflowServiceAttributesTypeConverter.cs
- ServiceDescriptionSerializer.cs
- DataServiceClientException.cs
- DBConcurrencyException.cs
- ManifestResourceInfo.cs
- WrapperEqualityComparer.cs
- ParserExtension.cs
- KeySpline.cs
- SetterBaseCollection.cs
- Vector3DAnimationBase.cs
- ModuleBuilderData.cs
- PropertyManager.cs
- PrimitiveXmlSerializers.cs
- ExpressionCopier.cs
- FontFamilyValueSerializer.cs
- ValueSerializer.cs
- UnionExpr.cs
- VectorCollectionConverter.cs
- XmlTypeAttribute.cs
- TextRenderer.cs
- Timer.cs
- UserPersonalizationStateInfo.cs
- PostBackOptions.cs
- DbExpressionVisitor_TResultType.cs
- RtType.cs
- Base64Stream.cs
- HwndHostAutomationPeer.cs
- VariableAction.cs
- EventsTab.cs
- DocumentPageHost.cs
- TablePatternIdentifiers.cs
- SafeWaitHandle.cs
- FillErrorEventArgs.cs
- BitmapEncoder.cs
- Certificate.cs
- ExtensionQuery.cs
- CodeParameterDeclarationExpression.cs
- UnsafeNativeMethods.cs
- StandardBindingElementCollection.cs
- CngProvider.cs
- ConnectionInterfaceCollection.cs
- ObfuscationAttribute.cs
- SiteMapNodeItem.cs
- WebZone.cs
- AmbientValueAttribute.cs
- GACMembershipCondition.cs
- AnnouncementEventArgs.cs
- EntityProviderServices.cs
- Parsers.cs
- SoapDocumentMethodAttribute.cs
- UpdateManifestForBrowserApplication.cs
- OneOfScalarConst.cs
- DecoderFallback.cs
- GcSettings.cs
- DesignerAutoFormatCollection.cs
- DataSourceControlBuilder.cs