ManagementOptions.Timeout 属性
定义
获取或设置要应用于该操作的超时。Gets or sets the time-out to apply to the operation. 注意,对于返回集合的操作,此超时将通过结果集合(而不是操作本身)应用于枚举(对于后面一种情况,应使用 ReturnImmediately 属性)。Note that for operations that return collections, this time-out applies to the enumeration through the resulting collection, not the operation itself (the ReturnImmediately property is used for the latter). 此属性用来指示将以半同步方式执行操作。This property is used to indicate that the operation should be performed semi-synchronously.
public:
property TimeSpan Timeout { TimeSpan get(); void set(TimeSpan value); };
public TimeSpan Timeout { get; set; }
member this.Timeout : TimeSpan with get, set
Public Property Timeout As TimeSpan
属性值
返回一个 TimeSpan,它定义要应用于该操作的超时时间。Returns a TimeSpan that defines the time-out time to apply to the operation.
注解
Timeout属性用于以下类的对应半同步操作: ObjectGetOptions 、 PutOptions 、 DeleteOptions 、、 InvokeMethodOptions EnumerationOptions 和 EventWatcherOptions 。The Timeout property is used in the corresponding semi-synchronous operation for the following classes: ObjectGetOptions, PutOptions, DeleteOptions, InvokeMethodOptions, EnumerationOptions, and EventWatcherOptions.
此属性对方法不起作用 Connect() 。This property has no effect on the Connect() method.
属性值Property Value
此属性的默认值为 MaxValue ,这意味着将阻止操作。The default value for this property is MaxValue, which means the operation will block. 指定的值必须为正数。The value specified must be positive.
.NET Framework 安全性.NET Framework Security
对直接调用方的完全信任。Full trust for the immediate caller. 此成员不能由部分信任的代码使用。This member cannot be used by partially trusted code. 有关详细信息,请参阅 从部分受信任的代码使用库。For more information, see Using Libraries from Partially Trusted Code.