Exemplo n.º 1
0
        void ShowUsingStatements(ContextString context, string contextName, StringBuilder output)
        {
            if (context.HasUsingStatements)
            {
                var usingStatements = context.GetUsingStatements();

                foreach (var usingStatement in usingStatements)
                {
                    output.Append("- " + contextName + " Using Statement: ");

                    if (usingStatement.Type == UsingString.UsingType.AddPrefix)
                    {
                        output.AppendLine("Add " + usingStatement.PrefixToAdd.FormatWithSeparator('.'));
                    }
                    else if (usingStatement.Type == UsingString.UsingType.ReplacePrefix)
                    {
                        output.AppendLine("Replace " + usingStatement.PrefixToRemove.FormatWithSeparator('.') +
                                          " with " + usingStatement.PrefixToAdd.FormatWithSeparator('.'));
                    }
                    else
                    {
                        output.AppendLine("Unknown using type " + usingStatement.Type);
                    }
                }
            }
        }