Ejemplo n.º 1
0
        private void btnGetAttribution_Click(object sender, RoutedEventArgs e)
        {
            var attribution = Adjust.GetAttributon();

            ShowSimpleMessage(
                title: "Get Attribution Result",
                message: attribution != null ? attribution.ToString() : "Received null!");
        }
Ejemplo n.º 2
0
        public static Dictionary <string, string> GetAttribution()
        {
#if NETFX_CORE
            AdjustAttribution attribution = Adjust.GetAttributon();
            if (attribution == null)
            {
                return(new Dictionary <string, string>());
            }

            var adjustAttributionMap = AdjustAttribution.ToDictionary(attribution);
            if (adjustAttributionMap == null)
            {
                return(new Dictionary <string, string>());
            }

            // convert from <string, object> to <string, string>
            return(adjustAttributionMap.ToDictionary(
                       x => char.ToLowerInvariant(x.Key[0]) + x.Key.Substring(1),
                       x => x.Value != null ? x.Value.ToString() : "null"));
#else
            return(null);
#endif
        }