10.07.2015 Views

pdf - 395 K - Ecole des mines de Nantes

pdf - 395 K - Ecole des mines de Nantes

pdf - 395 K - Ecole des mines de Nantes

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

}if (!(obj is UserId)) return false;UserId peer = (UserId) obj;return peer.IPAddress == this.IPAddress;public overri<strong>de</strong> int GetHashCo<strong>de</strong>(){return _ip.GetHashCo<strong>de</strong>();}public overri<strong>de</strong> string ToString(){return "[User IP:" + IPAddress + "]";}}}using System;14. Class Architecture.ResourceIdnamespace Architecture{/// /// Defines an i<strong>de</strong>ntifier for a resource in a repository./// [Serializable]public class ResourceId{// Simply the full unique name of the resourceprivate string _resourceName;public ResourceId(string resourceName){_resourceName = resourceName;}public string Name{get{return _resourceName;}}public overri<strong>de</strong> bool Equals(object obj){if (!(obj is ResourceId)) return false;ResourceId peer = (ResourceId) obj;return peer.Name == this.Name;}public overri<strong>de</strong> int GetHashCo<strong>de</strong>(){return _resourceName.GetHashCo<strong>de</strong>();}/// /// Returns the name of the service consisting in managing thecorrespondingMSc EMOOSE Thesis – http://www.emn.fr/EMOOSE 96

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!