Add Support - To Replace Namespaces with other Namespaces (stringreplacement after creation)

Issue #93 resolved
SquadWuschel Name
created an issue

Hi,

its a bit hard to explain the Problem. I've got some DLLs with Namespace

Company.Internal.DomainModel.User

and some with

Internal.DomainModel.Printer

But here comes TypeScript with some Problems that when I use a Custom Type in the Printer class which lies in the "Company.Internal." Namespace Typescript says can't find because its not going to search from Global Namespace.

So my current Solution is to search an Replace " Internal." with " Company.Internal." every time I recreate the Interfaces and thats not very cool.

So my Question is, ist there a possibility to add the option to replace some Strings directly after Creation with the T4 Template like:

TypeScript.Replacement().Replace(" Internal.", " Company.Internal")

thx much SquadWuschel

(p.s. very cool T4 Template helps a lot)

Comments (3)

  1. SquadWuschel Name reporter

    thx much it Works like a charm. I've modified the formatter a bit and it Works.

    .WithModuleNameFormatter(m => m.Name.StartsWith("Internal") ? " Company." + m.Name : m.Name)
    
  2. Log in to comment