Mesasge Analyzer自定义图表 [英] Mesasge Analyzer Custom Chart

查看:95
本文介绍了Mesasge Analyzer自定义图表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

创建自定义图表时如何执行更复杂的数据绑定?我有一个网络跟踪,我想绘制一些https clienthello数据。具体来说,你好的client_version。我可以将记录[0] .fragment [0] .body.client_version
添加到分析网格中,它在那里显示正常。当我尝试将它添加到我的新图表的数据选项卡中的行字段时,我得到一个例外。如果我只输入"记录"进入Row Fields看起来它显示RecordLayers对应的
ToString函数。如果我输入记录[0]则不显示任何内容。如果我输入记录[0] .fragment,我会得到以下异常:

How do I perform more complex data binding when creating a custom chart? I have a network trace and I want to chart some of the https clienthello data. Specifically, the client_version of the hello. I can add records[0].fragment[0].body.client_version to the Analysis Grid and it displays fine there. When I try to add it to the Row Fields in the Data tab of my new chart I get an exception. If I enter just "records" into the Row Fields it looks like it displays the RecordLayers corresponding ToString function. If I enter records[0] it displays nothing. If I enter records[0].fragment I get the following exception:

哈希码:ca320bdbaeb07c178d6593bbac8c66cf



内部异常消息:
null

异常消息:
PropertyPath中的语法错误'Binding.Path'记录中的语法错误[0]'...'_fragment'。'。

内部异常调用堆栈:
null

异常调用堆栈:



  在System.Windows.PropertyPath.PrepareSourceValueInfo(ITypeDescriptorContext typeDescriptorContext)  在System.Windows.Controls.DataGridColumn.CreateDefaultColumn(ItemPropertyInfo
itemProperty) &NBSP ;在System.Windows.Controls.DataGrid.GenerateColumns(ReadOnlyCollection`1 itemProperties,数据网格的数据网格,Collection`1 columnCollection)  在System.Windows.Controls.DataGrid.AddAutoColumns()  在System.Windows。 Controls.DataGrid.OnItemsSourceChanged(IEnumerable
oldValue,IEnumerable newValue)   at System.Windows.Controls.ItemsControl.OnItemsSourceChanged(DependencyObject d,DependencyPropertyChangedEventArgs e)   at System.Windows.DependencyObject.OnPropertyChanged( DependencyPropertyChangedEventArgs $ b $是)  在System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs E)  在System.Windows.DependencyObject.NotifyPropertyChange(DependencyP ropertyChangedEventArgs args)  在System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex
entryIndex,DependencyProperty dp,PropertyMetadata metadata,EffectiveValueEntry oldEntry,EffectiveValueEntry& newEntry,Boolean coerceWithDeferredReference,Boolean coerceWithCurrentValue,OperationType operationType)  在System.Windows.DependencyObject.InvalidateProperty(DependencyProperty
dp,Boolean preserveCurrentValue)  在System.Windows.Data.BindingExpressionBase.Invalidate(Boolean isASubPropertyChange)  在System.Windows.Data.BindingExpression.TransferValue(Object newValue,Boolean isASubPropertyChange)  
at MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32 k,ICollectionView collectionView,Object newValue,Boolean isASubPropertyChange)  在MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32 k,ICollectionView collectionView)  
at MS.Internal.Data.ClrBindingWorker.OnSourcePropertyChanged(Object o,String propName)  在System.Windows.WeakEventManager.ListenerList`1.DeliverEvent(Object sender,EventArgs e,Type managerType)  在System.Windows.WeakEventManager.DeliverEventToList(对象
sender,EventArgs args,ListenerList list)  在System.ComponentModel.PropertyChangedEventManager.OnPropertyChanged(Object sender,PropertyChangedEventArgs args)  在Microsoft.Protocols.Tools.UI.Controls.Summary.SimpleGridViewerVm.UpdateData(IDataViewDataSource
sender,DataSet dataSet)  在Microsoft.Opn.Runtime.Summary.SummaryDataView.OnContentChangeWorkerCompleted(Object sender,RunWorkerCompletedEventArgs e)  在System.Windows.Threading.ExceptionWrapper.InternalRealCall(委托回调,
对象args,Int32 numArgs)  在MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source,Delegate方法,Object args,Int32 numArgs,Delegate catchHandler)  在System.Windows.Threading.DispatcherOperation.InvokeImpl()   System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext,ContextCallback callback,Object state,Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext,ContextCallback callback,
Object state,Boolean preserveSyncCtx)  在System.Threading.ExecutionContext.Run(ExecutionContext executionContext,ContextCallback回调,对象状态)  在System.Windows.Threading.DispatcherOperation.Invoke()  在System.Windows.Threading.Dispatcher.ProcessQueue()   System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd,Int32 msg,IntPtr wParam,IntPtr lParam,Boolean& processed)
  在MS.Win32.HwndWrapper.WndProc(IntPtr hwnd,Int32 msg,IntPtr wParam,IntPtr lParam,Boolean& processed)  
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)  在System.Windows.Threading.ExceptionWrapper.InternalRealCall(委托回调,对象args,Int32 numArgs)  在MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object
source,Delegate方法,Object args,Int32 numArgs,Delegate catchHandler)  在System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority,TimeSpan timeout,Delegate方法,Object args,Int32 numArgs)  在MS.Win32.HwndSubclass.SubclassWndProc(IntPtr
hwnd,Int32 msg,IntPtr wParam,IntPtr lParam)  在MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)  在System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame框架)  在System.Windows.Application.RunInternal(Window
窗口)  在System.Windows.Application.Run()  在Microsoft.Protocols.Tools.UI.Analysis.App.Main()




Hash Code: ca320bdbaeb07c178d6593bbac8c66cf

Inner Exception Message:
null
Exception Message:
Syntax error in PropertyPath 'Syntax error in Binding.Path 'records[0]' ... '_fragment'.'.
Inner Exception Call Stack:
null
Exception Call Stack:

   at System.Windows.PropertyPath.PrepareSourceValueInfo(ITypeDescriptorContext typeDescriptorContext)   at System.Windows.Controls.DataGridColumn.CreateDefaultColumn(ItemPropertyInfo itemProperty)   at System.Windows.Controls.DataGrid.GenerateColumns(ReadOnlyCollection`1 itemProperties, DataGrid dataGrid, Collection`1 columnCollection)   at System.Windows.Controls.DataGrid.AddAutoColumns()   at System.Windows.Controls.DataGrid.OnItemsSourceChanged(IEnumerable oldValue, IEnumerable newValue)   at System.Windows.Controls.ItemsControl.OnItemsSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)   at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp, Boolean preserveCurrentValue)   at System.Windows.Data.BindingExpressionBase.Invalidate(Boolean isASubPropertyChange)   at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)   at MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32 k, ICollectionView collectionView, Object newValue, Boolean isASubPropertyChange)   at MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32 k, ICollectionView collectionView)   at MS.Internal.Data.ClrBindingWorker.OnSourcePropertyChanged(Object o, String propName)   at System.Windows.WeakEventManager.ListenerList`1.DeliverEvent(Object sender, EventArgs e, Type managerType)   at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)   at System.ComponentModel.PropertyChangedEventManager.OnPropertyChanged(Object sender, PropertyChangedEventArgs args)   at Microsoft.Protocols.Tools.UI.Controls.Summary.SimpleGridViewerVm.UpdateData(IDataViewDataSource sender, DataSet dataSet)   at Microsoft.Opn.Runtime.Summary.SummaryDataView.OnContentChangeWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e)   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)   at System.Windows.Threading.DispatcherOperation.InvokeImpl()   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)   at System.Windows.Threading.DispatcherOperation.Invoke()   at System.Windows.Threading.Dispatcher.ProcessQueue()   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)   at System.Windows.Application.RunInternal(Window window)   at System.Windows.Application.Run()   at Microsoft.Protocols.Tools.UI.Analysis.App.Main()

绑定到数组是否有效?此外,如果消息堆栈中有两个具有相同名称的字段,您如何明确指定要使用的字段?它似乎使用了消息堆栈中最顶端的字段。

Does binding to arrays work? Also, if there are two fields with the same name in the message stack, how do you explicitly specify which field you want to use? It appears to use the top most field in the message stack.

推荐答案

我能够重现崩溃,我提交了一个错误。

I was able to repro the crash and I filed a bug.

至于引用记录的版本字段,似乎可以限制哪些图表可以绑定。 我将提交一个错误来解决这个问题,但是我可以在短期内为您提供解决方案。 您可以通过编写
一些简单的OPN来创建属性。 然后改为引用该属性。 只需创建一个名为TLSExt.OPN的文件,将下面的内容放入其中,然后将其复制到您的用户\YOURID \ AppData \ Local \ Microsoft \ MyessAnalyzer \OpnAndConfiguration \Opns目录。 如果您升级
或卸载,则您的更改将会丢失。 所以请在此位置以外保留副本。

As for referencing the version field of a record, there seems to be a limitation with what charts can be bound to.  I will file a bug to address this, however I can give you a work-around for the short term.  You can create a property by writing some simple OPN.  Then reference that property instead.  Just create a file called TLSExt.OPN, put the contents below, and copy it to your users\YOURID\AppData\Local\Microsoft\MessageAnalyzer\OpnAndConfiguration\Opns directory.  If you upgrade or uninstall, your changes will be lost.  So keep a copy outside this location.

模块TLSExt;

使用TLS;

string get TLSVersion (此TLS.RecordLayers rl)

{

  return rl.records [0] .version.ToString();

}

string get TLSVersion(this TLS.RecordLayers rl)
{
 return rl.records[0].version.ToString();
}

如果您有任何疑问,请告诉我。

Let me know if you have questions.

谢谢,

Paul


这篇关于Mesasge Analyzer自定义图表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆