Ayende @ Rahien

Ayende @ Rahien

Oren Eini aka Ayende Rahien CEO of Hibernating Rhinos LTD, which develops RavenDB, a NoSQL Open Source Document Database.

Get in touch with me:

oren@ravendb.net

+972 52-548-6969

Posts: 7,339 | Comments: 50,707

Copyright ©️ Ayende Rahien 2004 — 2022

Privacy Policy Terms
filter by tags archive
stack view grid view
  • architecture (529) rss
  • bugs (419) rss
  • challanges (103) rss
  • community (336) rss
  • databases (410) rss
  • design (834) rss
  • development (541) rss
  • hibernating-practices (57) rss
  • miscellaneous (589) rss
  • performance (351) rss
  • programming (1024) rss
  • raven (1308) rss
  • ravendb.net (365) rss
  • reviews (181) rss
  • uberprof (40) rss
  • 2022
    • July (1)
    • June (12)
    • May (9)
    • April (14)
    • March (15)
    • February (13)
    • January (16)
  • 2021
    • December (23)
    • November (20)
    • October (16)
    • September (6)
    • August (16)
    • July (11)
    • June (16)
    • May (4)
    • April (10)
    • March (11)
    • February (15)
    • January (14)
  • 2020
    • December (10)
    • November (13)
    • October (15)
    • September (6)
    • August (9)
    • July (9)
    • June (17)
    • May (15)
    • April (14)
    • March (21)
    • February (16)
    • January (13)
  • 2019
    • December (17)
    • November (14)
    • October (16)
    • September (10)
    • August (8)
    • July (16)
    • June (11)
    • May (13)
    • April (18)
    • March (12)
    • February (19)
    • January (23)
  • 2018
    • December (15)
    • November (14)
    • October (19)
    • September (18)
    • August (23)
    • July (20)
    • June (20)
    • May (23)
    • April (15)
    • March (23)
    • February (19)
    • January (23)
  • 2017
    • December (21)
    • November (24)
    • October (22)
    • September (21)
    • August (23)
    • July (21)
    • June (24)
    • May (21)
    • April (21)
    • March (23)
    • February (20)
    • January (23)
  • 2016
    • December (17)
    • November (18)
    • October (22)
    • September (18)
    • August (23)
    • July (22)
    • June (17)
    • May (24)
    • April (16)
    • March (16)
    • February (21)
    • January (21)
  • 2015
    • December (5)
    • November (10)
    • October (9)
    • September (17)
    • August (20)
    • July (17)
    • June (4)
    • May (12)
    • April (9)
    • March (8)
    • February (25)
    • January (17)
  • 2014
    • December (22)
    • November (19)
    • October (21)
    • September (37)
    • August (24)
    • July (23)
    • June (13)
    • May (19)
    • April (24)
    • March (23)
    • February (21)
    • January (24)
  • 2013
    • December (23)
    • November (29)
    • October (27)
    • September (26)
    • August (24)
    • July (24)
    • June (23)
    • May (25)
    • April (26)
    • March (24)
    • February (24)
    • January (21)
  • 2012
    • December (19)
    • November (22)
    • October (27)
    • September (24)
    • August (30)
    • July (23)
    • June (25)
    • May (23)
    • April (25)
    • March (25)
    • February (28)
    • January (24)
  • 2011
    • December (17)
    • November (14)
    • October (24)
    • September (28)
    • August (27)
    • July (30)
    • June (19)
    • May (16)
    • April (30)
    • March (23)
    • February (11)
    • January (26)
  • 2010
    • December (29)
    • November (28)
    • October (35)
    • September (33)
    • August (44)
    • July (17)
    • June (20)
    • May (53)
    • April (29)
    • March (35)
    • February (33)
    • January (36)
  • 2009
    • December (37)
    • November (35)
    • October (53)
    • September (60)
    • August (66)
    • July (29)
    • June (24)
    • May (52)
    • April (63)
    • March (35)
    • February (53)
    • January (50)
  • 2008
    • December (58)
    • November (65)
    • October (46)
    • September (48)
    • August (96)
    • July (87)
    • June (45)
    • May (51)
    • April (52)
    • March (70)
    • February (43)
    • January (49)
  • 2007
    • December (100)
    • November (52)
    • October (109)
    • September (68)
    • August (80)
    • July (56)
    • June (150)
    • May (115)
    • April (73)
    • March (124)
    • February (102)
    • January (68)
  • 2006
    • December (95)
    • November (53)
    • October (120)
    • September (57)
    • August (88)
    • July (54)
    • June (103)
    • May (89)
    • April (84)
    • March (143)
    • February (78)
    • January (64)
  • 2005
    • December (70)
    • November (97)
    • October (91)
    • September (61)
    • August (74)
    • July (92)
    • June (100)
    • May (53)
    • April (42)
    • March (41)
    • February (84)
    • January (31)
  • 2004
    • December (49)
    • November (26)
    • October (26)
    • September (6)
    • April (10)
RavenDB Workshops - Deep dive into practical use of Document Data Modeling
  previous post next post  
Sep 23 2010

How to find the stack trace for data binding?

time to read 1 min | 61 words

This is a rather special request, I’ll admit. For reasons of my own, I need to find the method(s) called to actually performed data binding in WPF & WinForms.

I have an elegant solution, which is too large to include in this blog post, but I’ll say that it doesn’t involves reflector at all.

Can you figure it out?

Tweet Share Share 14 comments

  previous post next post  

Comments

configurator
23 Sep 2010
10:12 AM
configurator

Throwing an exception and looking at its stack trace?

Andres
23 Sep 2010
10:13 AM
Andres

Dynamics?

Dalibor Čarapić
23 Sep 2010
10:37 AM
Dalibor Čarapić

Use StackTrace class?

Paulo Quicoli
23 Sep 2010
10:47 AM
Paulo Quicoli

Maybe, using some AOP you can log those methods for further use.

Harry M
23 Sep 2010
11:03 AM
Harry M

I have discovered a truly marvelous method to find the methods used in databinding, in WPF or Winforms. This margin is too narrow to contain it.

Lars Hundertwasser
23 Sep 2010
11:22 AM
Lars Hundertwasser

This sounds like "Fermat's Last Theorem" :). Sure hope the outcome will be different.

Hugo
23 Sep 2010
11:24 AM
Hugo

Use a "debug" converter, which does nothing but return the value passed in, and set a breakpoint in the "Convert" method?

Samuel Jack
23 Sep 2010
11:48 AM
Samuel Jack

Put breakpoints in the get and set methods of properties that are databound, then look at the stack trace in Visual Studio.

For bonus points, enable .Net Framework source stepping and you can step through the databinding engine.

Alex Simkin
23 Sep 2010
12:57 PM
Alex Simkin

@Samuel Jack Yep. That's how I do it too.

Daniel Hoelbling
23 Sep 2010
15:26 PM
Daniel Hoelbling

Dynamic Proxy Interceptor with a Breakpoint in it? ;)

greetings Daniel

Shawn Wildermuth
23 Sep 2010
17:11 PM
Shawn Wildermuth

Converter.

Leon Breedt
23 Sep 2010
21:26 PM
Leon Breedt

Trace points and printing of $CALLSTACK?

René van den Berg
24 Sep 2010
09:09 AM
René van den Berg

Subclass Binding?

Dathan
24 Sep 2010
14:57 PM
Dathan

Two of my three approaches were already mentioned above:

1) Breakpoint in the property getter/setter;

2) Throw an exception in the property getter/setter;

Also, you could use the profiling API, but I don't think that counts as an "elegant solution."

For WinForms, you could probably also attach Format and/or Parse listeners to the Binding, and break/throw inside the appropriate methods. There's no guarantee that the call to Format/Parse is going to be made within the specific call stack that you're hoping to find, though.

Comment preview

Comments have been closed on this topic.

Markdown formatting

ESC to close

Markdown turns plain text formatting into fancy HTML formatting.

Phrase Emphasis

*italic*   **bold**
_italic_   __bold__

Links

Inline:

An [example](http://url.com/ "Title")

Reference-style labels (titles are optional):

An [example][id]. Then, anywhere
else in the doc, define the link:
  [id]: http://example.com/  "Title"

Images

Inline (titles are optional):

![alt text](/path/img.jpg "Title")

Reference-style:

![alt text][id]
[id]: /url/to/img.jpg "Title"

Headers

Setext-style:

Header 1
========
Header 2
--------

atx-style (closing #'s are optional):

# Header 1 #
## Header 2 ##
###### Header 6

Lists

Ordered, without paragraphs:

1.  Foo
2.  Bar

Unordered, with paragraphs:

*   A list item.
    With multiple paragraphs.
*   Bar

You can nest them:

*   Abacus
    * answer
*   Bubbles
    1.  bunk
    2.  bupkis
        * BELITTLER
    3. burper
*   Cunning

Blockquotes

> Email-style angle brackets
> are used for blockquotes.
> > And, they can be nested.
> #### Headers in blockquotes
> 
> * You can quote a list.
> * Etc.

Horizontal Rules

Three or more dashes or asterisks:

---
* * *
- - - - 

Manual Line Breaks

End a line with two or more spaces:

Roses are red,   
Violets are blue.

Fenced Code Blocks

Code blocks delimited by 3 or more backticks or tildas:

```
This is a preformatted
code block
```

Header IDs

Set the id of headings with {#<id>} at end of heading line:

## My Heading {#myheading}

Tables

Fruit    |Color
---------|----------
Apples   |Red
Pears	 |Green
Bananas  |Yellow

Definition Lists

Term 1
: Definition 1
Term 2
: Definition 2

Footnotes

Body text with a footnote [^1]
[^1]: Footnote text here

Abbreviations

MDD <- will have title
*[MDD]: MarkdownDeep

 

FUTURE POSTS

No future posts left, oh my!

RECENT SERIES

  1. Challenge (69):
    01 Jul 2022 - Find the stack smash bug… – answer
  2. High performance .NET (6):
    27 Jun 2022 - Building a Redis Clone – skipping strings
  3. re (31):
    02 Jun 2022 - BonsaiDb performance update
  4. Production postmortem (37):
    29 Apr 2022 - Deduplicating replication speed
  5. Recording (3):
    11 Apr 2022 - Clean Architecture with RavenDB
View all series

RECENT COMMENTS

  • Adrian, You can find the implementation here: https://github.com/dotnet/runtime/blob/main/src/coreclr/vm/threads.cpp#L6...
    By Oren Eini on Challenge: Find the stack smash bug… – answer
  • The documentation for RuntimeHelpers.EnsureSufficientExecutionStack states: Ensures that the remaining stack space is large e...
    By Adrian on Challenge: Find the stack smash bug… – answer
  • Robert, thats a good example why I insist on intermediary variables. Helps with debugging, too
    By Christian Sauer on Challenge: Find the stack smash bug…
  • Robert, :+1
    By Oren Eini on Challenge: Find the stack smash bug…
  • There is at least a problem in `var sizeInBytes = o.Count / (sizeof(byte) * 8) + o.Count % (sizeof(byte) * 8) == 0 ? 0 : 1;`...
    By Robert on Challenge: Find the stack smash bug…

Syndication

Main feed Feed Stats
Comments feed   Comments Feed Stats