public override void Initialize() { MXContainer.RegisterSingleton <IThread>(new TaskThread { UiSynchronizationContext = System.Threading.SynchronizationContext.Current, }); MXContainer.RegisterSingleton <IResources>(typeof(WindowsResources)); MXContainer.RegisterSingleton <IEncryption>(typeof(AesEncryption)); MXContainer.RegisterSingleton <ImageComposition.ICompositor>(typeof(ImageComposition.GdiPlusCompositor)); NetworkPostMethod = NetworkPostMethod.ImmediateSynchronous; var session = new WebSessionDictionary(); foreach (var kvp in Session) { session.Add(kvp); } Session = session; }
public override void Initialize() { DirectorySeparatorChar = Path.DirectorySeparatorChar; MXContainer.RegisterSingleton <IThread>(typeof(TaskThread)); MXContainer.RegisterSingleton <IFile>(typeof(BasicFile)); MXContainer.RegisterSingleton <IEncryption>(typeof(AesEncryption)); MXContainer.RegisterSingleton <IReflector>(typeof(BasicReflector)); MXContainer.RegisterSingleton <IResources>(typeof(WindowsResources)); MXContainer.RegisterSingleton <ILog>(typeof(BasicLogger), () => new BasicLogger(Path.Combine(DataPath, "Log"))); MXContainer.RegisterSingleton <ImageComposition.ICompositor>(typeof(ImageComposition.GdiPlusCompositor)); NetworkPostMethod = NetworkPostMethod.ImmediateSynchronous; var session = new WebSessionDictionary(); foreach (var kvp in Session) { session.Add(kvp); } Session = session; }