C# 클래스 Shaml.Core.DomainModel.BaseObject

파일 보기 프로젝트 열기: sztupy/shaml 1 사용 예제들

공개 메소드들

메소드 설명
Equals ( object obj ) : bool
GetHashCode ( ) : int

This is used to provide the hashcode identifier of an object using the signature properties of the object; although it's necessary for NHibernate's use, this can also be useful for business logic purposes and has been included in this base class, accordingly. Since it is recommended that GetHashCode change infrequently, if at all, in an object's lifetime, it's important that properties are carefully selected which truly represent the signature of an object.

GetSignatureProperties ( ) : IEnumerable

HasSameObjectSignatureAs ( BaseObject compareTo ) : bool

You may override this method to provide your own comparison routine.

보호된 메소드들

메소드 설명
GetTypeSpecificSignatureProperties ( ) : IEnumerable

Enforces the template method pattern to have child objects determine which specific properties should and should not be included in the object signature comparison. Note that the the BaseObject already takes care of performance caching, so this method shouldn't worry about caching...just return the goods man!

GetTypeUnproxied ( ) : Type

When NHibernate proxies objects, it masks the type of the actual entity object. This wrapper burrows into the proxied object to get its actual type. Although this assumes NHibernate is being used, it doesn't require any NHibernate related dependencies and has no bad side effects if NHibernate isn't being used. Related discussion is at http://groups.google.com/group/sharp-architecture/browse_thread/thread/ddd05f9baede023a ...thanks Jay Oliver!

메소드 상세

Equals() 공개 메소드

public Equals ( object obj ) : bool
obj object
리턴 bool

GetHashCode() 공개 메소드

This is used to provide the hashcode identifier of an object using the signature properties of the object; although it's necessary for NHibernate's use, this can also be useful for business logic purposes and has been included in this base class, accordingly. Since it is recommended that GetHashCode change infrequently, if at all, in an object's lifetime, it's important that properties are carefully selected which truly represent the signature of an object.
public GetHashCode ( ) : int
리턴 int

GetSignatureProperties() 공개 메소드

public GetSignatureProperties ( ) : IEnumerable
리턴 IEnumerable

GetTypeSpecificSignatureProperties() 보호된 추상적인 메소드

Enforces the template method pattern to have child objects determine which specific properties should and should not be included in the object signature comparison. Note that the the BaseObject already takes care of performance caching, so this method shouldn't worry about caching...just return the goods man!
protected abstract GetTypeSpecificSignatureProperties ( ) : IEnumerable
리턴 IEnumerable

GetTypeUnproxied() 보호된 메소드

When NHibernate proxies objects, it masks the type of the actual entity object. This wrapper burrows into the proxied object to get its actual type. Although this assumes NHibernate is being used, it doesn't require any NHibernate related dependencies and has no bad side effects if NHibernate isn't being used. Related discussion is at http://groups.google.com/group/sharp-architecture/browse_thread/thread/ddd05f9baede023a ...thanks Jay Oliver!
protected GetTypeUnproxied ( ) : Type
리턴 System.Type

HasSameObjectSignatureAs() 공개 메소드

You may override this method to provide your own comparison routine.
public HasSameObjectSignatureAs ( BaseObject compareTo ) : bool
compareTo BaseObject
리턴 bool