示例#1
0
        public static bool TryGetOption <T>(this ProcessorSchema schema, string key, out T value)
        {
            if (schema.Options == null || !schema.Options.ContainsKey(key))
            {
                value = default(T);
                return(false);
            }

            try
            {
                value = (T)schema.Options[key];
                return(true);
            }
            catch (Exception)
            {
                value = default(T);
                return(false);
            }
        }
示例#2
0
 public void AddProcessorInfo(ProcessorSchema schema)
 {
     Processors.Add(schema);
 }