Пример #1
0
        public IYourBooksApplication YourBooksApplication() //TODO: ver si hay alguna manera de correr los tests en los dos ambientes.
        {
            //DevelopmentEnvironment enviroment = new DevelopmentEnvironment(new TransientDataBaseStrategy());
            DevelopmentEnvironment enviroment = new DevelopmentEnvironment(new PersitentDataBaseStrategy());

            return(enviroment.GetApplication());
        }
Пример #2
0
 /// <summary>
 /// RTCOPのコードジェネレータ
 /// </summary>
 /// <param name="nspace">レイヤクラスのデフォルトの名前空間</param>
 /// <param name="lineTerminator">改行文字</param>
 /// <param name="target">開発対象</param>
 /// <param name="environment">開発環境</param>
 /// <param name="includePaths">ヘッダファイルのディレクトリパス</param>
 public RTCOPCodeGenerator(string nspace, string lineTerminator, DevelopmentTarget target, DevelopmentEnvironment environment, List <string> includePaths)
 {
     Namespace      = nspace;
     LineTerminator = lineTerminator;
     Target         = target;
     Environment    = environment;
     IncludePaths   = includePaths;
 }
Пример #3
0
        public override int GetHashCode()
        {
            int hash = 3;

            hash = hash * 5 + DevelopmentEnvironment.GetHashCode();
            hash = hash * 5 + PlatformToolset.GetHashCode();

            return(hash);
        }
Пример #4
0
        public void Method()
        {
            IEnvironment environment = new DevelopmentEnvironment();

            IInvoiceProcessor invoiceProcessor = new ProductionInvoiceProcessor();

            if (invoiceProcessor.GetType()
                .GetCustomAttribute <DependencyAttribute>()
                .Environment !=
                environment)
            {
                throw new Exception("Invalid dependency for current environment.");
            }
        }
Пример #5
0
        public static void initVarEnviroment(DevelopmentEnvironment environment = DevelopmentEnvironment.IISServer)
        {
            switch (environment)
            {
            case DevelopmentEnvironment.IISExpressServer:
                URL_BASE = "https://localhost:44333/api/v1/";
                break;

            case DevelopmentEnvironment.AzureServer:
                URL_BASE = "https://deltacargoapi.azurewebsites.net/api/v1";
                break;

            case DevelopmentEnvironment.IISServer:
                //URL_BASE = "https://deltacargoapi.azurewebsites.net/api/v1";
                break;

            default:
                break;
            }
        }
 public void SetUp()
 {
     Environment = new DevelopmentEnvironment(new TransientDataBaseStrategy());
     Application = Environment.GetApplication();
     Controller  = new HomeController(Application);
 }
Пример #7
0
        /// <summary>
        /// コンパイルオプションのチェック。
        /// </summary>
        /// <param name="args"></param>
        private void CheckCompileOptions(string[] args)
        {
            // オプションの読み取り
            Func <string, string> getPath = (s) =>
            {
                string result = s;
                if (!(s.EndsWith("/") || s.EndsWith("\\")))
                {
                    result = s + "/";
                }
                return(result);
            };
            int offset = 1;

            for (int i = 0; i < args.Length; i += offset)
            {
                string arg = args[i];
                switch (arg)
                {
                // 出力ファイル
                case "-o":
                case "-O":
                    if ((i + 1) < args.Length)
                    {
                        OutputFile = args[i + 1];
                    }
                    offset = 2;
                    break;

                // コンフィグファイル
                case "-c":
                case "-C":
                    if ((i + 1) < args.Length)
                    {
                        ConfigFilePath = args[i + 1];
                    }
                    offset = 2;
                    break;

                // ヘッダファイルのディレクトリパス
                case "-i":
                case "-I":
                    if ((i + 1) < args.Length)
                    {
                        string   arg2     = args[i + 1];
                        string[] includes = arg2.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
                        foreach (string inc in includes)
                        {
                            IncludePaths.Add(getPath(inc));
                        }
                    }
                    offset = 2;
                    break;

                // マクロ定義
                case "-d":
                case "-D":
                    if ((i + 1) < args.Length)
                    {
                        string   arg2   = args[i + 1];
                        string[] macros = arg2.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
                        foreach (string macro in macros)
                        {
                            Macros.Add(macro);
                        }
                    }
                    offset = 2;
                    break;

                // 開発対象
                case "-t":
                case "-T":
                    if ((i + 1) < args.Length)
                    {
                        string arg2 = args[i + 1].ToLower();
                        switch (arg2)
                        {
                        case "win32":
                        case "win_32":
                        case "windows32":
                        case "windows_32":
                        case "winx86":
                        case "win_x86":
                        case "windowsx86":
                        case "windows_x86":
                        case "x86win":
                        case "x86_win":
                        case "x86windows":
                        case "x86_windows":
                            Target = DevelopmentTarget.WindowsX86;
                            break;

                        case "win64":
                        case "win_64":
                        case "windows64":
                        case "windows_64":
                        case "winx64":
                        case "win_x64":
                        case "windowsx64":
                        case "windows_x64":
                        case "x64win":
                        case "x64_win":
                        case "x64windows":
                        case "x64_windows":
                            Target = DevelopmentTarget.WindowsX64;
                            break;

                        case "linux32":
                        case "linux_32":
                        case "linuxx86":
                        case "linux_x86":
                        case "x86linux":
                        case "x86_linux":
                            Target = DevelopmentTarget.LinuxX86;
                            break;

                        case "linux64":
                        case "linux_64":
                        case "linuxx64":
                        case "linux_x64":
                        case "x64linux":
                        case "x64_linux":
                            Target = DevelopmentTarget.LinuxX64;
                            break;

                        case "linuxarm":
                        case "linux_arm":
                        case "armlinux":
                        case "arm_linux":
                            Target = DevelopmentTarget.LinuxARM;
                            break;

                        case "linuxarm64":
                        case "linux_arm64":
                        case "arm64linux":
                        case "arm64_linux":
                            Target = DevelopmentTarget.LinuxARM64;
                            break;

                        case "mac":
                        case "macos":
                        case "mac64":
                        case "macos64":
                        case "mac_64":
                        case "macos_64":
                        case "macx64":
                        case "macosx64":
                        case "mac_x64":
                        case "macos_x64":
                        case "x64mac":
                        case "x64macos":
                        case "x64_mac":
                        case "x64_macos":
                            Target = DevelopmentTarget.macOSX64;
                            break;

                        default:
                            break;
                        }
                    }
                    offset = 2;
                    break;

                // 開発環境
                case "-e":
                case "-E":
                    if ((i + 1) < args.Length)
                    {
                        string arg2 = args[i + 1].ToLower();
                        switch (arg2)
                        {
                        case "vs":
                        case "visualstudio":
                        case "visual_studio":
                        case "vc":
                        case "vc++":
                        case "visualc":
                        case "visualc++":
                        case "visual_c":
                        case "visual_c++":
                            Environment = DevelopmentEnvironment.VisualStudio;
                            break;

                        case "gcc":
                        case "g++":
                            Environment = DevelopmentEnvironment.GCC;
                            break;

                        case "clang":
                        case "llvm":
                        case "mingw":
                            Environment = DevelopmentEnvironment.Clang;
                            break;

                        default:
                            break;
                        }
                    }
                    offset = 2;
                    break;

                // ソースのルートフォルダ
                case "-r":
                case "-R":
                    if ((i + 1) < args.Length)
                    {
                        string arg2 = args[i + 1];
                        SourceRootPath = getPath(arg2);
                    }
                    offset = 2;
                    break;

                // ヘルプ
                case "--help":
                    break;

                // バージョン
                case "--virsion":
                    break;

                // 入力ファイル
                default:
                    // 未知のオプションでないかチェック
                    if (arg[0] != '-')
                    {
                        // 入力ファイルの追加
                        SourceFiles.Add(arg);
                    }
                    offset = 1;
                    break;
                }
            }
        }
Пример #8
0
 public bool Equals(FastBuildWindowsCompilerFamilyKey compilerFamilyKey)
 {
     return(DevelopmentEnvironment.Equals(compilerFamilyKey.DevelopmentEnvironment) &&
            PlatformToolset.Equals(compilerFamilyKey.PlatformToolset));
 }
 public TusLibrosControllerFactory()
 {
     Environment = new DevelopmentEnvironment(new TransientDataBaseStrategy());
     Application = Environment.GetApplication();
 }
        private IYourBooksApplication GetTransientAplpliApplication()
        {
            DevelopmentEnvironment environment = new DevelopmentEnvironment(new TransientDataBaseStrategy());

            return(environment.GetApplication());
        }
        public void MergeSql()
        {
            var dbRoot = DevelopmentEnvironment.GetCurrentProjectRootDirectory().Parent.GetSubDirectory("Beyova.ApiTracking.SqlServer").GetSubDirectory("Database");

            SqlPublishHelper.MergeSqlPublishScripts(dbRoot, dbRoot.GetSubDirectory("Setup"), "Table", null, null, "StoredProcedure");
        }
Пример #12
0
 public IYourBooksApplication GetApplication(DevelopmentEnvironment developmentEnvironment)
 {
     return(new PersistentYourBooksApplication(developmentEnvironment.Clock));
 }