Пример #1
0
        /// <summary>
        /// Validate given <paramref name="mat"/> match with given compiler <paramref name="mode"/>
        /// </summary>
        /// <param name="mode">Compiler mode</param>
        /// <param name="mat">Matrix to check</param>
        public static void CheckModeAndReturnType(CompilerDictionaryMode mode,
                                                  string returntype)
        {
            switch (returntype)
            {
            case "Matris":
            {
                if (mode == CompilerDictionaryMode.Dataframe)
                {
                    throw new Exception(CompilerMessage.COMPILER_RETURNTYPE_MISMATCH(mode, returntype));
                }
                break;
            }

            case "Veri Tablosu":
            {
                if (mode == CompilerDictionaryMode.Matrix)
                {
                    throw new Exception(CompilerMessage.COMPILER_RETURNTYPE_MISMATCH(mode, returntype));
                }
                break;
            }

            default:
            {
                return;
            }
            }
        }