protected override object CreateDataSource(string name, Type type, NamedParameters ctorArgs)
        {
            if (type == typeof(IPriceSeriesDataSource))
            {
                var realDS    = RealFactory.Create <IEnumerableDataSource <SimplePrice> >(name, ctorArgs);
                var operators = GetOperatorsForDataSource(name);
                return(new PriceSeriesDataSource(realDS, operators));
            }

            return(RealFactory.Create(name, type, ctorArgs));
        }
Esempio n. 2
0
        private CurrencyFactory GetFactory(int isoCurrency)
        {
            CurrencyFactory factory;

            switch (isoCurrency)
            {
            case (int)Currency.USD:
                factory = new DolarFactory();
                break;

            case (int)Currency.BRL:
                factory = new RealFactory();
                break;

            default:
                throw new NotFoundException("Iso no valida");
            }

            return(factory);
        }
Esempio n. 3
0
 /// <summary>Initializes a new instance of the <see cref="OneDimFourierTransformationFactory"/> class.
 /// </summary>
 /// <param name="fourierTransformationFactory">The (Fast) Fourier Transformation factory.</param>
 internal OneDimFourierTransformationFactory(IOneDimFourierTransformationFactory fourierTransformationFactory)
 {
     Real      = new RealFactory(fourierTransformationFactory);
     m_Factory = fourierTransformationFactory;
 }
 public override bool CanCreate(string name, Type type)
 {
     return((type == typeof(IPriceSeriesDataSource) && RealFactory.CanCreate(name, typeof(IEnumerableDataSource <SimplePrice>))) ||
            RealFactory.CanCreate(name, type));
 }