/* * Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET) * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ namespace SafeExamBrowser.Applications.Contracts { /// /// Defines an identifier which uniquely identifies an instance in the context of an application. /// public abstract class InstanceIdentifier { /// /// Determines whether two identifiers are equal (i.e. whether they identify the same application instance). /// public static bool operator ==(InstanceIdentifier a, InstanceIdentifier b) => Equals(a, b); /// /// Determines whether two identifiers are different (i.e. whether they identify different application instances). /// public static bool operator !=(InstanceIdentifier a, InstanceIdentifier b) => !Equals(a, b); /// /// Indicates whether the given object is an identifier for the same application instance. /// public abstract override bool Equals(object other); /// /// Returns a hash code for the identifier. /// public abstract override int GetHashCode(); /// /// Returns a human-readable string representation of the identifier. /// public abstract override string ToString(); } }