• Home
  • Blog
  • Docs
  • GitHub
Show / Hide Table of Contents

Interface IControllerElementMappingProfileStore

Provides a store for IControllerElementMappingProfile.

Namespace: Snowflake.Input.Controller.Mapped
Assembly: Snowflake.Framework.Primitives.dll
Syntax
public interface IControllerElementMappingProfileStore

Methods

AddMappings(IControllerElementMappingProfile, String)

Add the given mappings under the given profile name. Profile names do not have to be unique across mappings between different spec controllers and real devices, but must be unique for the same controller ID and device ID.

Declaration
void AddMappings(IControllerElementMappingProfile mappings, string profileName)
Parameters
Type Name Description
IControllerElementMappingProfile mappings

The IControllerElementMappingProfile to store.

System.String profileName

The profile name to store the mappings under.

AddMappingsAsync(IControllerElementMappingProfile, String)

Asynchronously add the given mappings under the given profile name. Profile names do not have to be unique across mappings between different spec controllers and real devices, but must be unique for the same controller ID and device ID.

Declaration
Task AddMappingsAsync(IControllerElementMappingProfile mappings, string profileName)
Parameters
Type Name Description
IControllerElementMappingProfile mappings

The IControllerElementMappingProfile to store.

System.String profileName

The profile name to store the mappings under.

Returns
Type Description
System.Threading.Tasks.Task

DeleteMappings(ControllerId, String, Int32)

Deletes all mappings from the provided controller ID to device.

Declaration
void DeleteMappings(ControllerId controllerId, string deviceName, int vendorId)
Parameters
Type Name Description
ControllerId controllerId

The Stone controller ID that maps to the real device.

System.String deviceName

The name of the device to delete mappings.

System.Int32 vendorId

The vendor ID of the device.

DeleteMappings(Guid)

Deletes the mapping profile from the provided controller ID to device ID.

Declaration
void DeleteMappings(Guid profileGuid)
Parameters
Type Name Description
System.Guid profileGuid

The [rofile GUID of the mapping profile.

DeleteMappingsAsync(ControllerId, String, Int32)

Asynchronously deletes all mappings from the provided controller ID to device.

Declaration
Task DeleteMappingsAsync(ControllerId controllerId, string deviceName, int vendorId)
Parameters
Type Name Description
ControllerId controllerId

The Stone controller ID that maps to the real device.

System.String deviceName

The name of the device to delete mappings.

System.Int32 vendorId

The vendor ID of the device.

Returns
Type Description
System.Threading.Tasks.Task

DeleteMappingsAsync(Guid)

Asynchronously deletes the mapping profile from the provided controller ID to device ID.

Declaration
Task DeleteMappingsAsync(Guid profileGuid)
Parameters
Type Name Description
System.Guid profileGuid

The [rofile GUID of the mapping profile.

Returns
Type Description
System.Threading.Tasks.Task

GetMappings(Guid)

Gets the saved mapping profile from the provided controller ID to device ID.

Declaration
IControllerElementMappingProfile GetMappings(Guid profileGuid)
Parameters
Type Name Description
System.Guid profileGuid

The [rofile GUID of the mapping profile.

Returns
Type Description
IControllerElementMappingProfile

The saved mapping profile from the provided controller ID to device ID.

GetMappingsAsync(Guid)

Asynchronously gets the saved mapping profile from the provided controller ID to device ID.

Declaration
Task<IControllerElementMappingProfile> GetMappingsAsync(Guid profileGuid)
Parameters
Type Name Description
System.Guid profileGuid

The [rofile GUID of the mapping profile.

Returns
Type Description
System.Threading.Tasks.Task<IControllerElementMappingProfile>

The saved mapping profile from the provided controller ID to device ID.

GetProfileNames(ControllerId, InputDriver, String, Int32)

Gets the profile names of all saved mappings from the provided controller ID to device ID.

Declaration
IEnumerable<(string profileName, Guid profileGuid)> GetProfileNames(ControllerId controllerId, InputDriver driverType, string deviceName, int vendorId)
Parameters
Type Name Description
ControllerId controllerId

The Stone controller ID that maps to the real device.

InputDriver driverType

The driver for which the mapping is for.

System.String deviceName

The device ID that maps from the spec controller.

System.Int32 vendorId

The vendor ID of the device.

Returns
Type Description
System.Collections.Generic.IEnumerable<System.ValueTuple<System.String, System.Guid>>

All saved mappings from the provided controller ID to device ID.

UpdateMappings(IControllerElementMappingProfile)

Updates the specific mapping profile with the given profile name. A profile with the same ProfileGuid must be already in the database.

Declaration
void UpdateMappings(IControllerElementMappingProfile mappings)
Parameters
Type Name Description
IControllerElementMappingProfile mappings

The IControllerElementMappingProfile to store.

UpdateMappingsAsync(IControllerElementMappingProfile)

Asynchronously updates the specific mapping profile with the given profile name. A profile with the same ProfileGuid must be already in the database.

Declaration
Task UpdateMappingsAsync(IControllerElementMappingProfile mappings)
Parameters
Type Name Description
IControllerElementMappingProfile mappings

The IControllerElementMappingProfile to store.

Returns
Type Description
System.Threading.Tasks.Task
Built with ❤️ by @chyyran. Text content licensed under CC-BY-SA 4.0.