Skip to content

Commit

Permalink
Fixed formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelstaib committed Apr 11, 2020
1 parent dc85df2 commit 48cc462
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 25 deletions.
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'netcoreapp2.1'">
<NoWarn>$(NoWarn);8600;8601;8602;8603;8604</NoWarn>
<NoWarn>$(NoWarn);8600;8601;8602;8603;8604;CS0436</NoWarn>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'netcoreapp2.1'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,27 +79,9 @@ public static string Scalar_Cannot_ParseValue(
valueType.FullName);
}

public static string String_Argument_NullOrEmpty(string parameterName)
{

if (string.IsNullOrEmpty(parameterName))
{
throw new ArgumentException(string.Format(
CultureInfo.InvariantCulture,
TypeResources.String_Argument_NullOrEmpty,
nameof(parameterName)),
nameof(parameterName));
}

return string.Format(
CultureInfo.InvariantCulture,
TypeResources.String_Argument_NullOrEmpty,
parameterName);
}

public static string Type_Name_IsNotValid(string typeName)
{
string name = typeName ?? "null";
var name = typeName ?? "null";
return $"`{name}` is not a valid " +
"GraphQL type name.";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public static class ListExtensions
{
public static T Pop<T>(this IList<T> list)
{
int lastIndex = list.Count - 1;
var lastIndex = list.Count - 1;
T p = list[lastIndex];
list.RemoveAt(lastIndex);
return p;
Expand All @@ -17,7 +17,7 @@ public static bool TryPop<T>(this IList<T> list, [NotNullWhen(true)]out T item)
{
if (list.Count > 0)
{
int lastIndex = list.Count - 1;
var lastIndex = list.Count - 1;
item = list[lastIndex]!;
list.RemoveAt(lastIndex);
return true;
Expand All @@ -31,15 +31,15 @@ public static bool TryPop<T>(this IList<T> list, [NotNullWhen(true)]out T item)

public static T Peek<T>(this IList<T> list)
{
int lastIndex = list.Count - 1;
var lastIndex = list.Count - 1;
return list[lastIndex];
}

public static bool TryPeek<T>(this IList<T> list, [NotNullWhen(true)]out T item)
{
if (list.Count > 0)
{
int lastIndex = list.Count - 1;
var lastIndex = list.Count - 1;
item = list[lastIndex]!;
return true;
}
Expand All @@ -52,7 +52,7 @@ public static T PeekOrDefault<T>(this IList<T> list, T defaultValue = default)
{
if (list.Count > 0)
{
int lastIndex = list.Count - 1;
var lastIndex = list.Count - 1;
return list[lastIndex];
}
return defaultValue;
Expand Down

0 comments on commit 48cc462

Please sign in to comment.