void AddRuleFile()

in libyara.NET/Compiler.h [56:77]


        void AddRuleFile(String^ path)
        {
            compilationErrors->Clear();
            auto nativePath = marshal_as<std::string>(path);

            try
            {
                FileWrapper fw(nativePath.c_str(), "r");
                auto errors = yr_compiler_add_file(
                    compiler,
                    fw,
                    nullptr,
                    nativePath.c_str());

                if (errors)
                    throw gcnew CompilationException(compilationErrors);
            }
            catch (const file_error& err)
            {
                throw gcnew Win32Exception(err.error());
            }
        }