mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 19:10:23 -10:00
* 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
54 lines
992 B
C#
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);
|
|
}
|
|
}
|
|
}
|
|
|