Show / Hide Table of Contents

Class IDeviceExtensions

Extension methods for IDevice.

Inheritance
System.Object
IDeviceExtensions
Inherited Members
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 static class IDeviceExtensions

Methods

View Source

GetFileName(IDevice, String)

Gets the name for use as a file name. This is the Name if valid or the IPAddress, with unsafe characters removed or replaced.

Declaration
public static string GetFileName(this IDevice self, string replace = null)
Parameters
Type Name Description
IDevice self

The device being extended.

System.String replace

An optional string to replace unsafe characters with.

Returns
Type Description
System.String

The name which is safe to use as a file name.

View Source

SetJsonConfiguration<T>(IDevice, T, JsonSerializerSettings)

Saves a configuration object on the device in a JSON format.

Declaration
public static void SetJsonConfiguration<T>(this IDevice self, T configuration, JsonSerializerSettings serializerSettings = null)
Parameters
Type Name Description
IDevice self

The device being extended.

T configuration

The configuration.

JsonSerializerSettings serializerSettings

The serializer settings.

Type Parameters
Name Description
T

The configuration type.

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