Exemple #1
0
        public void Serialize(BinaryWriter stream)
        {
            stream.Write((uint)NodeType);
            stream.Write(NodeId);
            stream.Write(X);
            stream.Write(Y);
            stream.Write(Color);
            stream.Write(Name);

            stream.Write(InputPins.Count);

            foreach (var pin in InputPins)
            {
                stream.Write((byte)(pin switch
                {
                    FlowInputPin _ => SerializedPinType.FlowInputPin,
                    TypeInputPin _ => SerializedPinType.TypeInputPin,
                    _ => throw new InvalidOperationException()
                }));
Exemple #2
0
 protected bool Equals(FlowInputPin other)
 {
     return(PinId.Equals(other.PinId));
 }