4

I'm doing some astrophysics research and I'm analysing data using Win-Form Chart component. On X-Axis is date and on Y-Axis is value, and I'm applying MovingAverage using member method DataManipulator.FinancialFormula of Chart on values.

I and my advisor are concerned how this function handles missing dates. So I tried to look with ILSpy into System.Windows.Forms.DataVisualization.dll to see how it's implemented but I found all function bodies empty but when I examined TcpClient Dispose and Close methods, I was able to see full function bodies. I have tried ILDasm and JustDecompile with same results as ILSpy.

Why are method bodies from System.Windows.Forms.DataVisualization.dll empty?

So where the real code of DataManipulator.FinancialFormula is located?

Or how this function handles gaps in dates?

Junaith
  • 3,298
  • 24
  • 34
Rfilip
  • 257
  • 1
  • 3
  • 16
  • Please, do not include information about a language used in a question title unless it wouldn't make sense without it. Tags serve this purpose. – Ondrej Janacek Mar 03 '14 at 18:52
  • I can see the method implementation in ILSpy. The `FinancialFormula` method is in `DataFormula` class which is derived by `DataManipulator`. – Junaith Mar 04 '14 at 06:13
  • @Junaith I can see function too, but function body is empty for me. When I select DataFormula.FinancialFormula, I can only see this: http://pastebin.com/bpCubq4v – Rfilip Mar 04 '14 at 14:52
  • @Rfilip - See the ILSpy screenshot http://i.imgur.com/5aHVAwL.jpg You can see the implementation – Junaith Mar 04 '14 at 15:08
  • @Junaith Ok. Strange. Maybe I'm looking into wrong file - "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Windows.Forms.DataVisualization.dll" Is this path correct? – Rfilip Mar 04 '14 at 15:23

1 Answers1

3

The difference between my and @Junaith output from ILSpy lead me to tought that I'm looking at wrong file -C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Windows.‌​Forms.DataVisualization.dll. This path I obtained from comment at top of metadata of System.Windows.Forms.DataVisualization.Charting.DataFormula viewed by using "Go to Definition" VS function on member method DataManipulator.FinancialFormula of Chart.

So I ran my program and with Process Explorer I looked on loaded .NET Assemblies in properties of my program process. For my surprise the dll mentioned before wasn't even there, instead I found there C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Wind0de890be#\a4711c664a774896b35428b1a3bf9470\System.Windows.Forms.DataVisualization.ni.dll.

I loaded that dll into ILSpy and methods have full implementation including their bodies.

Rfilip
  • 257
  • 1
  • 3
  • 16
  • 1
    It occurs that `ILSpy` can open assemblies directly from GAC: File -> Open from GAC. I had the same problem of empty function bodies in System.Data.dll. – Ilia Barahovsky May 13 '15 at 09:03