Show / Hide Table of Contents

Class CapabilityStubBase

Abstract base class for stubbing capability interfaces on devices.

Inheritance
System.Object
CapabilityStubBase
DeviceStub
Namespace: Phoenix.Test.DeviceMockSystem
Assembly: Phoenix.Test.Infrastructure.dll
Syntax
public abstract class CapabilityStubBase : ICapability

Methods

View Source

AddInterfaceCapabilityStub(Type, Object)

Adds an interface implementation stub to the mapping.

Declaration
public void AddInterfaceCapabilityStub(Type interfaceType, object interfaceStub)
Parameters
Type Name Description
System.Type interfaceType

The interface being stubbed.

System.Object interfaceStub

The stub implementation.

View Source

GetCapabilityInterface<T>()

Returns the interface requested for this object.

Declaration
public T GetCapabilityInterface<T>()
    where T : class
Returns
Type Description
T

The interface if it is implemented or null if not implemented.

Type Parameters
Name Description
T

The interface that is being requested.

View Source

HasCapabilityInterface(Type)

Determines if this object implements the specified interface type.

Declaration
public bool HasCapabilityInterface(Type type)
Parameters
Type Name Description
System.Type type

The type of interface to check.

Returns
Type Description
System.Boolean

A value indicating whether the object implements the interface or not.

View Source

SetDeviceCapabilityMap(Dictionary<Type, Object>)

Sets the interface map directly.

Declaration
public void SetDeviceCapabilityMap(Dictionary<Type, object> interfaceMap)
Parameters
Type Name Description
System.Collections.Generic.Dictionary<System.Type, System.Object> interfaceMap

The interface map to use.

  • View Source
In This Article
Back to top Generated by DocFX