<commit_before>﻿#if XFORMS
namespace Caliburn.Micro.Xamarin.Forms
#else
namespace Caliburn.Micro
#endif
{
    using System;
    using System.Globalization;
    using System.Linq;
    using System.Reflection;
    using System.Collections.Generic;
#if !SILVERLIGHT
    using System.ComponentModel;
#endif

    /// <summary>
    /// A service that is capable of properly binding values to a method's parameters and creating instances of <see cref="IResult"/>.
    /// </summary>
    public static class MessageBinder {
        /// <summary>
        /// The special parameter values recognized by the message binder along with their resolvers.
        /// Parameter names are case insensitive so the specified names are unique and can be used with different case variations
        /// </summary>
        public static readonly Dictionary<string, Func<ActionExecutionContext, object>> SpecialValues =
            new Dictionary<string, Func<ActionExecutionContext, object>>(StringComparer.OrdinalIgnoreCase)
            {
                {"$eventargs", c => c.EventArgs},
#if XFORMS
                {"$datacontext", c => c.Source.BindingContext},
                {"$bindingcontext", c => c.Source.BindingContext},
#else
                {"$datacontext", c => c.Source.DataContext},
#endif
                {"$source", c => c.Source},
                {"$executioncontext", c => c},
                {"$view", c => c.View}
            };

        /// <summary>
        /// Custom converters used by the framework registered by destination type for which they will be selected.
        /// The converter is passed the existing value to convert and a "context" object.
        /// </summary>
        public static readonly Dictionary<Type, Func<object, object, object>> CustomConverters =<commit_msg>#319 Add $clickedItem to WinRT projects<commit_after>﻿#if XFORMS
namespace Caliburn.Micro.Xamarin.Forms
#else
namespace Caliburn.Micro
#endif
{
    using System;
    using System.Globalization;
    using System.Linq;
    using System.Reflection;
    using System.Collections.Generic;
#if !SILVERLIGHT
    using System.ComponentModel;
#endif
#if WinRT
    using Windows.UI.Xaml.Controls;
#endif

    /// <summary>
    /// A service that is capable of properly binding values to a method's parameters and creating instances of <see cref="IResult"/>.
    /// </summary>
    public static class MessageBinder {
        /// <summary>
        /// The special parameter values recognized by the message binder along with their resolvers.
        /// Parameter names are case insensitive so the specified names are unique and can be used with different case variations
        /// </summary>
        public static readonly Dictionary<string, Func<ActionExecutionContext, object>> SpecialValues =
            new Dictionary<string, Func<ActionExecutionContext, object>>(StringComparer.OrdinalIgnoreCase)
            {
                {"$eventargs", c => c.EventArgs},
#if XFORMS
                {"$datacontext", c => c.Source.BindingContext},
                {"$bindingcontext", c => c.Source.BindingContext},
#else
                {"$datacontext", c => c.Source.DataContext},
#endif
#if WinRT
                {"$clickeditem", c => ((ItemClickEventArgs)c.EventArgs).ClickedItem},
#endif
                {"$source", c => c.Source},
                {"$executioncontext", c => c},
                {"$view", c => c.View}
            };

        /// <summary>
        /// Custom converters used by the framework registered by destination type for which they will be selected.
        /// The converter is passed the existing value to convert and a "context" object.
        /// </summary>
        public static readonly Dictionary<Type, Func<object, object, object>> CustomConverters =
{'fraction_non_alphanumeric': 0.1077127659574468, 'fraction_numerical': 0.0007978723404255319, 'mean_word_length': 2.531455399061033, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 44, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '924112', 'n_tokens_mistral': 965, 'n_tokens_neox': 939, 'n_words': 330}