Files
mono/mcs/class/System/System.ComponentModel/SyntaxCheck.cs
T
Lluis Sanchez a0ea05369d * AttributeCollection.cs: Added new internal constructor.
* DesignerAttribute.cs: Fixed property TypeId.
	* EventDescriptorCollection.cs: Added internal constructor. Added new
	  method Filter that removes events that do not have the specified
	  attributes.
	* MemberDescriptor.cs: Minor fixes.
	* PropertyDescriptor.cs: Implemented some missing methods.
	* PropertyDescriptorCollection.cs: Added internal constructor. Implemented
	  Sort methods.
	* ReferenceConverter.cs: Removed some TODOs.
	* SyntaxCheck.cs: Implemented CheckMachineName and CheckPath.
	* TypeDescriptor.cs: Implemented most of missing methods.

svn path=/trunk/mcs/; revision=25473
2004-04-14 14:44:09 +00:00

47 lines
809 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 ()
{
}
public static bool CheckMachineName (string value)
{
if (value == null || value.Trim ().Length == 0)
return false;
return value.IndexOf ('\\') == -1;
}
public static bool CheckPath (string value)
{
if (value == null || value.Trim ().Length == 0)
return false;
return value.StartsWith (@"\\");
}
public static bool CheckRootedPath (string value)
{
if (value == null || value.Trim ().Length == 0)
return false;
return Path.IsPathRooted (value);
}
}
}