public static ClassSerializeType GetClassSerializeType(SyntaxList <AttributeListSyntax> attributes) { List <ClassSerializeType.ISerializeType> serializes = new List <ClassSerializeType.ISerializeType>(); var useProtoContract = attributes.GetAttribute("ProtoContractAttribute") != null; if (useProtoContract) { serializes.Add(new ClassSerializeType.Protobuf()); } var useMessagePack = attributes.GetAttribute("UnionAttribute") != null; if (useMessagePack) { serializes.Add(new ClassSerializeType.MessagePack()); } return(new ClassSerializeType(serializes)); }
public static bool IsMessagePackObject(SyntaxList <AttributeListSyntax> attributes) { return(attributes.GetAttribute("UnionAttribute") != null); }