RemoteSettings.GetValueAsync<T>(String, String, T) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取一个远程设置值,它使用目标通知后端和 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