当前位置: 首页>>代码示例>>C#>>正文


C# BaseEvent.GetType方法代码示例

本文整理汇总了C#中BaseEvent.GetType方法的典型用法代码示例。如果您正苦于以下问题:C# BaseEvent.GetType方法的具体用法?C# BaseEvent.GetType怎么用?C# BaseEvent.GetType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BaseEvent的用法示例。


在下文中一共展示了BaseEvent.GetType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ToEventData

        public static EventData ToEventData(BaseEvent evnt, IDictionary<string, object> headers)
        {
            var data = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(evnt, SerializerSettings));

            var eventHeaders = new Dictionary<string, object>(headers)
            {
                {
                    "EventClrTypeName", evnt.GetType().AssemblyQualifiedName
                }
            };
            var metadata = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(eventHeaders, SerializerSettings));

            var typeName = TypeToCamelcase(evnt.GetType());
            return new EventData(evnt.EventId, typeName, true, data, metadata);
        }
开发者ID:adamfur,项目名称:CqrsLab,代码行数:15,代码来源:EventDataCreator.cs

示例2: Send

 /// <summary>
 /// Perform actual send
 /// </summary>
 private void Send(IDebugProcess2 process, IDebugProgram2 program, IDebugThread2 thread, BaseEvent @event)
 {
     var guid = @event.IID;
     DLog.Debug(DContext.VSDebuggerEvent, "DebugEngine Event {0} {1}", @event.GetType().Name, guid);
     var rc = callback.Event(engine, process, program, thread, @event, ref guid, (uint)@event.Attributes);
     if (!ErrorHandler.Succeeded(rc))
     {
         DLog.Error(DContext.VSDebuggerEvent, "DebugEngine Event failed {0}", rc);
     }
 }
开发者ID:Xtremrules,项目名称:dot42,代码行数:13,代码来源:EngineEventCallback.cs

示例3: SendEvent

 /// <summary>
 /// Send the given event to all event sinks
 /// </summary>
 private void SendEvent(IDebugCoreServer2 server, IDebugPort2 port, IDebugProcess2 process, IDebugProgram2 program, BaseEvent @event)
 {
     var iid = @event.IID;
     DLog.Debug(DContext.VSDebuggerEvent, "DebugPort Event {0} {1}", @event.GetType().Name, iid);
     foreach (var eventSink in eventSinks)
     {
         var events = eventSink as IDebugPortEvents2;
         if (events != null)
         {
             var rc = events.Event(server, port, process, program, @event, ref iid);
             if (!ErrorHandler.Succeeded(rc))
             {
                 DLog.Error(DContext.VSDebuggerEvent, "DebugPort Event failed {0}", rc);
             }
         }
     }
 }
开发者ID:Xtremrules,项目名称:dot42,代码行数:20,代码来源:DebugPort.cs


注:本文中的BaseEvent.GetType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。