frhagn / Typewriter

Automatic TypeScript template generation from C# source files
http://frhagn.github.io/Typewriter
Apache License 2.0
537 stars 132 forks source link

IsAbstract has no documentation #343

Open Prinsn opened 2 years ago

Prinsn commented 2 years ago

Currently trying to utilize this feature and have no idea how to make it work, it emits nothing, and there are no examples as to how to use it, and it does not exist on http://frhagn.github.io/Typewriter/pages/documentation.html

All attempts to use $IsAbstract in template code result in empty strings.

IsAbstract also exists on Type.BaseClass but not on Type?

Trying to use

$Type[$getAbstractString]

  string getAbstractString(Type c){
      var baseClass = c.BaseClass;
      if (baseClass == null)
          return "no base class";
      return baseClass.IsAbstract ? "true" : "false";
  }

Results in no base class for an abstract type.