The Labs \ Source Viewer \ SSCLI \ System.Runtime.Remoting.Messaging \ IMethodMessage

  1. // ==++==
  2. //
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. //
  14. // ==--==
  15. /*============================================================
  16. **
  17. ** File:    IMethodMessage.cs
  18. **
  19. **
  20. ** Purpose: Defines the message object interface
  21. **
  22. **
  23. ===========================================================*/
  24. namespace System.Runtime.Remoting.Messaging
  25. {
  26.     using System;
  27.     using System.Reflection;
  28.     using System.Security.Permissions;
  29.     using IList = System.Collections.IList;
  30.    
  31.     [System.Runtime.InteropServices.ComVisible(true)]
  32.     public interface IMethodMessage : IMessage
  33.     {
  34.         string Uri {
  35.             [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]
  36.             get;
  37.         }
  38.         string MethodName {
  39.             [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]
  40.             get;
  41.         }
  42.         string TypeName {
  43.             [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]
  44.             get;
  45.         }
  46.         object MethodSignature {
  47.             [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]
  48.             get;
  49.         }
  50.        
  51.         int ArgCount {
  52.             [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]
  53.             get;
  54.         }
  55.         [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]
  56.         string GetArgName(int index);
  57.         [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]
  58.         object GetArg(int argNum);
  59.         object[] Args {
  60.             [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]
  61.             get;
  62.         }
  63.        
  64.         bool HasVarArgs {
  65.             [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]
  66.             get;
  67.         }
  68.         LogicalCallContext LogicalCallContext {
  69.             [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]
  70.             get;
  71.         }
  72.        
  73.         // This is never actually put on the wire, it is
  74.         // simply used to cache the method base after it's
  75.         // looked up once.
  76.         MethodBase MethodBase {
  77.             [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]
  78.             get;
  79.         }
  80.     }
  81.    
  82.     [System.Runtime.InteropServices.ComVisible(true)]
  83.     public interface IMethodCallMessage : IMethodMessage
  84.     {
  85.         int InArgCount {
  86.             [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]
  87.             get;
  88.         }
  89.         [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]
  90.         string GetInArgName(int index);
  91.         [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]
  92.         object GetInArg(int argNum);
  93.         object[] InArgs {
  94.             [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]
  95.             get;
  96.         }
  97.     }
  98.    
  99.     [System.Runtime.InteropServices.ComVisible(true)]
  100.     public interface IMethodReturnMessage : IMethodMessage
  101.     {
  102.         int OutArgCount {
  103.             [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]
  104.             get;
  105.         }
  106.         [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]
  107.         string GetOutArgName(int index);
  108.         [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]
  109.         object GetOutArg(int argNum);
  110.         object[] OutArgs {
  111.             [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]
  112.             get;
  113.         }
  114.        
  115.         Exception Exception {
  116.             [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]
  117.             get;
  118.         }
  119.         object ReturnValue {
  120.             [SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]
  121.             get;
  122.         }
  123.     }
  124.    
  125. }

Developer Fusion