Skip to content

Commit aec93bf

Browse files
decomission Pollyfill nuget
1 parent 3506106 commit aec93bf

12 files changed

+359
-48
lines changed

src/UiPath.CoreIpc/Client/ServiceClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected ServiceClient(Type interfaceType)
4545

4646
public T GetProxy<T>() where T : class
4747
{
48-
if (!_interfaceType.IsAssignableTo(typeof(T)))
48+
if (!typeof(T).IsAssignableFrom(_interfaceType))
4949
{
5050
throw new ArgumentOutOfRangeException($"The provided generic argument T is not assignable to the proxy type. T is {typeof(T).Name}. The proxy type is {_interfaceType.Name}.");
5151
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#pragma warning disable
2+
3+
#if !NET5_0_OR_GREATER
4+
5+
namespace System.Runtime.CompilerServices;
6+
7+
using System.Diagnostics;
8+
using System.Diagnostics.CodeAnalysis;
9+
10+
//
11+
// Summary:
12+
// Allows capturing of the expressions passed to a method.
13+
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
14+
internal sealed class CallerArgumentExpressionAttribute : Attribute
15+
{
16+
//
17+
// Summary:
18+
// Initializes a new instance of the System.Runtime.CompilerServices.CallerArgumentExpressionAttribute
19+
// class.
20+
//
21+
// Parameters:
22+
// parameterName:
23+
// The name of the targeted parameter.
24+
public CallerArgumentExpressionAttribute(string parameterName) => ParameterName = parameterName;
25+
26+
//
27+
// Summary:
28+
// Gets the target parameter name of the CallerArgumentExpression.
29+
//
30+
// Returns:
31+
// The name of the targeted parameter of the CallerArgumentExpression.
32+
public string ParameterName { get; }
33+
}
34+
35+
36+
#endif
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// <auto-generated />
2+
#pragma warning disable
3+
4+
#if !NET7_0_OR_GREATER
5+
6+
namespace System.Runtime.CompilerServices;
7+
8+
using System.Diagnostics;
9+
using System.Diagnostics.CodeAnalysis;
10+
using Link = System.ComponentModel.DescriptionAttribute;
11+
12+
/// <summary>
13+
/// Indicates that compiler support for a particular feature is required for the location where this attribute is applied.
14+
/// </summary>
15+
[ExcludeFromCodeCoverage]
16+
[DebuggerNonUserCode]
17+
[AttributeUsage(
18+
validOn: AttributeTargets.All,
19+
AllowMultiple = true,
20+
Inherited = false)]
21+
[Link("https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.compilerfeaturerequiredattribute")]
22+
#if PolyPublic
23+
public
24+
#endif
25+
sealed class CompilerFeatureRequiredAttribute :
26+
Attribute
27+
{
28+
/// <summary>
29+
/// Initialize a new instance of <see cref="CompilerFeatureRequiredAttribute"/>
30+
/// </summary>
31+
/// <param name="featureName">The name of the required compiler feature.</param>
32+
public CompilerFeatureRequiredAttribute(string featureName) =>
33+
FeatureName = featureName;
34+
35+
/// <summary>
36+
/// The name of the compiler feature.
37+
/// </summary>
38+
public string FeatureName { get; }
39+
40+
/// <summary>
41+
/// If true, the compiler can choose to allow access to the location where this attribute is applied if it does not understand <see cref="FeatureName"/>.
42+
/// </summary>
43+
public bool IsOptional { get; init; }
44+
45+
/// <summary>
46+
/// The <see cref="FeatureName"/> used for the ref structs C# feature.
47+
/// </summary>
48+
public const string RefStructs = nameof(RefStructs);
49+
50+
/// <summary>
51+
/// The <see cref="FeatureName"/> used for the required members C# feature.
52+
/// </summary>
53+
public const string RequiredMembers = nameof(RequiredMembers);
54+
}
55+
56+
#endif
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#pragma warning disable
2+
3+
#if !NET5_0_OR_GREATER
4+
5+
namespace System.Runtime.CompilerServices;
6+
7+
using System.Diagnostics;
8+
using System.Diagnostics.CodeAnalysis;
9+
10+
/// <summary>
11+
/// Reserved to be used by the compiler for tracking metadata. This class should not be used by developers in source code.
12+
/// </summary>
13+
[ExcludeFromCodeCoverage]
14+
[DebuggerNonUserCode]
15+
internal static class IsExternalInit
16+
{
17+
}
18+
19+
#endif
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
// <auto-generated />
2+
#pragma warning disable
3+
4+
#if NETSTANDARD || NETFRAMEWORK || NETCOREAPPX
5+
6+
namespace System.Diagnostics.CodeAnalysis;
7+
8+
using Targets = AttributeTargets;
9+
10+
/// <summary>
11+
/// Specifies that the method or property will ensure that the listed field and property members have
12+
/// non-<see langword="null"/> values when returning with the specified return value condition.
13+
/// </summary>
14+
[ExcludeFromCodeCoverage]
15+
[DebuggerNonUserCode]
16+
[AttributeUsage(
17+
validOn: Targets.Method |
18+
Targets.Property,
19+
Inherited = false,
20+
AllowMultiple = true)]
21+
#if PolyPublic
22+
public
23+
#endif
24+
sealed class MemberNotNullWhenAttribute :
25+
Attribute
26+
{
27+
/// <summary>
28+
/// Gets the return value condition.
29+
/// </summary>
30+
public bool ReturnValue { get; }
31+
32+
/// <summary>
33+
/// Gets field or property member names.
34+
/// </summary>
35+
public string[] Members { get; }
36+
37+
/// <summary>
38+
/// Initializes the attribute with the specified return value condition and a field or property member.
39+
/// </summary>
40+
/// <param name="returnValue">
41+
/// The return value condition. If the method returns this value,
42+
/// the associated parameter will not be <see langword="null"/>.
43+
/// </param>
44+
/// <param name="member">
45+
/// The field or property member that is promised to be not-<see langword="null"/>.
46+
/// </param>
47+
public MemberNotNullWhenAttribute(bool returnValue, string member)
48+
{
49+
ReturnValue = returnValue;
50+
Members = [member];
51+
}
52+
53+
/// <summary>
54+
/// Initializes the attribute with the specified return value condition and list
55+
/// of field and property members.
56+
/// </summary>
57+
/// <param name="returnValue">
58+
/// The return value condition. If the method returns this value,
59+
/// the associated parameter will not be <see langword="null"/>.
60+
/// </param>
61+
/// <param name="members">
62+
/// The list of field and property members that are promised to be not-null.
63+
/// </param>
64+
public MemberNotNullWhenAttribute(bool returnValue, params string[] members)
65+
{
66+
ReturnValue = returnValue;
67+
Members = members;
68+
}
69+
}
70+
71+
#endif
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// <auto-generated />
2+
#pragma warning disable
3+
4+
#if NETSTANDARD2_0 || NETFRAMEWORK || NETCOREAPP2X
5+
6+
namespace System.Diagnostics.CodeAnalysis;
7+
8+
using Targets = AttributeTargets;
9+
10+
[ExcludeFromCodeCoverage]
11+
[DebuggerNonUserCode]
12+
[AttributeUsage(
13+
validOn: Targets.Parameter |
14+
Targets.Property |
15+
Targets.ReturnValue,
16+
AllowMultiple = true)]
17+
#if PolyPublic
18+
public
19+
#endif
20+
sealed class NotNullIfNotNullAttribute :
21+
Attribute
22+
{
23+
/// <summary>
24+
/// Gets the associated parameter name.
25+
/// The output will be non-<see langword="null"/> if the argument to the
26+
/// parameter specified is non-<see langword="null"/>.
27+
/// </summary>
28+
public string ParameterName { get; }
29+
30+
/// <summary>
31+
/// Initializes the attribute with the associated parameter name.
32+
/// </summary>
33+
/// <param name="parameterName">
34+
/// The associated parameter name.
35+
/// The output will be non-<see langword="null"/> if the argument to the
36+
/// parameter specified is non-<see langword="null"/>.
37+
/// </param>
38+
public NotNullIfNotNullAttribute(string parameterName) =>
39+
ParameterName = parameterName;
40+
}
41+
#endif
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// <auto-generated />
2+
#pragma warning disable
3+
4+
#if NETSTANDARD2_0 || NETFRAMEWORK || NETCOREAPP2X
5+
6+
namespace System.Diagnostics.CodeAnalysis;
7+
8+
/// <summary>
9+
/// Specifies that when a method returns <see cref="ReturnValue"/>,
10+
/// the parameter will not be <see langword="null"/> even if the corresponding type allows it.
11+
/// </summary>
12+
[ExcludeFromCodeCoverage]
13+
[DebuggerNonUserCode]
14+
[AttributeUsage(AttributeTargets.Parameter)]
15+
#if PolyPublic
16+
public
17+
#endif
18+
sealed class NotNullWhenAttribute :
19+
Attribute
20+
{
21+
/// <summary>
22+
/// Gets the return value condition.
23+
/// If the method returns this value, the associated parameter will not be <see langword="null"/>.
24+
/// </summary>
25+
public bool ReturnValue { get; }
26+
27+
/// <summary>
28+
/// Initializes the attribute with the specified return value condition.
29+
/// </summary>
30+
/// <param name="returnValue">
31+
/// The return value condition.
32+
/// If the method returns this value, the associated parameter will not be <see langword="null"/>.
33+
/// </param>
34+
public NotNullWhenAttribute(bool returnValue) =>
35+
ReturnValue = returnValue;
36+
}
37+
38+
#endif
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// <auto-generated />
2+
#pragma warning disable
3+
4+
#if !NET7_0_OR_GREATER
5+
6+
namespace System.Runtime.CompilerServices;
7+
8+
using System.Diagnostics;
9+
using System.Diagnostics.CodeAnalysis;
10+
11+
using Targets = AttributeTargets;
12+
13+
/// <summary>
14+
/// Specifies that a type has required members or that a member is required.
15+
/// </summary>
16+
[ExcludeFromCodeCoverage]
17+
[DebuggerNonUserCode]
18+
[AttributeUsage(
19+
validOn: Targets.Class |
20+
Targets.Struct |
21+
Targets.Field |
22+
Targets.Property,
23+
Inherited = false)]
24+
#if PolyPublic
25+
public
26+
#endif
27+
sealed class RequiredMemberAttribute :
28+
Attribute;
29+
#endif
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// <auto-generated />
2+
#pragma warning disable
3+
4+
#if !NET7_0_OR_GREATER
5+
6+
namespace System.Diagnostics.CodeAnalysis;
7+
8+
/// <summary>
9+
/// Specifies that this constructor sets all required members for the current type, and callers
10+
/// do not need to set any required members themselves.
11+
/// </summary>
12+
[ExcludeFromCodeCoverage]
13+
[DebuggerNonUserCode]
14+
[AttributeUsage(AttributeTargets.Constructor)]
15+
#if PolyPublic
16+
public
17+
#endif
18+
sealed class SetsRequiredMembersAttribute :
19+
Attribute;
20+
#endif

0 commit comments

Comments
 (0)