Beispiel #1
0
        internal static bool IsCompatible(RegistryContext ctx, Command command, CommandParameter param)
        {
            switch (ctx.Class.ToLower())
            {
            case "gl":
                break;

            default:
                return(false);
            }

            if (param.GetImplementationType(ctx, command) != "IntPtr")
            {
                return(false);
            }
            if (Regex.IsMatch(param.Name, "offset"))
            {
                return(false);
            }
            if (param.IsConstant || command.IsGetImplementation(ctx))
            {
                return(true);
            }

            return(false);
        }
		internal static bool IsCompatible(CommandParameter param, RegistryContext ctx, Command parentCommand)
		{
			// 'bool' parameters are in Boolean group: conditions below will pass
			if (param.GetImplementationType(ctx, parentCommand) == "bool")
				return (false);

			// Unsafe parameters are not allowed, Group is a requirement
			if (!param.IsSafe || param.Group == null)
				return (false);

			// Check actual existence of strongly typed enum
			return (ctx.Registry.Groups.FindIndex(delegate(EnumerantGroup item) { return (item.Name == param.Group); }) >= 0);
		}
Beispiel #3
0
        internal static bool IsCompatible(RegistryContext ctx, Command command, CommandParameter param)
        {
            // 'bool' parameters are in Boolean group: conditions below will pass
            if (param.GetImplementationType(ctx, command) == "bool")
            {
                return(false);
            }

            // Unsafe parameters are not allowed, Group is a requirement
            if (!param.IsSafe || param.Group == null)
            {
                return(false);
            }

            // Check actual existence of strongly typed enum
            return(ctx.Registry.Groups.FindIndex(delegate(EnumerantGroup item) { return (item.Name == param.Group); }) >= 0);
        }
		internal static bool IsCompatible(RegistryContext ctx, Command command, CommandParameter param)
		{
			switch (ctx.Class.ToLower()) {
				case "gl":
					break;
				default:
					return (false);
			}

			if (param.GetImplementationType(ctx, command) != "IntPtr")
				return (false);
			if (Regex.IsMatch(param.Name, "offset"))
				return (false);
			if (param.IsConstant || command.IsGetImplementation(ctx))
				return (true);

			return (false);
		}