33 lines
846 B
C#
33 lines
846 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace LibXom.Data
|
|
{
|
|
public class XomFileComponent
|
|
{
|
|
private Guid guid = Guid.NewGuid();
|
|
internal XomFile fileBelongs;
|
|
public virtual int Id { get; }
|
|
public string Uuid
|
|
{
|
|
get
|
|
{
|
|
return guid.ToString();
|
|
}
|
|
}
|
|
public override int GetHashCode()
|
|
{
|
|
return this.Uuid.GetHashCode();
|
|
}
|
|
public override bool Equals(object? obj)
|
|
{
|
|
if (obj is not XomFileComponent) return false;
|
|
XomFileComponent xComponent = (obj as XomFileComponent);
|
|
return this.Uuid.Equals(xComponent.Uuid, StringComparison.InvariantCultureIgnoreCase);
|
|
}
|
|
}
|
|
}
|