public KlasaInfo GetKlasaInfo() { Initialize(); KlasaInfo klasaInfo = new KlasaInfo(); foreach (var member in members) { // PrzestrzenNazw if (member is NamespaceDeclarationSyntax nameSpace) { klasaInfo.PrzestrzenNazw = nameSpace.Name.ToString(); } if (member is ClassDeclarationSyntax name) { // Nazwa klasaInfo.Nazwa = name.Identifier.ValueText; // Modyfikator Dostępu klasaInfo.ModyfikatorDostepu = name.Modifiers.ToString(); if (klasaInfo.ModyfikatorDostepu == null) { klasaInfo.ModyfikatorDostepu = "private"; } } } klasaInfo.WlasciwosciLista = GetWlasciwosciInfoLista(); return(klasaInfo); }
public TemplateExecutor() { textTemplatingService = Package.GetGlobalService(typeof(STextTemplating)) as ITextTemplating; infoUtils = new InfoUtils(); klasaInfo = infoUtils.GetKlasaInfo(); TTUtils = new TTSettingsUtils(); host = textTemplatingService as ITextTemplatingSessionHost; host.Session = host.CreateSession(); }