Commit c7a941c1 authored by Savorboard's avatar Savorboard

Merge branch 'master' of https://github.com/dotnetcore/CAP

parents 3f64c54f e8931b32
...@@ -9,7 +9,7 @@ namespace DotNetCore.CAP.Diagnostics ...@@ -9,7 +9,7 @@ namespace DotNetCore.CAP.Diagnostics
{ {
public class TracingHeaders : IEnumerable<KeyValuePair<string, string>> public class TracingHeaders : IEnumerable<KeyValuePair<string, string>>
{ {
private List<KeyValuePair<string, string>> _dataStore; private List<KeyValuePair<string, string>> _dataStore = new List<KeyValuePair<string, string>>();
public IEnumerator<KeyValuePair<string, string>> GetEnumerator() public IEnumerator<KeyValuePair<string, string>> GetEnumerator()
{ {
...@@ -23,11 +23,6 @@ namespace DotNetCore.CAP.Diagnostics ...@@ -23,11 +23,6 @@ namespace DotNetCore.CAP.Diagnostics
public void Add(string name, string value) public void Add(string name, string value)
{ {
if (_dataStore == null)
{
_dataStore = new List<KeyValuePair<string, string>>();
}
_dataStore.Add(new KeyValuePair<string, string>(name, value)); _dataStore.Add(new KeyValuePair<string, string>(name, value));
} }
...@@ -46,4 +41,4 @@ namespace DotNetCore.CAP.Diagnostics ...@@ -46,4 +41,4 @@ namespace DotNetCore.CAP.Diagnostics
_dataStore?.Clear(); _dataStore?.Clear();
} }
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment