Conversation
Pull Request Test Coverage Report for Build 9681982895Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9742975006Details
💛 - Coveralls |
| if (getValueLines.Length == 0) | ||
| { | ||
| getValueBody = @"throw new MissingMemberException($""The object does not have a gettable Realm property with name {propertyName}"");"; | ||
| } | ||
| else | ||
| { | ||
| getValueBody = $@"return propertyName switch | ||
| {{ | ||
| {getValueLines.Indent(trimNewLines: true)} | ||
| _ => throw new MissingMemberException($""The object does not have a gettable Realm property with name {{propertyName}}""), | ||
| }};"; | ||
| } |
Check notice
Code scanning / CodeQL
Missed ternary opportunity
| if (setValueLines.Length == 0) | ||
| { | ||
| setValueBody = @"throw new MissingMemberException($""The object does not have a settable Realm property with name {propertyName}"");"; | ||
| } | ||
| else | ||
| { | ||
| setValueBody = $@"switch (propertyName) | ||
| {{ | ||
| {setValueLines.Indent(trimNewLines: true)} | ||
| default: | ||
| throw new MissingMemberException($""The object does not have a settable Realm property with name {{propertyName}}""); | ||
| }}"; | ||
| } |
Check notice
Code scanning / CodeQL
Missed ternary opportunity
| if (getListValueLines.Length == 0) | ||
| { | ||
| getListValueBody = @"throw new MissingMemberException($""The object does not have a Realm list property with name {propertyName}"");"; | ||
| } | ||
| else | ||
| { | ||
| getListValueBody = $@"return propertyName switch | ||
| {{ | ||
| {getListValueLines.Indent(trimNewLines: true)} | ||
| _ => throw new MissingMemberException($""The object does not have a Realm list property with name {{propertyName}}""), | ||
| }};"; | ||
| } |
Check notice
Code scanning / CodeQL
Missed ternary opportunity
| if (getSetValueLines.Length == 0) | ||
| { | ||
| getSetValueBody = @"throw new MissingMemberException($""The object does not have a Realm set property with name {propertyName}"");"; | ||
| } | ||
| else | ||
| { | ||
| getSetValueBody = $@"return propertyName switch | ||
| {{ | ||
| {getSetValueLines.Indent(trimNewLines: true)} | ||
| _ => throw new MissingMemberException($""The object does not have a Realm set property with name {{propertyName}}""), | ||
| }};"; | ||
| } |
Check notice
Code scanning / CodeQL
Missed ternary opportunity
| if (getDictionaryValueLines.Length == 0) | ||
| { | ||
| getDictionaryValueBody = @"throw new MissingMemberException($""The object does not have a Realm dictionary property with name {propertyName}"");"; | ||
| } | ||
| else | ||
| { | ||
| getDictionaryValueBody = $@"return propertyName switch | ||
| {{ | ||
| {getDictionaryValueLines.Indent(trimNewLines: true)} | ||
| _ => throw new MissingMemberException($""The object does not have a Realm dictionary property with name {{propertyName}}""), | ||
| }};"; | ||
| } |
Check notice
Code scanning / CodeQL
Missed ternary opportunity
| if (property.TypeInfo.IsBacklink) | ||
| { | ||
| getFieldString = "GetBacklinks"; | ||
| } | ||
| else | ||
| { | ||
| getFieldString = property.TypeInfo.CollectionType switch | ||
| { | ||
| CollectionType.List => "GetListValue", | ||
| CollectionType.Set => "GetSetValue", | ||
| CollectionType.Dictionary => "GetDictionaryValue", | ||
| _ => throw new NotImplementedException(), | ||
| }; | ||
| } |
Check notice
Code scanning / CodeQL
Missed ternary opportunity
Pull Request Test Coverage Report for Build 9875518284Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Notes doc
TODO:
Must-have
Nice to have