29 references to IsOptional
CSharpSyntaxGenerator (29)
AbstractFileWriter.cs (1)
148
return getNullableAwareType(field.Type, optionalOrLazy:
IsOptional
(field) || !green, green);
SourceWriter.cs (26)
304
if (IsAnyList(field.Type) ||
IsOptional
(field))
541
if (!IsAnyList(field.Type) && !
IsOptional
(field))
547
if (
IsOptional
(field))
553
if (field.Kinds.Count == 1 && !
IsOptional
(field))
564
if (
IsOptional
(field))
577
if (
IsOptional
(field))
860
if (
IsOptional
(field))
915
var suffix =
IsOptional
(field) ? "" : "!";
953
var suffix =
IsOptional
(field) ? "" : "!";
964
var suffix =
IsOptional
(field) ? "" : "!";
1027
if (
IsOptional
(field) && IsNode(field.Type) && field.Type != "SyntaxToken")
1136
if (baseField.Type != "SyntaxToken" &&
IsOptional
(baseField) && !
IsOptional
(field))
1223
if (referencedNode != null && (!
IsOptional
(field) || RequiredFactoryArgumentCount(referencedNode) == 0))
1268
if (
IsOptional
(field))
1315
else if (
IsOptional
(f))
1371
return (!
IsOptional
(field) && !IsAnyList(field.Type) && !CanBeAutoCreated(node, field)) || IsValueField(field);
1405
if (
IsOptional
(field) || CanBeAutoCreated(nd, field) || IsAnyList(field.Type))
1455
if (
IsOptional
(field))
1477
else if (!IsAnyList(field.Type) && !
IsOptional
(field))
1490
if (
IsOptional
(f))
1504
else if (
IsOptional
(f))
1527
if (
IsOptional
(field) && IsNode(field.Type) && field.Type != "SyntaxToken")
1536
if (
IsOptional
(field) || IsAnyList(field.Type))
1714
if (IsNode(f.Type) && !
IsOptional
(f) && f.Type != "SyntaxToken")
1739
if (
IsOptional
(f) || IsAnyList(f.Type))
TestWriter.cs (2)
127
if (
IsOptional
(field))
247
if (
IsOptional
(field))