C# Class Pomona.Common.Internals.ClientTypeResolverExtensions

Mostra file Open project: Pomona/Pomona

Public Methods

Method Description
GetMostInheritedResourceInterface ( this client, Type sourceType ) : Type

This function gets the most subtyped server-known interface implemented by given type. For example lets take a type hierarchy where we got entities IBase and IEntity, where IEntity inherits from IBase. Then we got some other type like ICustomCrazyType that inherits from IEntity. When given this type this function will return IEntity type.

GetResourceInfoForType ( this client, Type type ) : ResourceInfoAttribute

Private Methods

Method Description
GetMostInheritedResourceInterfaceInfo ( this client, Type sourceType ) : ResourceInfoAttribute

Method Details

GetMostInheritedResourceInterface() public static method

This function gets the most subtyped server-known interface implemented by given type. For example lets take a type hierarchy where we got entities IBase and IEntity, where IEntity inherits from IBase. Then we got some other type like ICustomCrazyType that inherits from IEntity. When given this type this function will return IEntity type.
public static GetMostInheritedResourceInterface ( this client, Type sourceType ) : Type
client this Client responsible for resolving type. TODO: Might put this in its own interface.
sourceType System.Type Type to find resource interface on.
return System.Type

GetResourceInfoForType() public static method

public static GetResourceInfoForType ( this client, Type type ) : ResourceInfoAttribute
client this
type System.Type
return ResourceInfoAttribute