public override IStorableLiteral ImplementDeclaration(CodeDescriptor container, object sample, ParameterInfo pi)
        {
            var signal = sample as SignalBase;
            if (signal == null)
                throw new ArgumentException("Signal instance null");

            Type etype = pi.ParameterType;
            ArgumentDescriptor.EArgDirection flowDir;
            if (typeof(IInOutPort).IsAssignableFrom(etype))
                flowDir = ArgumentDescriptor.EArgDirection.InOut;
            else if (typeof(IInPort).IsAssignableFrom(etype))
                flowDir = ArgumentDescriptor.EArgDirection.In;
            else if (typeof(IOutPort).IsAssignableFrom(etype))
                flowDir = ArgumentDescriptor.EArgDirection.Out;
            else
                throw new NotImplementedException();

            var sref = new SignalRef(signal.Descriptor, SignalRef.EReferencedProperty.Instance);

            SignalArgumentDescriptor desc = new SignalArgumentDescriptor(
                sref,
                ArgumentDescriptor.EArgDirection.In,
                flowDir,
                EVariability.Constant,
                pi.Position);
            container.AddChild(desc, sref.Name);

            return sref;
        }