Files
mono/mcs/class/System/System.ComponentModel/SyntaxCheck.cs
T
Andreas N 94ef21574a 2003-07-02 Andreas Nahr <[email protected]>
* AttributeCollection.cs: Fixed public members
	* BaseNumberConverter.cs: Changed InnerType to internal to match public assembly signature
	* BrowsableAttribute.cs: Removed wrong constructor, Restyle according to guidelines
	* CategoryAttribute.cs: Changed public fields to properties
	* EnumConverter.cs: Added and implemented missing properties, improved implementation
	* EventDescriptorCollection.cs: Fixed wrong signatures, added implementation, fixed potential bug
	* PropertyDescriptorCollection.cs: Fixed public members
	* ReferenceConverter.cs: Implementation added
	* SyntaxCheck.cs: Improved string checks, added MonoTODO descriptions
	* TypeDescriptor.cs: Implementations added

svn path=/trunk/mcs/; revision=15875
2003-07-02 18:26:12 +00:00

54 lines
992 B
C#

//
// System.ComponentModel.SyntaxCheck.cs
//
// Author:
// Andreas Nahr ([email protected])
//
// (C) 2003 Andreas Nahr
//
using System.IO;
namespace System.ComponentModel
{
// LAMESPEC should be sealed or event internal?
public class SyntaxCheck
{
private SyntaxCheck ()
{
}
[MonoTODO ("Don't know what MS wants to do with this")]
public static bool CheckMachineName (string value)
{
if (value == null || value.Trim ().Length == 0)
return false;
return Environment.MachineName.Equals (value);
}
[MonoTODO ("Don't know what MS wants to do with this")]
public static bool CheckPath (string value)
{
if (value == null || value.Trim ().Length == 0)
return false;
try {
Path.GetFullPath (value);
} catch {
return false;
}
return true;
}
public static bool CheckRootedPath (string value)
{
if (value == null || value.Trim ().Length == 0)
return false;
return Path.IsPathRooted (value);
}
}
}