diff options
author | Mikhail Melnikov <mikhail_melnikov@epam.com> | 2017-12-03 21:23:57 +0300 |
---|---|---|
committer | Joel Martinez <joelmartinez@gmail.com> | 2017-12-04 16:28:39 +0300 |
commit | b100012a00751fcc71d1cc5ba14ab594bb6f7ffa (patch) | |
tree | f705f527bf816f00ead545d9013b73286d6073c0 /mdoc/Test/AttachedEventsAndProperties | |
parent | fbcacc7602d4a4055566fbca935293cb9b5e1936 (diff) |
mdoc: fixed breaks in frameworks mode #175
On the first phase of attached event check, we had to check name, not type
Added integration test on this case
Closes #174
Diffstat (limited to 'mdoc/Test/AttachedEventsAndProperties')
-rw-r--r-- | mdoc/Test/AttachedEventsAndProperties/AttachedEventExample.cs | 10 | ||||
-rw-r--r-- | mdoc/Test/AttachedEventsAndProperties/AttachedPropertyExample.cs | 21 |
2 files changed, 31 insertions, 0 deletions
diff --git a/mdoc/Test/AttachedEventsAndProperties/AttachedEventExample.cs b/mdoc/Test/AttachedEventsAndProperties/AttachedEventExample.cs index b2260c54..a2d0b3f9 100644 --- a/mdoc/Test/AttachedEventsAndProperties/AttachedEventExample.cs +++ b/mdoc/Test/AttachedEventsAndProperties/AttachedEventExample.cs @@ -77,5 +77,15 @@ namespace AttachedEventsAndProperties { } #endregion + + #region Negative example (the event type ends with "Event", but the name doesn't) + public static readonly RoutedEvent E; + public static void AddNeedsCleaning7Handler(DependencyObject d, RoutedEventHandler handler) + { + } + public static void RemoveNeedsCleaning7Handler(DependencyObject d, RoutedEventHandler handler) + { + } + #endregion } } diff --git a/mdoc/Test/AttachedEventsAndProperties/AttachedPropertyExample.cs b/mdoc/Test/AttachedEventsAndProperties/AttachedPropertyExample.cs index 9575cf17..cad4dca1 100644 --- a/mdoc/Test/AttachedEventsAndProperties/AttachedPropertyExample.cs +++ b/mdoc/Test/AttachedEventsAndProperties/AttachedPropertyExample.cs @@ -39,6 +39,27 @@ namespace AttachedEventsAndProperties element.SetValue(IsBubbleSourceProperty, value); } #endregion + + #region Negative example (the property type ends with "Event", but the name doesn't) + + public static readonly DependencyProperty P = DependencyProperty.RegisterAttached( + "IsBubbleSource3", + typeof(Boolean), + typeof(AquariumObject), + null +); + + public static void SetIsBubbleSource3(UIElement element, Boolean value) + { + element.SetValue(IsBubbleSourceProperty, value); + } + + public static Boolean GetIsBubbleSource3(UIElement element) + { + return (Boolean)element.GetValue(IsBubbleSourceProperty); + } + + #endregion } }
\ No newline at end of file |