Skip to content

Commit

Permalink
Now use global everywhere inside a observable chain
Browse files Browse the repository at this point in the history
  • Loading branch information
glennawatson committed Jun 10, 2019
1 parent bfbde0d commit 791ba57
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/Pharmacist.Core/Generation/ReflectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,18 +158,12 @@ public static IType GetRealType(this IType type, ICompilation compilation)
/// <returns>A type descriptor including the generic arguments.</returns>
public static string GenerateFullGenericName(this IType currentType)
{
return GenerateFullGenericName(currentType, true);
}

private static string GenerateFullGenericName(this IType currentType, bool isStart)
{
var currentTypeFullName = GetBuiltInType(currentType.FullName);
var sb = new StringBuilder(isStart ? "global::" + currentTypeFullName : currentTypeFullName);
var sb = new StringBuilder("global::" + GetBuiltInType(currentType.FullName));

if (currentType.TypeParameterCount > 0)
{
sb.Append("<")
.Append(string.Join(", ", currentType.TypeArguments.Select(x => GenerateFullGenericName(x, false))))
.Append(string.Join(", ", currentType.TypeArguments.Select(GenerateFullGenericName)))
.Append(">");
}

Expand Down

0 comments on commit 791ba57

Please sign in to comment.