Microsoft エンタープライズ検証フレームワークを使用しています。そして、app.config ファイルでファイル 'validation.config' をリンクしています。
<section name="validation" type="Microsoft.Practices.EnterpriseLibrary.Validation.Configuration.ValidationSettings, Microsoft.Practices.EnterpriseLibrary.Validation, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
allowLocation="true" allowDefinition="MachineToApplication" restartOnExternalChanges="false" />
<validation configSource="LocalConfiguration\validation.config" />
「validation.config」ファイルに私が持っている
<?xml version="1.0" encoding="utf-8" ?>
<validation>
<type name="Car">
<ruleset>
<properties>
<validators>...</validators>
</properties>
</ruleset>
</type>
<type name="Human">
<ruleset>
<properties>
<validators>...</validators>
</properties>
</ruleset>
</type>
</validation>
問題は、'Car' と 'Human' のタイプを別のファイルに入れ、これらのファイルを validation.config にリンクすることはできますか、それとも、バリデーターが多すぎるため、クリーンで簡単にしたいので、別の方法で分離することはできますか?読む。