44 references to ERR_InvalidNamedArgument
Microsoft.CodeAnalysis.CSharp (3)
Errors\ErrorFacts.cs (1)
987
or ErrorCode.
ERR_InvalidNamedArgument
Errors\MessageProvider.cs (1)
269
diagnostics.Add(ErrorCode.
ERR_InvalidNamedArgument
, node.ArgumentList.Arguments[namedArgumentIndex].Location, parameterName);
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
881
diagnostics.Add(ErrorCode.
ERR_InvalidNamedArgument
, arguments.AttributeSyntaxOpt.ArgumentList.Arguments[position].Location, namedArg.Key);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (41)
Attributes\AttributeTests_MarshalAs.cs (20)
414
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "IidParameterIndex = -1").WithArguments("IidParameterIndex"),
416
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "IidParameterIndex = -1").WithArguments("IidParameterIndex"),
418
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "IidParameterIndex = -1").WithArguments("IidParameterIndex"),
420
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "IidParameterIndex = 0x20000000").WithArguments("IidParameterIndex"));
531
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "SizeConst = -1").WithArguments("SizeConst"),
534
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "SizeParamIndex = -1").WithArguments("SizeParamIndex"),
537
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "SizeConst = -1").WithArguments("SizeConst"),
540
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "SizeParamIndex = -1").WithArguments("SizeParamIndex"),
543
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "SizeConst = int.MaxValue").WithArguments("SizeConst"),
546
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "SizeConst = int.MaxValue/4 + 1").WithArguments("SizeConst"),
549
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "ArraySubType = UnmanagedType.CustomMarshaler").WithArguments("ArraySubType"),
555
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "ArraySubType = (UnmanagedType)0x20000000").WithArguments("ArraySubType"),
558
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "ArraySubType = (UnmanagedType)(-1)").WithArguments("ArraySubType"));
668
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "SizeConst = -1").WithArguments("SizeConst"),
686
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "SizeConst = 0x20000000").WithArguments("SizeConst"));
949
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "SizeConst = -1").WithArguments("SizeConst"),
958
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "SizeConst = -1").WithArguments("SizeConst"),
964
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "SizeConst = Int32.MaxValue / 4 + 1").WithArguments("SizeConst"),
1077
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, @"MarshalType = ""a\udc00b""").WithArguments("MarshalType"),
1080
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, @"MarshalCookie = ""y\udc00""").WithArguments("MarshalCookie"));
Attributes\AttributeTests_StructLayout.cs (11)
241
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "Pack = -1").WithArguments("Pack"),
243
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "Pack = 3").WithArguments("Pack"),
245
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "Pack = 5").WithArguments("Pack"),
247
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "Pack = 6").WithArguments("Pack"),
249
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "Pack = 256").WithArguments("Pack"),
251
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "Pack = 512").WithArguments("Pack"),
253
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "Pack = Int32.MaxValue").WithArguments("Pack"));
266
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "Size = -1").WithArguments("Size"));
297
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "CharSet = (CharSet)(-1)").WithArguments("CharSet"),
299
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "CharSet = (CharSet)5").WithArguments("CharSet"),
301
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "CharSet = (CharSet)Int32.MaxValue").WithArguments("CharSet"));
Attributes\AttributeTests_WellKnownAttributes.cs (10)
2588
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "EntryPoint = null").WithArguments("EntryPoint"),
2590
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, @"EntryPoint = """"").WithArguments("EntryPoint"),
2594
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "EntryPoint = null").WithArguments("EntryPoint"),
2604
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, @"EntryPoint = ""x\0y""").WithArguments("EntryPoint"),
2612
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, @"EntryPoint = ""\uDC00\uD800""").WithArguments("EntryPoint"));
3404
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "MethodCodeType = (MethodCodeType)8").WithArguments("MethodCodeType"),
3406
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "MethodCodeType = (MethodCodeType)9").WithArguments("MethodCodeType"));
13927
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "MethodCodeType = System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining").WithArguments("MethodCodeType").WithLocation(6, 53),
13953
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "MethodCodeType = (System.Runtime.CompilerServices.MethodCodeType)System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining").WithArguments("MethodCodeType").WithLocation(6, 117)
13976
Diagnostic(ErrorCode.
ERR_InvalidNamedArgument
, "CharSet=0").WithArguments("CharSet").WithLocation(7, 38)