internal static new bool IsCompatible(RegistryContext ctx, Command parentCommand, CommandParameter param) { if (String.IsNullOrEmpty(param.Length) || !param.IsManagedArray(ctx, parentCommand)) { return(false); } string sizeParamName; switch (param.LengthMode) { case CommandParameterLengthMode.ArgumentReference: sizeParamName = param.Length; break; case CommandParameterLengthMode.ArgumentMultiple: sizeParamName = param.LengthArgument; break; default: return(false); } if (sizeParamName == null) { return(false); } if (parentCommand.Parameters.FindIndex(delegate(CommandParameter item) { return(item.Name == sizeParamName); }) < 0) { return(false); } return(true); }
internal static bool IsArrayLengthParameter(CommandParameter param, RegistryContext ctx, Command parentCommand) { CommandParameter arrayParameter = GetArrayParameter(param, ctx, parentCommand); return(arrayParameter != null && arrayParameter.IsManagedArray(ctx, parentCommand)); }