1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
-
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace JBIM
- {
-
-
-
-
- public class BimId
- {
- public BimId(string id)
- {
- this.Id = id;
- }
-
-
-
- public string Id { get; private set; }
- public override string ToString()
- {
- return Id?.ToString() ?? string.Empty;
- }
- public override bool Equals(object obj)
- {
- if (obj is BimId inputId)
- {
- return Id == inputId.Id;
- }
- return false;
- }
- public override int GetHashCode()
- {
- if (string.IsNullOrWhiteSpace(Id))
- {
- return 0;
- }
- return Id.GetHashCode();
- }
- public static bool operator ==(BimId a, BimId b)
- {
- if ((object)a == null)
- {
- return (object)b == null;
- }
- return a.Equals(b);
- }
- public static bool operator !=(BimId a, BimId b)
- {
- if ((object)a == null)
- {
- return ((object)b != null);
- }
- return !a.Equals(b);
- }
- }
- }
|