зеркало из https://github.com/microsoft/Tx.git
Implemented functions to support writing EtwTdhEvent (#70)
* Implemented functions to support writing EtwTdhEvent * updated build workflow to match dotnet sdk in global.json
This commit is contained in:
Родитель
f3172d0169
Коммит
33441b90d2
|
@ -66,7 +66,21 @@ namespace Tx.Windows
|
|||
return _materializedEvent[key];
|
||||
}
|
||||
|
||||
set => throw new NotSupportedException();
|
||||
set
|
||||
{
|
||||
// Following expected behavior of traditional dict here
|
||||
// If key exists in systemFields, override value
|
||||
Func<EtwNativeEvent, object> accessor = e => value;
|
||||
if (_systemFields.ContainsKey(key))
|
||||
{
|
||||
_systemFields[key] = accessor;
|
||||
return;
|
||||
}
|
||||
|
||||
// Materialize event to add or reset value
|
||||
Materialize();
|
||||
_materializedEvent[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public ICollection<string> Keys
|
||||
|
@ -97,12 +111,20 @@ namespace Tx.Windows
|
|||
|
||||
public void Add(string key, object value)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
// Materialize event if needed
|
||||
Materialize();
|
||||
|
||||
// Add new value to materialized event
|
||||
_materializedEvent.Add(key, value);
|
||||
}
|
||||
|
||||
public void Add(KeyValuePair<string, object> item)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
// Materialize event if needed
|
||||
Materialize();
|
||||
|
||||
// Add new value to materialized event
|
||||
_materializedEvent.Add(item);
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
|
|
Загрузка…
Ссылка в новой задаче