Ejemplo n.º 1
0
        private static void InsertCommunicationLink(TrackingDataContext dc, InstrumentationDetails details)
        {
            // Extract all values.

            var value = details.GetValue("TinyId");

            if (!(value is Guid))
            {
                return;
            }
            var tinyId = (Guid)value;

            value = details.GetValue("LongUrl");
            var longUrl = value is string?(string)value : null;

            value = details.GetValue("ContextId");
            var contextId = value is Guid ? (Guid)value : (Guid?)null;

            value = details.GetValue("Instance");
            var instance = value is int?(int)value : (int?)null;

            // Execute the command.

            dc.TrackingInsertCommunicationLink(tinyId, contextId, longUrl, instance);
        }
Ejemplo n.º 2
0
        public static object GetValue(this InstrumentationDetails details, string name)
        {
            foreach (var entry in details)
            {
                if (entry.Key == name)
                {
                    return(entry.Value);
                }
            }

            return(null);
        }