public void Enrich(IHaveMeta obj)
        {
            var attributes = _assembly.CustomAttributes.Where(x => x.AttributeType.Name.StartsWith("Assembly"));

            foreach (var attributeData in attributes)
            {
                var key   = Key(attributeData);
                var value = Value(attributeData);
                obj.AddMeta(key, value);
            }
        }
Example #2
0
        public void Enrich(IHaveMeta obj)
        {
            if (obj == null)
            {
                return;
            }

            foreach (var key in _keys)
            {
                if (!obj.Meta.ContainsKey(key) || _overrideDefault)
                {
                    obj.AddMeta(key, _metaDataCache[key]);
                }
            }
        }
Example #3
0
        private static void AddHostName(IHaveMeta obj)
        {
            var hostName = Dns.GetHostName();

            obj.AddMeta("host_name", hostName);
        }
Example #4
0
        private void AddMachineName(IHaveMeta obj)
        {
            var machineName = Environment.MachineName;

            obj.AddMeta("machine_name", machineName);
        }