Ejemplo n.º 1
0
        public static ISpread <ISpread <T> > CreateBinSizeSpread <T>(this IIOContainer <IOutStream <int> > binSizePin, OutputAttribute attribute, bool subscribe = true)
        {
            var factory = binSizePin.Factory;
            var context = IOBuildContext.Create(typeof(ISpread <ISpread <T> >), attribute, subscribe);

            context.BinSizeIOContainer = binSizePin;
            return(factory.CreateIO(context) as ISpread <ISpread <T> >);
        }
Ejemplo n.º 2
0
        public static IOBuildContext Create(Type ioType, Type dataType, IOAttribute attribute, bool subscribe = true)
        {
            var inputAttribute = attribute as InputAttribute;

            if (inputAttribute != null)
            {
                return(IOBuildContext.Create(ioType, dataType, inputAttribute, subscribe));
            }
            var outputAttribute = attribute as OutputAttribute;

            if (outputAttribute != null)
            {
                return(IOBuildContext.Create(ioType, dataType, outputAttribute, subscribe));
            }
            var configAttribute = attribute as ConfigAttribute;

            if (configAttribute != null)
            {
                return(IOBuildContext.Create(ioType, dataType, configAttribute, subscribe));
            }
            return(null);
        }
Ejemplo n.º 3
0
 public static object CreateIO(this IIOFactory factory, IOBuildContext context)
 {
     return(factory.CreateIOContainer(context).RawIOObject);
 }
Ejemplo n.º 4
0
        public static object CreateIO(this IIOFactory factory, Type type, IOAttribute attribute, bool subscribe = true)
        {
            var context = IOBuildContext.Create(type, attribute, subscribe);

            return(factory.CreateIO(context));
        }
Ejemplo n.º 5
0
        public static IIOContainer CreateIOContainer(this IIOFactory factory, Type ioType, IOAttribute attribute, bool subscribe = true)
        {
            var context = IOBuildContext.Create(ioType, attribute, subscribe);

            return(factory.CreateIOContainer(context));
        }