mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-18 03:51:19 -10:00
* 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
47 lines
809 B
C#
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);
|
|
}
|
|
}
|
|
}
|
|
|