C# 클래스 SharpArch.Domain.DomainModel.BaseObject

파일 보기 프로젝트 열기: sharparchitecture/Sharp-Architecture 1 사용 예제들

공개 메소드들

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

Determines whether the specified System.Object is equal to this instance.

GetHashCode ( ) : int

Returns a hash code for this instance.

This is used to provide the hash code 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 ( ) : System.Reflection.PropertyInfo[]

Returns the properties of the current object that make up the object's signature.

HasSameObjectSignatureAs ( BaseObject compareTo ) : bool

Determines whether the current object has the same object signature as the specified object.

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

보호된 메소드들

메소드 설명
GetTypeUnproxied ( ) : Type

Returns the unproxied type of the current object.

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!

비공개 메소드들

메소드 설명
GetOrAdd ( Type type ) : TypePropertyDescriptor
GetTypeSpecificSignatureProperties ( ) : System.Reflection.PropertyInfo[]

메소드 상세

Equals() 공개 메소드

Determines whether the specified System.Object is equal to this instance.
public Equals ( object obj ) : bool
obj object The to compare with the current .
리턴 bool

GetHashCode() 공개 메소드

Returns a hash code for this instance.
This is used to provide the hash code 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() 공개 메소드

Returns the properties of the current object that make up the object's signature.
public GetSignatureProperties ( ) : System.Reflection.PropertyInfo[]
리턴 System.Reflection.PropertyInfo[]

GetTypeUnproxied() 보호된 메소드

Returns the unproxied type of the current object.

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() 공개 메소드

Determines whether the current object has the same object signature as the specified object.
You may override this method to provide your own comparison routine.
public HasSameObjectSignatureAs ( BaseObject compareTo ) : bool
compareTo BaseObject The object to compare to.
리턴 bool