public static void CreateViewModels(string projectDirectory, string authServerProjectName, IFileSystem fileSystem)
        {
            var classPath = ClassPathHelper.AuthServerViewModelsClassPath(projectDirectory, "SharedViewModels.cs", authServerProjectName);
            var fileText  = GetControllerText(classPath.ClassNamespace, projectDirectory, authServerProjectName);

            Utilities.CreateFile(classPath, fileText, fileSystem);
        }
        public static string GetControllerText(string classNamespace, string projectDirectory, string authServerProjectName)
        {
            var modelsClassPath     = ClassPathHelper.AuthServerModelsClassPath(projectDirectory, "", authServerProjectName);
            var viewModelsClassPath = ClassPathHelper.AuthServerViewModelsClassPath(projectDirectory, "", authServerProjectName);
            var extClassPath        = ClassPathHelper.AuthServerExtensionsClassPath(projectDirectory, "Extensions.cs", authServerProjectName);
            var attrClassPath       = ClassPathHelper.AuthServerAttributesClassPath(projectDirectory, "", authServerProjectName);

            return(@$ "{DuendeDisclosure}// Copyright (c) Duende Software. All rights reserved.
Exemplo n.º 3
0
        public static string GetLoginViewText(string projectDirectory, string authServerProjectName)
        {
            var viewModelsClassPath = ClassPathHelper.AuthServerViewModelsClassPath(projectDirectory, "", authServerProjectName);

            return(@$ "@* {DuendeDisclosure}// Copyright (c) Duende Software. All rights reserved.
// See LICENSE in the project root for license information. 

This file also uses a free template from Tailwind UI as a base.*@


@model {viewModelsClassPath.ClassNamespace}.LoginViewModel
Exemplo n.º 4
0
        private static string GetExtensionsText(string classNamespace, string projectDirectory, string authServerProjectName)
        {
            var viewModelClassPath = ClassPathHelper.AuthServerViewModelsClassPath(projectDirectory, "", authServerProjectName);

            return(@$ "{DuendeDisclosure}// Copyright (c) Duende Software. All rights reserved.