Beispiel #1
0
        internal void InitializeActorMethodInfo(MethodDescription[] actorInterfaceMethodDescriptions, int interfaceId,
                                                Dictionary <long, ActorMethodInfo> actorMethodInfos)
        {
            foreach (var actorInterfaceMethodDescription in actorInterfaceMethodDescriptions)
            {
                var methodInfo = actorInterfaceMethodDescription.MethodInfo;
                var ami        = new ActorMethodInfo()
                {
                    MethodName      = String.Concat(methodInfo.DeclaringType.Name, ".", methodInfo.Name),
                    MethodSignature = actorInterfaceMethodDescription.MethodInfo.ToString()
                };

                var key =
                    DiagnosticsEventManager.GetInterfaceMethodKey((uint)interfaceId,
                                                                  (uint)actorInterfaceMethodDescription.Id);
                actorMethodInfos[key] = ami;
            }
        }
        private void InitializeActorMethodInfo(DiagnosticsEventManager diagnosticsEventManager)
        {
            this.actorMethodInfo = new Dictionary <long, ActorMethodInfo>();
            foreach (var actorInterfaceType in this.actorTypeInformation.InterfaceTypes)
            {
                int interfaceId;
                MethodDescription[] actorInterfaceMethodDescriptions;
                diagnosticsEventManager.ActorMethodFriendlyNameBuilder.GetActorInterfaceMethodDescriptions(
                    actorInterfaceType, out interfaceId, out actorInterfaceMethodDescriptions);

                foreach (var actorInterfaceMethodDescription in actorInterfaceMethodDescriptions)
                {
                    var methodInfo = actorInterfaceMethodDescription.MethodInfo;
                    var ami        = new ActorMethodInfo()
                    {
                        MethodName      = String.Concat(methodInfo.DeclaringType.Name, ".", methodInfo.Name),
                        MethodSignature = actorInterfaceMethodDescription.MethodInfo.ToString()
                    };

                    var key = DiagnosticsEventManager.GetInterfaceMethodKey((uint)interfaceId, (uint)actorInterfaceMethodDescription.Id);
                    this.actorMethodInfo[key] = ami;
                }
            }
        }