ymm4-plugin-document
読み取り中…
検索中…
一致する文字列を見つけられません
YukkuriMovieMaker.Commons.ValidatableBindable クラス

データ検証機能を備えたバインド可能な基底クラスです。 [詳解]

YukkuriMovieMaker.Commons.ValidatableBindable の継承関係図
YukkuriMovieMaker.Settings.FileExtension

公開メンバ関数

global::System.Collections.IEnumerable GetErrors ([global::System.Runtime.CompilerServices.Nullable(2)] string propertyName)
 指定されたプロパティの検証エラーを取得します。
 ValidatableBindable ()
 ValidatableBindableクラスの新しいインスタンスを初期化します。

限定公開メンバ関数

override bool Set<[global::System.Runtime.CompilerServices.Nullable(2)] T > (ref T storage, T value, [global::System.Runtime.CompilerServices.CallerMemberName] string name="", params string[] etcChangedPropertyNames)
 プロパティの値を設定し、変更があった場合に通知します。また、設定前にプロパティの検証を行います。
void AddError (string propertyName, string error)
 指定されたプロパティにエラーを追加します。
void RemoveError (string propertyName)
 指定されたプロパティからエラーを削除します。

プロパティ

bool HasErrors [get]
 エンティティに検証エラーがあるかどうかを示す値を取得します。

イベント

global::System.EventHandler< global::System.ComponentModel.DataErrorsChangedEventArgs > ErrorsChanged [add, remove]
 検証エラーが変更されたときに発生します。

詳解

データ検証機能を備えたバインド可能な基底クラスです。

このクラスは、Bindableを継承し、INotifyDataErrorInfoインターフェースを実装することで、 プロパティの変更通知とデータ検証エラーの通知機能を提供します。 データアノテーション(例: RequiredAttribute, RangeAttribute)を使用した検証をサポートします。

構築子と解体子

◆ ValidatableBindable()

YukkuriMovieMaker.Commons.ValidatableBindable.ValidatableBindable ( )

ValidatableBindableクラスの新しいインスタンスを初期化します。

メソッド詳解

◆ AddError()

void YukkuriMovieMaker.Commons.ValidatableBindable.AddError ( string propertyName,
string error )
protected

指定されたプロパティにエラーを追加します。

引数
propertyNameエラーを追加するプロパティの名前。
error追加するエラーメッセージ。

◆ GetErrors()

global.System.Collections.IEnumerable YukkuriMovieMaker.Commons.ValidatableBindable.GetErrors ( [global::System::Runtime::CompilerServices::Nullable(2)] string propertyName)

指定されたプロパティの検証エラーを取得します。

引数
propertyNameエラーを取得するプロパティの名前。nullまたは空の場合、すべてのプロパティのエラーを返します。
戻り値
指定されたプロパティの検証エラーのコレクション。

◆ RemoveError()

void YukkuriMovieMaker.Commons.ValidatableBindable.RemoveError ( string propertyName)
protected

指定されたプロパティからエラーを削除します。

引数
propertyNameエラーを削除するプロパティの名前。

◆ Set<[global::System.Runtime.CompilerServices.Nullable(2)] T >()

override bool YukkuriMovieMaker.Commons.ValidatableBindable.Set<[global.System.Runtime.CompilerServices.Nullable(2)] T > ( ref T storage,
T value,
[global::System::Runtime::CompilerServices::CallerMemberName] string name = "",
params string[] etcChangedPropertyNames )
protected

プロパティの値を設定し、変更があった場合に通知します。また、設定前にプロパティの検証を行います。

テンプレート引数
Tプロパティの型。
引数
storageプロパティの値を格納するフィールドへの参照。
value設定する新しい値。
nameプロパティの名前。通常はCallerMemberNameAttributeによって自動的に設定されます。
etcChangedPropertyNamesこのプロパティの変更によって影響を受ける可能性のある他のプロパティの名前の配列。
戻り値
値が変更された場合は<c>true、それ以外の場合は<c>false。

このメソッドは、まず新しい値に対して検証を実行します。 検証エラーがない場合、基底クラスのBindable.Set<T>(ref T, T, string, string[])メソッドを呼び出して値を設定し、変更通知を行います。

プロパティ詳解

◆ HasErrors

bool YukkuriMovieMaker.Commons.ValidatableBindable.HasErrors
get

エンティティに検証エラーがあるかどうかを示す値を取得します。

イベント詳解

◆ ErrorsChanged

System global.EventHandler< global.System.ComponentModel.DataErrorsChangedEventArgs > YukkuriMovieMaker.Commons.ValidatableBindable.ErrorsChanged
addremove

検証エラーが変更されたときに発生します。


このクラス詳解は次のファイルから抽出されました: