internal GlobalParameters(Assembly[] sourceAssemblies)
        {
            var tsGlobal = sourceAssemblies.Select(c => c.GetCustomAttribute <TsGlobalAttribute>())
                           .Where(c => c != null)
                           .OrderByDescending(c => c.Priority)
                           .FirstOrDefault();

            _attr = tsGlobal ?? new TsGlobalAttribute();
        }
예제 #2
0
 private void ApplyTsGlobal(TsGlobalAttribute tsGlobal, GlobalParameters gp)
 {
     if (tsGlobal == null)
     {
         return;
     }
     gp.CamelCaseForMethods               = tsGlobal.CamelCaseForMethods;
     gp.CamelCaseForProperties            = tsGlobal.CamelCaseForProperties;
     gp.DiscardNamespacesWhenUsingModules = tsGlobal.DiscardNamespacesWhenUsingModules;
     gp.ExportPureTypings     = tsGlobal.ExportPureTypings;
     gp.GenerateDocumentation = tsGlobal.GenerateDocumentation;
     gp.RootNamespace         = tsGlobal.RootNamespace;
     gp.UseModules            = tsGlobal.UseModules;
     gp.TabSymbol             = tsGlobal.TabSymbol;
     gp.WriteWarningComment   = tsGlobal.WriteWarningComment;
     //gp.StrictNullChecks = tsGlobal.StrictNullChecks;
 }