/// <summary> /// This is a strongly typed version of <see cref="Input(ComponentType)"/>, /// specifically for components implementing <see cref="IBufferElementData"/>. /// The data (coming from a <see cref="Buffer{T}"/>) can be connected to a /// <see cref="DynamicBuffer{T}"/> on a <see cref="ComponentNode"/>. /// /// <seealso cref="Input{TType}"/> /// </summary> public static DataInput <ComponentNode, Buffer <TType> > Input <TType>(Detail.IsBuffer <TType> _ = default) where TType : struct, IBufferElementData { unsafe { return(new DataInput <ComponentNode, Buffer <TType> >(null, Input(ComponentType.ReadWrite <TType>()))); } }
/// <summary> /// This is a strongly typed version of <see cref="Output(ComponentType)"/>, /// specifically for components implementing <see cref="IBufferElementData"/>. /// The data (coming from a <see cref="DynamicBuffer{T}"/>) can be connected to a /// <see cref="Buffer{T}"/> on a <see cref="NodeDefinition"/>'s <see cref="IKernelPortDefinition"/>. /// /// <seealso cref="Output{TType}"/> /// </summary> public static DataOutput <ComponentNode, Buffer <TType> > Output <TType>(Detail.IsBuffer <TType> _ = default) where TType : struct, IBufferElementData { var output = new DataOutput <ComponentNode, Buffer <TType> >(); output.Port = Output(ComponentType.ReadOnly <TType>()); return(output); }