當前位置: 首頁>>代碼示例>>C#>>正文


C# Messaging.LogicalCallContext類代碼示例

本文整理匯總了C#中System.Runtime.Remoting.Messaging.LogicalCallContext的典型用法代碼示例。如果您正苦於以下問題:C# LogicalCallContext類的具體用法?C# LogicalCallContext怎麽用?C# LogicalCallContext使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


LogicalCallContext類屬於System.Runtime.Remoting.Messaging命名空間,在下文中一共展示了LogicalCallContext類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: ADAsyncWorkItem

 internal ADAsyncWorkItem(IMessage reqMsg, IMessageSink nextSink, IMessageSink replySink)
 {
     this._reqMsg = reqMsg;
     this._nextSink = nextSink;
     this._replySink = replySink;
     this._callCtx = CallContext.GetLogicalCallContext();
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:7,代碼來源:ADAsyncWorkItem.cs

示例2: Read

 public void Read(__BinaryParser input)
 {
     this.messageEnum = (MessageEnum) input.ReadInt32();
     if (IOUtil.FlagTest(this.messageEnum, MessageEnum.NoReturnValue))
     {
         this.returnValue = null;
     }
     else if (IOUtil.FlagTest(this.messageEnum, MessageEnum.ReturnValueVoid))
     {
         this.returnValue = instanceOfVoid;
     }
     else if (IOUtil.FlagTest(this.messageEnum, MessageEnum.ReturnValueInline))
     {
         this.returnValue = IOUtil.ReadWithCode(input);
     }
     if (IOUtil.FlagTest(this.messageEnum, MessageEnum.ContextInline))
     {
         this.scallContext = (string) IOUtil.ReadWithCode(input);
         LogicalCallContext context = new LogicalCallContext {
             RemotingData = { LogicalCallID = this.scallContext }
         };
         this.callContext = context;
     }
     if (IOUtil.FlagTest(this.messageEnum, MessageEnum.ArgsInline))
     {
         this.args = IOUtil.ReadArgs(input);
     }
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:28,代碼來源:BinaryMethodReturn.cs

示例3: AsyncWorkItem

 internal AsyncWorkItem(IMessage reqMsg, IMessageSink replySink, Context oldCtx, ServerIdentity srvID)
 {
     this._reqMsg = reqMsg;
     this._replySink = replySink;
     this._oldCtx = oldCtx;
     this._callCtx = CallContext.GetLogicalCallContext();
     this._srvID = srvID;
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:8,代碼來源:AsyncWorkItem.cs

示例4: SetLogicalCallContext

 // Sets the given logical call context object on the thread.
 // Returns the previous one.
 internal static LogicalCallContext SetLogicalCallContext(
     LogicalCallContext callCtx)
 {
     ExecutionContext ec = Thread.CurrentThread.GetMutableExecutionContext();
     LogicalCallContext prev = ec.LogicalCallContext;
     ec.LogicalCallContext = callCtx;
     return prev;
 }
開發者ID:krytht,項目名稱:DotNetReferenceSource,代碼行數:10,代碼來源:CallContext.cs

示例5: ReturnMessage

    public ReturnMessage(Object ret, Object[] outArgs, int outArgsCount,
                         LogicalCallContext callCtx, IMethodCallMessage mcm)
            {
                this.ret = ret;
                this.outArgs = outArgs;
                this.outArgsCount = outArgsCount;
                this.callCtx = callCtx;
                this.mcm = mcm;
            }
開發者ID:jjenki11,項目名稱:blaze-chem-rendering,代碼行數:9,代碼來源:ReturnMessage.cs

示例6: MessageMethodInvocation

 /// <summary>
 /// Extracts and interprets fields from "IMessage"
 /// 
 /// Samle IMassage when the method "ToString" is called:
 ///     msg.Properties["__Uri"]	
 ///         null	
 ///         object
 ///     msg.Properties["__MethodName"]	
 ///         "ToString"	
 ///         object {string}
 ///     msg.Properties["__MethodSignature"]	
 ///         {System.Type[0]}	
 ///         object {System.Type[]}
 ///     msg.Properties["__TypeName"]	
 ///         "System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"	
 ///         object {string}
 ///     msg.Properties["__Args"]	
 ///         {object[0]}	
 ///         object {object[]}
 ///     msg.Properties["__CallContext"]	
 ///         {System.Runtime.Remoting.Messaging.LogicalCallContext}	
 ///         object {System.Runtime.Remoting.Messaging.LogicalCallContext}
 ///     Type.GetType((string)msg.Properties["__TypeName"]) == typeof(object)	
 ///         true	
 ///         bool
 /// </summary>
 /// <param name="msg"></param>
 public MessageMethodInvocation(IMessage msg)
     : base(msg.Properties["__TypeName"] as string,
          msg.Properties["__MethodName"] as string,
          msg.Properties["__MethodSignature"] as Type[],
          msg.Properties["__Args"] as object[])
 {
     _message = msg;
     _callContext = _message.Properties["__CallContext"] as LogicalCallContext;
 }
開發者ID:frenzqse,項目名稱:loom-csharp-visualstudio,代碼行數:36,代碼來源:MessageMethodInvocation.cs

示例7: ReturnMessage

        public ReturnMessage (Exception e, IMethodCallMessage mcm)
        {
            _exception = e;
            
            if (mcm != null) {
                _methodBase = mcm.MethodBase;
                _callCtx = mcm.LogicalCallContext;
            }
            _args = new object[0];	// .NET does this
        }
開發者ID:runefs,項目名稱:Marvin,代碼行數:10,代碼來源:ReturnMessage.cs

示例8: ExecutionContext

        private ExecutionContext (ExecutionContext ec)
        {
#if !MOBILE
            if (ec._sc != null)
                _sc = new SecurityContext (ec._sc);
#endif
            if (ec._lcc != null)
                _lcc = (LogicalCallContext) ec._lcc.Clone ();

            _suppressFlow = ec._suppressFlow;
            _capture = true;
        }
開發者ID:KonajuGames,項目名稱:SharpLang,代碼行數:12,代碼來源:ExecutionContext.cs

示例9: MethodResponse

    internal MethodResponse(IMethodReturnMessage mrm)
            {
                outArgs = mrm.OutArgs;
                methodName = mrm.MethodName;
                typeName = mrm.TypeName;
                uri = mrm.Uri;
                hasVarArgs = mrm.HasVarArgs;
                context = mrm.LogicalCallContext;
                method = mrm.MethodBase;
                exception = mrm.Exception;
                returnValue = mrm.ReturnValue;
            }
開發者ID:jjenki11,項目名稱:blaze-chem-rendering,代碼行數:12,代碼來源:MethodResponse.cs

示例10: ExecutionContext

 private ExecutionContext(SerializationInfo info, StreamingContext context)
 {
     SerializationInfoEnumerator enumerator = info.GetEnumerator();
     while (enumerator.MoveNext())
     {
         if (enumerator.Name.Equals("LogicalCallContext"))
         {
             this._logicalCallContext = (System.Runtime.Remoting.Messaging.LogicalCallContext) enumerator.Value;
         }
     }
     this.Thread = System.Threading.Thread.CurrentThread;
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:12,代碼來源:ExecutionContext.cs

示例11: MethodMessage

 internal MethodMessage(Type interfaceType, string methodName, object[] args, string identity, bool responseRequired)
 {
     this.interfaceType = interfaceType;
     this.methodName = methodName;
     this.args = args;
     this.callContext = GetLogicalCallContext();
     if (responseRequired)
     {
         this.returnValueSignalEvent = new ManualResetEvent(false);
     }
     this.PopulateIdentity(this.callContext, identity);
     this.Clone();
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:13,代碼來源:MethodMessage.cs

示例12: ReturnMessage

        public ReturnMessage (object ret, object [] outArgs,
                   int outArgsCount, LogicalCallContext callCtx,
                   IMethodCallMessage mcm)
        {
            // outArgCount tells how many values of outArgs are valid

            _returnValue = ret;
            _args = outArgs;
            _callCtx = callCtx;
            if (mcm != null) {
                _uri = mcm.Uri;
                _methodBase = mcm.MethodBase;
            }
            if (_args == null) _args = new object [outArgsCount];
        }
開發者ID:Profit0004,項目名稱:mono,代碼行數:15,代碼來源:ReturnMessage.cs

示例13: Read

 internal void Read(__BinaryParser input)
 {
     this.messageEnum = (MessageEnum) input.ReadInt32();
     this.methodName = (string) IOUtil.ReadWithCode(input);
     this.typeName = (string) IOUtil.ReadWithCode(input);
     if (IOUtil.FlagTest(this.messageEnum, MessageEnum.ContextInline))
     {
         this.scallContext = (string) IOUtil.ReadWithCode(input);
         LogicalCallContext context = new LogicalCallContext {
             RemotingData = { LogicalCallID = this.scallContext }
         };
         this.callContext = context;
     }
     if (IOUtil.FlagTest(this.messageEnum, MessageEnum.ArgsInline))
     {
         this.args = IOUtil.ReadArgs(input);
     }
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:18,代碼來源:BinaryMethodCall.cs

示例14: SerializeContextElements

 private void SerializeContextElements(CdrOutputStream targetStream,
                                       LogicalCallContext callContext,
                                       Serializer contextElementSer) {
     // if no context elements specified, don't serialise a context sequence.
     if (m_contextElementKeys.Length > 0) {
         string[] contextSeq = new string[m_contextElementKeys.Length * 2];
         for (int i = 0; i < m_contextElementKeys.Length; i++) {
             string contextKey =
                 m_contextElementKeys[i];
             contextSeq[i * 2] = contextKey;
             if (callContext.GetData(contextKey) != null) {
                 contextSeq[i * 2 + 1] = callContext.GetData(contextKey).ToString();
             } else {
                 contextSeq[i * 2 + 1] = "";
             }
         }
         contextElementSer.Serialize(contextSeq, targetStream);
     }
 }
開發者ID:JnS-Software-LLC,項目名稱:iiop-net,代碼行數:19,代碼來源:ArgumentsSerializer.cs

示例15: BinaryMethodCallMessage

        internal BinaryMethodCallMessage(String uri, String methodName, String typeName, Object[] args, Object methodSignature, LogicalCallContext callContext, Object[] properties)
        {
            _methodName = methodName;
            _typeName = typeName;
            //_uri = uri;
            if (args == null)
                args = new Object[0];

            _inargs = args;
            _args = args;
            _methodSignature = methodSignature;
            if (callContext == null)
                _logicalCallContext = new LogicalCallContext();
            else
                _logicalCallContext = callContext;

            _properties = properties;

        }
開發者ID:ArildF,項目名稱:masters,代碼行數:19,代碼來源:binarymethodmessage.cs


注:本文中的System.Runtime.Remoting.Messaging.LogicalCallContext類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。