System.UriTypeConverter.UriTypeConverter.IsValid C# (CSharp) Méthode

IsValid() public méthode

public IsValid ( ITypeDescriptorContext context, object value ) : bool
context ITypeDescriptorContext
value object
Résultat bool
		public override bool IsValid (ITypeDescriptorContext context, object value)
		{
			if (value == null)
				return false;

			// LAMESPEC: docs says that a string is valid only if we can create an URI
			// from it. However all strings seems to be accepted (see unit tests)
			return ((value is string) || (value is Uri));
		}
#endif