RemoteSettings.GetValueAsync<T>(String, String, T) 方法

定义

获取一个远程设置值,它使用目标通知后端和 RemoteControl 文件更新。 必须在启动后调用。

public:
generic <typename T>
 virtual System::Threading::Tasks::Task<T> ^ GetValueAsync(System::String ^ collectionPath, System::String ^ key, T defaultValue);
public System.Threading.Tasks.Task<T> GetValueAsync<T> (string collectionPath, string key, T defaultValue);
abstract member GetValueAsync : string * string * 'T -> System.Threading.Tasks.Task<'T>
override this.GetValueAsync : string * string * 'T -> System.Threading.Tasks.Task<'T>
Public Function GetValueAsync(Of T) (collectionPath As String, key As String, defaultValue As T) As Task(Of T)

类型参数

T

参数

collectionPath
String

远程设置集合的路径,格式为 My\Custom\Path

key
String

远程设置的密钥

defaultValue
T

远程设置不存在时要返回的值

返回

Task<T>

远程设置值(如果存在),否则为 defaultValue

实现

适用于