Пример #1
0
// gmcs QueryStringParser.cs -r:../Util/Util.dll -r:../BeagleClient/Beagle.dll PropertyKeywordFu.cs
        public static void Main()
        {
            PropertyKeywordFu.ReadKeywordMappings();

            while (true)
            {
                string input = Console.ReadLine();
                if (input == String.Empty)
                {
                    continue;
                }

                Console.WriteLine("Parsing query string '{0}'", input);
                foreach (QueryPart part in Parse(input))
                {
                    Console.WriteLine(part.ToString());
                }
            }
        }
Пример #2
0
        static public void Start()
        {
            // Only add the executing assembly if we haven't already loaded it.
            if (assemblies.IndexOf(Assembly.GetExecutingAssembly()) == -1)
            {
                assemblies.Add(Assembly.GetExecutingAssembly());
            }

            foreach (Assembly assembly in assemblies)
            {
                ScanAssemblyForQueryables(assembly);

                // This allows backends to define their
                // own executors.
                Server.ScanAssemblyForExecutors(assembly);
            }

            assemblies = null;

            PropertyKeywordFu.ReadKeywordMappings();

            LoadSystemIndexes();
            LoadStaticQueryables();

            if (indexing_delay < 0)
            {
                return;
            }

            if (indexing_delay == 0 || Environment.GetEnvironmentVariable("BEAGLE_EXERCISE_THE_DOG") != null)
            {
                StartQueryables();
            }
            else
            {
                Logger.Log.Debug("Waiting {0} seconds before starting queryables", indexing_delay);
                GLib.Timeout.Add((uint)indexing_delay * 1000, new GLib.TimeoutHandler(StartQueryables));
            }
        }