public AfaOperator(string factoryTypeName)
        {
            // Load the AFA descriptor using the fully qualified type name
            Type inputType = Type.GetType(factoryTypeName, true);

            if (!typeof(IAfaDescriptorFactory <TInput, TRegister>).IsAssignableFrom(inputType))
            {
                throw new InvalidOperationException(string.Format("Supplied type {0} does not implemented the required interface {1}.",
                                                                  inputType, typeof(IAfaDescriptorFactory <TInput, TRegister>)));
            }

            IAfaDescriptorFactory <TInput, TRegister> afaDescriptorGenerator = (IAfaDescriptorFactory <TInput, TRegister>)Activator.CreateInstance(inputType);

            _descriptor = afaDescriptorGenerator.CreateDescriptor();
        }
 public void OnDeserialized(StreamingContext context)
 {
     _descriptor = new TFactory().CreateDescriptor();
 }
 /// <summary>
 /// Initializes a new instance of AfaOperator.
 /// </summary>
 /// <param name="patternMaxDuration">The maximum duration of a pattern.</param>
 public AfaOperator(TimeSpan patternMaxDuration)
 {
     this._patternMaxDuration = patternMaxDuration;
     _descriptor = new TFactory().CreateDescriptor();
 }
 public AfaOperator(AfaDescriptor <TInput, TRegister> descriptor)
 {
     _descriptor = descriptor;
 }