Ejemplo n.º 1
0
        public GuardFactory Create(PatternGuardSpec spec)
        {
            Object       result = CreateFactory(spec, PluggableObjectType.PATTERN_GUARD);
            GuardFactory factory;

            try
            {
                factory = (GuardFactory)result;

                if (Log.IsDebugEnabled)
                {
                    Log.Debug(".create Successfully instantiated guard");
                }
            }
            catch (InvalidCastException e)
            {
                String message = "Error casting guard factory instance to " + typeof(GuardFactory).FullName + " interface for guard '" + spec.ObjectName + "'";
                throw new PatternObjectException(message, e);
            }
            return(factory);
        }
        public GuardForge Create(PatternGuardSpec spec)
        {
            var result = CreateForge(spec, PluggableObjectType.PATTERN_GUARD);
            GuardForge forge;
            try {
                forge = (GuardForge) result;

                if (Log.IsDebugEnabled) {
                    Log.Debug(".create Successfully instantiated guard");
                }
            }
            catch (InvalidCastException e) {
                var message = "Error casting guard forge instance to " +
                              typeof(GuardForge).Name +
                              " interface for guard '" +
                              spec.ObjectName +
                              "'";
                throw new PatternObjectException(message, e);
            }

            return forge;
        }
Ejemplo n.º 3
0
 /// <summary>Constructor. </summary>
 /// <param name="patternGuardSpec">factory for guard construction</param>
 public EvalGuardFactoryNode(PatternGuardSpec patternGuardSpec)
 {
     _patternGuardSpec = patternGuardSpec;
 }
Ejemplo n.º 4
0
 public EvalFactoryNode MakeGuardNode(PatternGuardSpec patternGuardSpec)
 {
     return(new EvalGuardFactoryNode(patternGuardSpec));
 }
Ejemplo n.º 5
0
 /// <summary>
 ///     Constructor.
 /// </summary>
 /// <param name="attachPatternText">whether to attach EPL subexpression text</param>
 /// <param name="patternGuardSpec">factory for guard construction</param>
 public EvalGuardForgeNode(bool attachPatternText, PatternGuardSpec patternGuardSpec) : base(attachPatternText)
 {
     PatternGuardSpec = patternGuardSpec;
 }