Inheritance: ConfigurationValidatorBase
コード例 #1
0
		public void Success ()
		{
			SubclassTypeValidator v = new SubclassTypeValidator (typeof (A));

			v.Validate (typeof (B));
			v.Validate (typeof (A));
		}
コード例 #2
0
		public void CanValidate ()
		{
			SubclassTypeValidator v = new SubclassTypeValidator (typeof (A));

			Assert.IsFalse (v.CanValidate (typeof (string)));
			Assert.IsFalse (v.CanValidate (typeof (int)));
			Assert.IsFalse (v.CanValidate (typeof (object)));
			Assert.IsTrue (v.CanValidate (typeof (Type)));
		}
コード例 #3
0
 public PolicyImporterElement(Type type)
 {
     SubclassTypeValidator validator = new SubclassTypeValidator(typeof(IPolicyImportExtension));
     validator.Validate(type);
     this.Type = type.AssemblyQualifiedName;
 }
コード例 #4
0
		public void Failure ()
		{
			SubclassTypeValidator v = new SubclassTypeValidator (typeof (B));

			v.Validate (typeof (A));
		}