更新:2007 年 11 月
表示在指定的输入说明符中的值将要发生更改时所调用的方法。
命名空间: Microsoft.VisualStudio.TeamSystem.Data.DataGenerator
程序集: Microsoft.VisualStudio.TeamSystem.Data(在 Microsoft.VisualStudio.TeamSystem.Data.dll 中)
语法
声明
Public Overridable Sub OnInputChangeValidation ( _
sender As Object, _
eventArgs As InputChangingEventArgs _
)
用法
Dim instance As DefaultGeneratorDesigner
Dim sender As Object
Dim eventArgs As InputChangingEventArgs
instance.OnInputChangeValidation(sender, _
eventArgs)
public virtual void OnInputChangeValidation(
Object sender,
InputChangingEventArgs eventArgs
)
public:
virtual void OnInputChangeValidation(
Object^ sender,
InputChangingEventArgs^ eventArgs
)
public function OnInputChangeValidation(
sender : Object,
eventArgs : InputChangingEventArgs
)
参数
sender
类型:System.Object事件源。
eventArgs
类型:Microsoft.VisualStudio.TeamSystem.Data.DataGenerator.InputChangingEventArgs包含事件数据的 InputChangingEventArgs。
实现
IDesigner.OnInputChangeValidation(Object, InputChangingEventArgs)
异常
异常 | 条件 |
---|---|
InputValidationException | PercentageNull 小于 0 或大于 100。 |
InputValidationException | PercentageNull 为 0,Nullable 为 false。 |
InputValidationException | Seed 为负数。 |
备注
InputChangingEventArgs 指定要更改的 InputDescriptor 及其新值,以及由所有 InputDescriptor 组成的一个数组。
此方法执行设计时验证。重写此方法,以便在自定义数据生成器中执行自定义设计时验证。ValidateInputs 执行运行时验证。
权限
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。