Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Runtime / Remoting / EnterpriseServicesHelper.cs / 1305376 / EnterpriseServicesHelper.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** File: ComponentServices.cs ** ** ** Purpose: Defines the general purpose ComponentServices ** ** ===========================================================*/ namespace System.Runtime.Remoting.Services { using System; using System.Reflection; using System.Runtime.Remoting.Activation; using System.Runtime.Remoting.Proxies; using System.Runtime.Remoting.Messaging; using System.Text; using System.Runtime.Serialization; using System.Runtime.CompilerServices; using System.Security.Permissions; using System.Runtime.InteropServices; //---------------------------------------------------------\\ //---------------------------------------------------------\\ // internal sealed class ComponentServices \\ //---------------------------------------------------------\\ //----------------------------------------------------------\\ [System.Security.SecurityCritical] // auto-generated_required [System.Runtime.InteropServices.ComVisible(true)] public sealed class EnterpriseServicesHelper { [System.Security.SecurityCritical] // auto-generated_required public static Object WrapIUnknownWithComObject(IntPtr punk) { return Marshal.InternalWrapIUnknownWithComObject(punk); } [System.Runtime.InteropServices.ComVisible(true)] public static IConstructionReturnMessage CreateConstructionReturnMessage(IConstructionCallMessage ctorMsg, MarshalByRefObject retObj) { IConstructionReturnMessage ctorRetMsg = null; // Create the return message ctorRetMsg = new ConstructorReturnMessage(retObj, null, 0, null, ctorMsg); // NOTE: WE ALLOW ONLY DEFAULT CTORs on SERVICEDCOMPONENTS return ctorRetMsg; } [System.Security.SecurityCritical] // auto-generated_required public static void SwitchWrappers(RealProxy oldcp, RealProxy newcp) { Object oldtp = oldcp.GetTransparentProxy(); Object newtp = newcp.GetTransparentProxy(); IntPtr oldcontextId = RemotingServices.GetServerContextForProxy(oldtp); IntPtr newcontextId = RemotingServices.GetServerContextForProxy(newtp); // switch the CCW from oldtp to new tp Marshal.InternalSwitchCCW(oldtp, newtp); } }; } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** File: ComponentServices.cs ** ** ** Purpose: Defines the general purpose ComponentServices ** ** ===========================================================*/ namespace System.Runtime.Remoting.Services { using System; using System.Reflection; using System.Runtime.Remoting.Activation; using System.Runtime.Remoting.Proxies; using System.Runtime.Remoting.Messaging; using System.Text; using System.Runtime.Serialization; using System.Runtime.CompilerServices; using System.Security.Permissions; using System.Runtime.InteropServices; //---------------------------------------------------------\\ //---------------------------------------------------------\\ // internal sealed class ComponentServices \\ //---------------------------------------------------------\\ //----------------------------------------------------------\\ [System.Security.SecurityCritical] // auto-generated_required [System.Runtime.InteropServices.ComVisible(true)] public sealed class EnterpriseServicesHelper { [System.Security.SecurityCritical] // auto-generated_required public static Object WrapIUnknownWithComObject(IntPtr punk) { return Marshal.InternalWrapIUnknownWithComObject(punk); } [System.Runtime.InteropServices.ComVisible(true)] public static IConstructionReturnMessage CreateConstructionReturnMessage(IConstructionCallMessage ctorMsg, MarshalByRefObject retObj) { IConstructionReturnMessage ctorRetMsg = null; // Create the return message ctorRetMsg = new ConstructorReturnMessage(retObj, null, 0, null, ctorMsg); // NOTE: WE ALLOW ONLY DEFAULT CTORs on SERVICEDCOMPONENTS return ctorRetMsg; } [System.Security.SecurityCritical] // auto-generated_required public static void SwitchWrappers(RealProxy oldcp, RealProxy newcp) { Object oldtp = oldcp.GetTransparentProxy(); Object newtp = newcp.GetTransparentProxy(); IntPtr oldcontextId = RemotingServices.GetServerContextForProxy(oldtp); IntPtr newcontextId = RemotingServices.GetServerContextForProxy(newtp); // switch the CCW from oldtp to new tp Marshal.InternalSwitchCCW(oldtp, newtp); } }; } // 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
- OrderPreservingPipeliningSpoolingTask.cs
- DataGridViewAccessibleObject.cs
- _AutoWebProxyScriptEngine.cs
- GridViewSelectEventArgs.cs
- ColorContextHelper.cs
- DoubleAnimationClockResource.cs
- KeySpline.cs
- DocumentPageTextView.cs
- DetailsViewPagerRow.cs
- VisualTarget.cs
- BasicCommandTreeVisitor.cs
- initElementDictionary.cs
- VisualBrush.cs
- FontSource.cs
- HtmlLink.cs
- StorageComplexTypeMapping.cs
- TextEditorContextMenu.cs
- SQLGuidStorage.cs
- UnsafeNativeMethods.cs
- SqlStatistics.cs
- FontFamilyIdentifier.cs
- CalculatedColumn.cs
- WorkflowTransactionOptions.cs
- EnumerableCollectionView.cs
- DocumentApplication.cs
- ToolStripItem.cs
- Paragraph.cs
- SimpleRecyclingCache.cs
- Model3DGroup.cs
- DbProviderFactory.cs
- CodePageUtils.cs
- StorageInfo.cs
- SpellerHighlightLayer.cs
- BinHexDecoder.cs
- DateRangeEvent.cs
- ProfileSettingsCollection.cs
- Peer.cs
- CodeEventReferenceExpression.cs
- DictionaryContent.cs
- PluggableProtocol.cs
- SqlSupersetValidator.cs
- SchemaDeclBase.cs
- AudioFormatConverter.cs
- CngKeyBlobFormat.cs
- ListSortDescriptionCollection.cs
- ProfileElement.cs
- ActivityTypeCodeDomSerializer.cs
- RelationshipManager.cs
- Quaternion.cs
- XmlStreamedByteStreamReader.cs
- TimeIntervalCollection.cs
- PropertyInfoSet.cs
- SharedPersonalizationStateInfo.cs
- HttpClientCertificate.cs
- WebReference.cs
- ElapsedEventArgs.cs
- TimeSpanConverter.cs
- DecoderReplacementFallback.cs
- SkipQueryOptionExpression.cs
- HttpApplicationFactory.cs
- TextElementEditingBehaviorAttribute.cs
- EventPropertyMap.cs
- SecurityUniqueId.cs
- RSAOAEPKeyExchangeFormatter.cs
- Version.cs
- QueryStringParameter.cs
- PageThemeParser.cs
- XPathDescendantIterator.cs
- AsymmetricCryptoHandle.cs
- Int32Animation.cs
- SystemTcpConnection.cs
- ConfigXmlDocument.cs
- XmlChoiceIdentifierAttribute.cs
- DateTimeAutomationPeer.cs
- precedingquery.cs
- CroppedBitmap.cs
- PageBreakRecord.cs
- ProcessStartInfo.cs
- CultureSpecificStringDictionary.cs
- Identifier.cs
- SerializerWriterEventHandlers.cs
- ErrorEventArgs.cs
- TypeSystem.cs
- SafeNativeMethods.cs
- ToolStripMenuItem.cs
- ItemDragEvent.cs
- __Filters.cs
- FragmentQueryProcessor.cs
- StyleTypedPropertyAttribute.cs
- RectAnimation.cs
- XmlCharType.cs
- PathFigureCollection.cs
- StringSource.cs
- ColorAnimationBase.cs
- PolyLineSegmentFigureLogic.cs
- ClearCollection.cs
- ToolStripProgressBar.cs
- DynamicPropertyHolder.cs
- DataPagerFieldItem.cs
- ProcessHostConfigUtils.cs