| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- //
- // System.ComponentModel.SyntaxCheck
- //
- // Author:
- // Andreas Nahr ([email protected])
- //
- // (C) 2003 Andreas Nahr
- //
- using System.IO;
- namespace System.ComponentModel
- {
- public class SyntaxCheck
- {
- private SyntaxCheck ()
- {
- }
- [MonoTODO]
- public static bool CheckMachineName (string value)
- {
- if (value == null || value.Trim () == "")
- return false;
- return Environment.MachineName.Equals (value);
- }
- [MonoTODO]
- public static bool CheckPath (string value)
- {
- if (value == null || value.Trim () == "")
- return false;
- try {
- Path.GetFullPath (value);
- } catch {
- return false;
- }
- return true;
- }
- [MonoTODO]
- public static bool CheckRootedPath (string value)
- {
- if (value == null || value.Trim () == "")
- return false;
- return Path.IsPathRooted (value);
- }
- }
- }
|