// /************************************************************************
// * @file         ReferencedAssemblyInfo.cs
// * @author   Su Liang
// * @date       2023/04/13
// *
// * @copyright &copy Sicentury Inc.
// *
// * @brief
// *
// * @details
// *
// *
// * *****************************************************************************/

using System;
using System.Runtime.Serialization;

namespace MECF.Framework.Common.CommonData;

[Serializable]
[DataContract]
public class ReferencedAssemblyInfo
{
    [DataMember]
    public string Name { get; set; }
    
    [DataMember]
    public Version Version { get; set; }
    
    [DataMember]
    public byte[] PublicKeyToken { get; set; }

    public override string ToString()
    {
        return string.Join(" - ", Name ?? "", Version?.ToString() ?? "", PublicKeyToken == null || PublicKeyToken.Length == 0 ? "null" : BitConverter.ToString(PublicKeyToken));
    }
}