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

            templateEngine.AddReplacementValue(CodeGenerationTemplateKeys.Namespace, ns);
        }
예제 #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);
        }