Skip to content

Commit 53cc05a

Browse files
committed
Vendor System.Reflection.Metadata and dependencies
1 parent 138b3db commit 53cc05a

File tree

507 files changed

+67026
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

507 files changed

+67026
-1
lines changed

tracer/build/_build/UpdateVendors/VendoredDependency.cs

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ static VendoredDependency()
6464
pathToSrc: new[] { "dnlib-3.4.0", "src" },
6565
transform: filePath => RewriteCsFileWithStandardTransform(filePath, originalNamespace: "dnlib"));
6666

67-
6867
Add(
6968
libraryName: "Datadog.Sketches",
7069
version: "1.0.0",
@@ -82,6 +81,41 @@ static VendoredDependency()
8281
transform: filePath => RewriteCsFileWithStandardTransform(filePath, originalNamespace: "IndieSystem.Text.RegularExpressions",
8382
AddIfNetcoreapp31OrGreater, AddNullableDirectiveTransform, AddIgnoreNullabilityWarningDisablePragma),
8483
relativePathsToExclude: new[] { "additional/HashCode.cs", "SR.resx" });
84+
85+
Add(
86+
libraryName: "Datadog.System.Collections.Immutable",
87+
version: "1.0.0",
88+
downloadUrl: "https://github.com/DataDog/dotnet-vendored-code/archive/refs/heads/main.zip",
89+
pathToSrc: new[] { "dotnet-vendored-code-main", "Datadog.System.Reflection.Metadata", "Datadog.System.Collections.Immutable" },
90+
transform: s => { });
91+
92+
Add(
93+
libraryName: "Datadog.System.Memory",
94+
version: "1.0.0",
95+
downloadUrl: "https://github.com/DataDog/dotnet-vendored-code/archive/refs/heads/main.zip",
96+
pathToSrc: new[] { "dotnet-vendored-code-main", "Datadog.System.Reflection.Metadata", "Datadog.System.Memory" },
97+
transform: s => { });
98+
99+
Add(
100+
libraryName: "Datadog.System.Private.CoreLib",
101+
version: "1.0.0",
102+
downloadUrl: "https://github.com/DataDog/dotnet-vendored-code/archive/refs/heads/main.zip",
103+
pathToSrc: new[] { "dotnet-vendored-code-main", "Datadog.System.Reflection.Metadata", "Datadog.System.Private.CoreLib" },
104+
transform: s => { });
105+
106+
Add(
107+
libraryName: "Datadog.System.Reflection.Metadata",
108+
version: "1.0.0",
109+
downloadUrl: "https://github.com/DataDog/dotnet-vendored-code/archive/refs/heads/main.zip",
110+
pathToSrc: new[] { "dotnet-vendored-code-main", "Datadog.System.Reflection.Metadata", "Datadog.System.Reflection.Metadata" },
111+
transform: s => { });
112+
113+
Add(
114+
libraryName: "Datadog.System.Runtime.CompilerServices.Unsafe",
115+
version: "1.0.0",
116+
downloadUrl: "https://github.com/DataDog/dotnet-vendored-code/archive/refs/heads/main.zip",
117+
pathToSrc: new[] { "dotnet-vendored-code-main", "Datadog.System.Reflection.Metadata", "Datadog.System.Runtime.CompilerServices.Unsafe" },
118+
transform: s => { });
85119
}
86120

87121
public static List<VendoredDependency> All { get; set; } = new List<VendoredDependency>();

tracer/dependabot/Datadog.Dependabot.Vendors.csproj

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,21 @@
3030
<!-- https://www.nuget.org/packages/IndieSystem.Text.RegularExpressions/0.6 -->
3131
<PackageReference Include="IndieSystem.Text.RegularExpressions" Version="0.6" />
3232

33+
<!-- https://www.nuget.org/packages/Datadog.System.Collections.Immutable/1.0.0 -->
34+
<PackageReference Include="Datadog.System.Collections.Immutable" Version="1.0.0" />
35+
36+
<!-- https://www.nuget.org/packages/Datadog.System.Memory/1.0.0 -->
37+
<PackageReference Include="Datadog.System.Memory" Version="1.0.0" />
38+
39+
<!-- https://www.nuget.org/packages/Datadog.System.Private.CoreLib/1.0.0 -->
40+
<PackageReference Include="Datadog.System.Private.CoreLib" Version="1.0.0" />
41+
42+
<!-- https://www.nuget.org/packages/Datadog.System.Reflection.Metadata/1.0.0 -->
43+
<PackageReference Include="Datadog.System.Reflection.Metadata" Version="1.0.0" />
44+
45+
<!-- https://www.nuget.org/packages/Datadog.System.Runtime.CompilerServices.Unsafe/1.0.0 -->
46+
<PackageReference Include="Datadog.System.Runtime.CompilerServices.Unsafe" Version="1.0.0" />
47+
3348
</ItemGroup>
3449

3550
</Project>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netstandard2.0</TargetFramework>
5+
<LangVersion>latest</LangVersion>
6+
</PropertyGroup>
7+
8+
<ItemGroup>
9+
<ProjectReference Include="..\Datadog.System.Memory\Datadog.System.Memory.csproj" />
10+
<ProjectReference Include="..\Datadog.System.Private.CoreLib\Datadog.System.Private.CoreLib.csproj" />
11+
</ItemGroup>
12+
13+
</Project>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
https://github.com/DataDog/dotnet-vendored-code/archive/refs/heads/main.zip
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Decompiled with JetBrains decompiler
2+
// Type: System.Collections.Generic.IHashKeyCollection`1
3+
// Assembly: System.Collections.Immutable, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
4+
// MVID: 5F9FF90F-0D16-4469-A104-76829D3705E2
5+
// Assembly location: C:\Users\dudi.keleti\.nuget\packages\system.collections.immutable\7.0.0\lib\net462\System.Collections.Immutable.dll
6+
// XML documentation location: C:\Users\dudi.keleti\.nuget\packages\system.collections.immutable\7.0.0\lib\net462\System.Collections.Immutable.xml
7+
8+
9+
#nullable enable
10+
using System.Collections.Generic;
11+
12+
namespace Datadog.System.Collections.Generic
13+
{
14+
internal interface IHashKeyCollection<in TKey>
15+
{
16+
IEqualityComparer<TKey> KeyComparer { get; }
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Decompiled with JetBrains decompiler
2+
// Type: System.Collections.Generic.ISortKeyCollection`1
3+
// Assembly: System.Collections.Immutable, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
4+
// MVID: 5F9FF90F-0D16-4469-A104-76829D3705E2
5+
// Assembly location: C:\Users\dudi.keleti\.nuget\packages\system.collections.immutable\7.0.0\lib\net462\System.Collections.Immutable.dll
6+
// XML documentation location: C:\Users\dudi.keleti\.nuget\packages\system.collections.immutable\7.0.0\lib\net462\System.Collections.Immutable.xml
7+
8+
9+
#nullable enable
10+
using System.Collections.Generic;
11+
12+
namespace Datadog.System.Collections.Generic
13+
{
14+
internal interface ISortKeyCollection<in TKey>
15+
{
16+
IComparer<TKey> KeyComparer { get; }
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Decompiled with JetBrains decompiler
2+
// Type: System.Collections.Immutable.ImmutableEnumerableDebuggerProxy`1
3+
// Assembly: System.Collections.Immutable, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
4+
// MVID: 5F9FF90F-0D16-4469-A104-76829D3705E2
5+
// Assembly location: C:\Users\dudi.keleti\.nuget\packages\system.collections.immutable\7.0.0\lib\net462\System.Collections.Immutable.dll
6+
// XML documentation location: C:\Users\dudi.keleti\.nuget\packages\system.collections.immutable\7.0.0\lib\net462\System.Collections.Immutable.xml
7+
8+
using System.Collections.Generic;
9+
using System.Diagnostics;
10+
using System.Linq;
11+
using Datadog.System.Linq;
12+
13+
14+
#nullable enable
15+
namespace Datadog.System.Collections.Immutable
16+
{
17+
internal class ImmutableEnumerableDebuggerProxy<T>
18+
{
19+
20+
#nullable disable
21+
private readonly IEnumerable<T> _enumerable;
22+
private T[] _cachedContents;
23+
24+
25+
#nullable enable
26+
public ImmutableEnumerableDebuggerProxy(IEnumerable<T> enumerable)
27+
{
28+
Requires.NotNull<IEnumerable<T>>(enumerable, nameof (enumerable));
29+
this._enumerable = enumerable;
30+
}
31+
32+
[DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
33+
public T[] Contents => this._cachedContents ?? (this._cachedContents = this._enumerable.ToArray<T>());
34+
}
35+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Decompiled with JetBrains decompiler
2+
// Type: System.Collections.Immutable.KeysCollectionAccessor`2
3+
// Assembly: System.Collections.Immutable, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
4+
// MVID: 5F9FF90F-0D16-4469-A104-76829D3705E2
5+
// Assembly location: C:\Users\dudi.keleti\.nuget\packages\system.collections.immutable\7.0.0\lib\net462\System.Collections.Immutable.dll
6+
// XML documentation location: C:\Users\dudi.keleti\.nuget\packages\system.collections.immutable\7.0.0\lib\net462\System.Collections.Immutable.xml
7+
8+
9+
#nullable enable
10+
namespace Datadog.System.Collections.Immutable
11+
{
12+
internal sealed class KeysCollectionAccessor<TKey, TValue> :
13+
KeysOrValuesCollectionAccessor<TKey, TValue, TKey>
14+
where TKey : notnull
15+
{
16+
internal KeysCollectionAccessor(IImmutableDictionary<TKey, TValue> dictionary)
17+
: base(dictionary, dictionary.Keys)
18+
{
19+
}
20+
21+
public override bool Contains(TKey item) => this.Dictionary.ContainsKey(item);
22+
}
23+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// Decompiled with JetBrains decompiler
2+
// Type: System.Collections.Immutable.ValuesCollectionAccessor`2
3+
// Assembly: System.Collections.Immutable, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
4+
// MVID: 5F9FF90F-0D16-4469-A104-76829D3705E2
5+
// Assembly location: C:\Users\dudi.keleti\.nuget\packages\system.collections.immutable\7.0.0\lib\net462\System.Collections.Immutable.dll
6+
// XML documentation location: C:\Users\dudi.keleti\.nuget\packages\system.collections.immutable\7.0.0\lib\net462\System.Collections.Immutable.xml
7+
8+
9+
#nullable enable
10+
using System;
11+
12+
namespace Datadog.System.Collections.Immutable
13+
{
14+
internal sealed class ValuesCollectionAccessor<TKey, TValue> :
15+
KeysOrValuesCollectionAccessor<TKey, TValue, TValue>
16+
where TKey : notnull
17+
{
18+
internal ValuesCollectionAccessor(IImmutableDictionary<TKey, TValue> dictionary)
19+
: base(dictionary, dictionary.Values)
20+
{
21+
}
22+
23+
public override bool Contains(TValue item)
24+
{
25+
if (this.Dictionary is ImmutableSortedDictionary<TKey, TValue> dictionary1)
26+
return dictionary1.ContainsValue(item);
27+
return this.Dictionary is IImmutableDictionaryInternal<TKey, TValue> dictionary2 ? dictionary2.ContainsValue(item) : throw new NotSupportedException();
28+
}
29+
}
30+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Decompiled with JetBrains decompiler
2+
// Type: System.Collections.Immutable.AllocFreeConcurrentStack
3+
// Assembly: System.Collections.Immutable, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
4+
// MVID: 5F9FF90F-0D16-4469-A104-76829D3705E2
5+
// Assembly location: C:\Users\dudi.keleti\.nuget\packages\system.collections.immutable\7.0.0\lib\net462\System.Collections.Immutable.dll
6+
// XML documentation location: C:\Users\dudi.keleti\.nuget\packages\system.collections.immutable\7.0.0\lib\net462\System.Collections.Immutable.xml
7+
8+
using System;
9+
using System.Collections.Generic;
10+
11+
12+
#nullable enable
13+
namespace Datadog.System.Collections.Immutable
14+
{
15+
internal static class AllocFreeConcurrentStack
16+
{
17+
[ThreadStatic]
18+
internal static Dictionary<Type, object>? t_stacks;
19+
}
20+
}

0 commit comments

Comments
 (0)