예제 #1
0
 public NodeInStream(INodeIn nodeIn, IConnectionHandler handler, T defaultValue = default(T))
 {
     FNodeIn = nodeIn;
     if (typeof(T).Assembly.IsDynamic)
     {
         FNodeIn.SetConnectionHandler(handler, new DynamicTypeWrapper(this));
     }
     else
     {
         FNodeIn.SetConnectionHandler(handler, this);
     }
     FAutoValidate   = nodeIn.AutoValidate;
     FDefaultValue   = defaultValue;
     FUpstreamStream = FNullStream;
 }
예제 #2
0
 public NodeInStream(INodeIn nodeIn, IConnectionHandler handler)
 {
     FNodeIn = nodeIn;
     FNodeIn.SetConnectionHandler(handler, this);
     FAutoValidate   = nodeIn.AutoValidate;
     FUpstreamStream = FNullStream;
 }
예제 #3
0
 public DX11ResourceInputStream(INodeIn nodeIn)
 {
     FNodeIn = nodeIn;
     FNodeIn.SetConnectionHandler(new DX11ResourceConnectionHandler(), this);
     FAutoValidate = nodeIn.AutoValidate;
     IsChanged     = true;
 }
        public void OnImportsSatisfied()
        {
            FX.SetConnectionHandler(this, null);

            FDataOut.SetSubType(
                new Guid[] {
                typeof(IValueData).GUID,
                typeof(IColorData).GUID,
            },
                "Value And Color mainly");

            FData = new MyColorAndValueData();
            FDataOut.SetInterface(FData);
        }
        public void OnImportsSatisfied()
        {
            FXSpread = new DynamiclyTypedSpread(FX);

            FX.SetConnectionHandler(this, null);

            // the following internally sets some legacy "or-connection handler"

//                        FX.SetSubType(
//                            new Guid[]{
//                                typeof(IValueData).GUID,
//                                typeof(IColorData).GUID,
//                                typeof(IStringData).GUID,
//                                typeof(IRawData).GUID,
//                                typeof(SomeType<>).GUID,
//                             },
//                            "Value | Color | String | Raw | any SomeType instanciation");
        }
예제 #6
0
        public NodeInStream(INodeIn nodeIn, IConnectionHandler handler, T defaultValue = default(T))
        {
            handler = handler ?? new DefaultConnectionHandler(null, typeof(T));
            FNodeIn = nodeIn;
            object inputInterface;

            if (typeof(T).UsesDynamicAssembly())
            {
                inputInterface = new DynamicTypeWrapper(this);
            }
            else
            {
                inputInterface = this;
            }
            FNodeIn.SetConnectionHandler(handler, inputInterface);
            FAutoValidate   = nodeIn.AutoValidate;
            FDefaultValue   = defaultValue;
            FUpstreamStream = FNullStream;
        }
 public void OnImportsSatisfied()
 {
     FInput.SetConnectionHandler(this, this);
 }