Show / Hide Table of Contents

Class DeviceBase

Base class for all device types.

Inheritance
System.Object
CapabilityBase
DeviceBase
NintendoSwitch
WindowsPC
Xbox
Implements
System.IServiceProvider
IDevice
ICapability
Inherited Members
CapabilityBase.GetCapabilityInterface<T>()
CapabilityBase.HasCapabilityInterface(Type)
CapabilityBase.HasCapabilityInterface<T>()
CapabilityBase.GetService(Type)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Phoenix.Devices
Assembly: Phoenix.Abstractions.Devices.dll
Syntax
public abstract class DeviceBase : CapabilityBase, IServiceProvider, IDevice, ICapability

Constructors

View Source

DeviceBase(String, String, String, IPhoenixLogger, IEventAggregator, Guid, String, String)

Initializes a new instance of the DeviceBase class.

Declaration
protected DeviceBase(string deviceName, string deviceTypeName, string deviceTypeDisplayName, IPhoenixLogger logger, IEventAggregator events, Guid phoenixId, string configurationType = null, string configuration = null)
Parameters
Type Name Description
System.String deviceName

The name of the device.

System.String deviceTypeName

The name of the device type.

System.String deviceTypeDisplayName

The display name of the device type.

IPhoenixLogger logger

The current logger.

IEventAggregator events

The event aggregator service.

System.Guid phoenixId

The id for the device.

System.String configurationType

The device configuration type.

System.String configuration

The device configuration.

View Source

DeviceBase(String, String, String, IPhoenixLogger, String, IEventAggregator, Guid)

Initializes a new instance of the DeviceBase class.

Declaration
protected DeviceBase(string deviceName, string deviceTypeName, string deviceTypeDisplayName, IPhoenixLogger logger, string configuration, IEventAggregator events, Guid phoenixId)
Parameters
Type Name Description
System.String deviceName

The name of the device.

System.String deviceTypeName

The name of the device type.

System.String deviceTypeDisplayName

The display name of the device type.

IPhoenixLogger logger

The current logger.

System.String configuration

The device configuration.

IEventAggregator events

The event aggregator service.

System.Guid phoenixId

The id for the device.

Properties

View Source

Alias

Gets or sets a user defined alias for the device.

Declaration
public string Alias { get; set; }
Property Value
Type Description
System.String
View Source

AttachedObjectModel

Gets or sets the game object model that is attached to this device.

Declaration
public object AttachedObjectModel { get; set; }
Property Value
Type Description
System.Object
View Source

Configuration

Gets or sets the configuration string for this device.

Declaration
public string Configuration { get; set; }
Property Value
Type Description
System.String
View Source

ConfigurationType

Gets or sets the configuration type for this device. May be used for versioning the configuration string.

Declaration
public string ConfigurationType { get; set; }
Property Value
Type Description
System.String
View Source

ConnectionStatus

Gets or sets a value indicating the device connection status.

Declaration
public DeviceConnectionStatus ConnectionStatus { get; protected set; }
Property Value
Type Description
DeviceConnectionStatus
View Source

DeviceImplementation

Gets or sets the underlying device implementation.

Declaration
public object DeviceImplementation { get; protected set; }
Property Value
Type Description
System.Object
View Source

DeviceTypeDisplayName

Gets the display name of the device type.

Declaration
public string DeviceTypeDisplayName { get; }
Property Value
Type Description
System.String
View Source

DeviceTypeName

Gets the name of the device type.

Declaration
public string DeviceTypeName { get; }
Property Value
Type Description
System.String
View Source

DisplayName

Gets the display name for UI and logging. If Alias is defined it is used otherwise Name is used. If both are not set then the IP address is returned.

Declaration
public string DisplayName { get; }
Property Value
Type Description
System.String
View Source

Events

Gets the event aggregator service.

Declaration
protected IEventAggregator Events { get; }
Property Value
Type Description
IEventAggregator
View Source

Id

Gets or sets the unique identifier of the device.

Declaration
public string Id { get; protected set; }
Property Value
Type Description
System.String
View Source

IPAddress

Gets or sets the IPAddress of this device.

Declaration
public IPAddress IPAddress { get; protected set; }
Property Value
Type Description
System.Net.IPAddress
View Source

Logger

Gets the current logger.

Declaration
public IPhoenixLogger Logger { get; }
Property Value
Type Description
IPhoenixLogger
View Source

Name

Gets or sets the name of this device.

Declaration
public string Name { get; set; }
Property Value
Type Description
System.String
View Source

PhoenixId

Gets or sets a value representing the identifier phoenix places on the device for tracking.

Declaration
public Guid PhoenixId { get; set; }
Property Value
Type Description
System.Guid
View Source

XboxLiveDeviceId

Gets a value representing the XBL device Id.

Declaration
public virtual string XboxLiveDeviceId { get; }
Property Value
Type Description
System.String

Methods

View Source

Cleanup()

Performs device cleanup

Declaration
public virtual void Cleanup()
View Source

OnDeviceAliasChanged(String, String)

Called when this device's alias is changed.

Declaration
protected virtual void OnDeviceAliasChanged(string oldValue, string value)
Parameters
Type Name Description
System.String oldValue

The old value.

System.String value

The new value.

View Source

Serialize()

Serializes device information.

Declaration
public virtual SerializableIDevice Serialize()
Returns
Type Description
SerializableIDevice

The serialized device.

Implements

System.IServiceProvider
IDevice
ICapability

Extension Methods

ICapabilityExtensions.IsCapable(ICapability, Type[])
ICapabilityExtensions.HasCapabilityInterface<T>(ICapability)
IDeviceExtensions.GetFileName(IDevice, String)
IDeviceExtensions.SetJsonConfiguration<T>(IDevice, T, JsonSerializerSettings)
  • View Source
In This Article
Back to top Generated by DocFX