IStringStorage 接口
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
存储和检索字符串。 用作对注册表和单元测试模拟的抽象。
public interface class IStringStorage : System::ComponentModel::INotifyPropertyChanged
public interface IStringStorage : System.ComponentModel.INotifyPropertyChanged
type IStringStorage = interface
interface INotifyPropertyChanged
Public Interface IStringStorage
Implements INotifyPropertyChanged
- 实现
注解
可以在任何线程上调用此类的成员。
方法
| ClearAsync() |
删除所有存储的值。 |
| ClearAsync(CancellationToken) |
删除所有存储的值。 |
| DeleteIfExistsAsync(String) |
删除存储的值。 |
| DeleteIfExistsAsync(String, CancellationToken) |
删除存储的值。 |
| Get(String) |
返回已命名的项的值和计算机本地标志,如果该项不存在,则返回 null。 |
| NamesStartingWith(String) |
返回当前存储的名称以给定前缀开头 (不区分大小写) 的所有设置的名称。 |
| SetAsync(String, StringWithMachineLocalFlag) |
用指定的名称存储值和计算机本地标志。 |
| SetAsync(String, StringWithMachineLocalFlag, Action) | |
| SetAsync(String, StringWithMachineLocalFlag, Action, CancellationToken) |
用指定的名称存储值和计算机本地标志。 |
事件
| PropertyChangedAsync |
在创建、更改或删除设置值时引发。 |