えムナウ Blog

えムナウ の なすがまま

目次

Blog 利用状況

ニュース


follow mnow at http://twitter.com


えムナウのプログラミングのページ

INETAJ

書庫

日記カテゴリ

ギャラリ

MvvmCross について 6

MvvmCross のクラスのは Mvx というプレフィックスが付いているのが一般的です。
ということは Mvx クラスは MvvmCross のなかでも特別なクラスという意味に見えます。
クラス生成・IoCコンテナサポート・トレースサポート・例外クラス生成を行っています。

名前空間 Cirrious.CrossCore
public static class Mvx

クラス図

image

 

クラス生成
public static T IocConstruct<T>()
public static object IocConstruct(Type t)

IoC コンテナ
public static void RegisterSingleton(Func serviceConstructor)
public static void RegisterSingleton(Type tInterface, Func serviceConstructor)
public static void RegisterSingleton(Type tInterface, object service)
public static void ConstructAndRegisterSingleton()
public static void LazyConstructAndRegisterSingleton()
public static void LazyConstructAndRegisterSingleton(Func constructor)
public static void LazyConstructAndRegisterSingleton(Type type, Func constructor)
public static void RegisterType()
public static void RegisterType(Func constructor)
public static void RegisterType(Type type, Func constructor)
public static void RegisterType(Type tInterface, Type tType)
public static bool CanResolve<TService>()
public static bool CanResolve(Type serviceType)
public static TService Resolve<TService>()
public static object Resolve(Type serviceType)
public static bool TryResolve<TService>(out TService service)
public static bool TryResolve(Type serviceType, out object service)
public static T Create<T>()
public static T GetSingleton<T>()

IoCコンテナ登録時実行
public static void CallbackWhenRegistered<T>(Action<T> action)
public static void CallbackWhenRegistered<T>(Action action)
public static void CallbackWhenRegistered(Type type, Action action)

トレース
public static void TaggedTrace(MvxTraceLevel level, string tag, string message, params object[] args)
public static void TaggedTrace(string tag, string message, params object[] args)
public static void TaggedWarning(string tag, string message, params object[] args)
public static void TaggedError(string tag, string message, params object[] args)
public static void Trace(MvxTraceLevel level, string message, params object[] args)
public static void Trace(string message, params object[] args)
public static void Warning(string message, params object[] args)
public static void Error(string message, params object[] args)

例外クラス生成
public static MvxException Exception(string message)
public static MvxException Exception(string message, params object[] args)
public static MvxException Exception(Exception innerException, string message, params object[] args)

投稿日時 : 2015年5月6日 22:59

コメントを追加

No comments posted yet.
タイトル  
名前  
URL
コメント