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);
            }
        }
Beispiel #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]);
                }
            }
        }
Beispiel #3
0
        private static void AddHostName(IHaveMeta obj)
        {
            var hostName = Dns.GetHostName();

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

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