protected override void ApplyTemplate(ITemplateEngine templateEngine, ICryptoCodeGenerationTaskModel model, Project project,
                                              FileInfo file)
        {
            var ns = ProjectHelpers.GetFileNameSpace(project, file.FullName);

            templateEngine.AddReplacementValue(CodeGenerationTemplateKeys.Namespace, ns);
        }
Ejemplo n.º 2
0
        protected override void ApplyTemplate(ITemplateEngine templateEngine, ICryptoCodeGenerationTaskModel model, Project project,
                                              FileInfo file)
        {
            if (!(model is SymmetricEncryptionCryptoTaskModel cryptoModel))
            {
                return;
            }

            var ns = ProjectHelpers.GetFileNameSpace(project, file.FullName);

            templateEngine.AddReplacementValue(SymmetricCryptoProviderTemplateKeys.Namespace, ns);

            SetConfiguration(templateEngine, cryptoModel);

            SetMethods(templateEngine, cryptoModel);
        }