Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using CMSS.Domain.ServiceFolderManagement;
- namespace CMSS.Application.StateMachine.Base
- {
- public class TransitionServiceFolderPair
- {
- public TransitionServiceFolderPair(ServiceFolderStatus source, ServiceFolderStatus target, bool changeRequest = false)
- {
- Source = source;
- Target = target;
- ChangeRequest = changeRequest;
- }
- public ServiceFolderStatus Source { get; }
- public ServiceFolderStatus Target { get; }
- public bool ChangeRequest { get; }
- protected bool Equals(TransitionServiceFolderPair other)
- {
- return Source == other.Source && Target == other.Target && ChangeRequest == other.ChangeRequest;
- }
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- if (ReferenceEquals(this, obj)) return true;
- if (obj.GetType() != this.GetType()) return false;
- return Equals((TransitionServiceFolderPair)obj);
- }
- public override int GetHashCode()
- {
- unchecked
- {
- var hashCode = (int)Source;
- hashCode = (hashCode * 397) ^ (int)Target;
- hashCode = (hashCode * 397) ^ ChangeRequest.GetHashCode();
- return hashCode;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement