Exemple #1
0
        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;
        }
Exemple #2
0
        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;
        }