Reflection.ThrowIfMethodsNotOverloaded(string, Type, string[]) method¶
Defined in
Type: Reflection
Namespace: ReactiveUI.Reactive
Assembly: ReactiveUI.Reactive.dll
Applies to
net10.0, net10.0-maccatalyst26.0, net10.0-desktop1.0, net10.0-browserwasm1.0, net10.0-tvos26.0, net10.0-windows10.0.19041, net10.0-macos26.0, net10.0-ios26.0, net10.0-android36.0, net9.0, net9.0-tvos18.0, net9.0-macos15.0, net9.0-maccatalyst18.0, net9.0-windows10.0.19041, net9.0-ios18.0, net9.0-desktop1.0, net8.0, net8.0-windows10.0.19041, net8.0-ios18.0, net8.0-maccatalyst18.0, net8.0-macos15.0, net8.0-tvos18.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.5, netstandard2.1, net481, net462, net471
Overloads¶
- 1.
public static void ThrowIfMethodsNotOverloaded(string callingTypeName, Type targetType, params string[] methodsToCheck) - 2.
public static void ThrowIfMethodsNotOverloaded(string callingTypeName, object targetObject, params string[] methodsToCheck)
1. Overload¶
public static void ThrowIfMethodsNotOverloaded(string callingTypeName, Type targetType, params string[] methodsToCheck)
Summary: Checks to make sure that the specified method names on the target type are overridden.
Parameters
| Name | Type | Description |
|---|---|---|
callingTypeName | string | The name of the calling type. |
targetType | Type | The type to check. Must preserve public and non-public methods under trimming. |
params methodsToCheck | string[] | The method names to check. |
Remarks
Trimming note: this method inspects declared method names; the targetType parameter is annotated accordingly.
Exceptions
| Type | Condition |
|---|---|
| System.InvalidOperationException | A method is not overridden on the target type. |
2. Overload¶
Attributes: [RequiresUnreferencedCode("Inspects declared methods on a runtime type; members may be trimmed.")]
public static void ThrowIfMethodsNotOverloaded(string callingTypeName, object targetObject, params string[] methodsToCheck)
Summary: Checks to make sure that the specified method names on the target object are overridden.
Parameters
| Name | Type | Description |
|---|---|---|
callingTypeName | string | The name of the calling type. |
targetObject | object | The object to check. |
params methodsToCheck | string[] | The method names to check. |
Remarks
Trimming note: the runtime type is discovered dynamically via GetType, so this method cannot express a complete trimming contract locally.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when targetObject is null. |
| System.InvalidOperationException | A method is not overridden on the target object. |