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> >); }
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); }
public static object CreateIO(this IIOFactory factory, IOBuildContext context) { return(factory.CreateIOContainer(context).RawIOObject); }
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)); }
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)); }