コード例 #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> >);
        }
コード例 #2
0
ファイル: IOBuildContext.cs プロジェクト: vnmone/vvvv-sdk
        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);
        }
コード例 #3
0
 public static object CreateIO(this IIOFactory factory, IOBuildContext context)
 {
     return(factory.CreateIOContainer(context).RawIOObject);
 }
コード例 #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));
        }
コード例 #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));
        }