本文整理汇总了C#中ApplicationManager类的典型用法代码示例。如果您正苦于以下问题:C# ApplicationManager类的具体用法?C# ApplicationManager怎么用?C# ApplicationManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ApplicationManager类属于命名空间,在下文中一共展示了ApplicationManager类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: HomeControllerTest
public HomeControllerTest()
{
profileRepository = new EFProfileRepository();
apartmentRepository = new EFApartmentsRepository();
applicationManager = new ApplicationManager(new UserStore<ApplicationUser>(new ApplicationDbContext()));
}
开发者ID:Shiloff,项目名称:Terem,代码行数:7,代码来源:HomeControllerTest.cs
示例2: Initialize
private void Initialize()
{
// wait for loading..
//gameObject.GetComponent<Rigidbody>().constraints = RigidbodyConstraints.FreezeAll;
var thirdPersonControll = gameObject.GetComponent<ThirdPersonController>();
_initialGravity = thirdPersonControll.gravity;
thirdPersonControll.gravity = 0;
_appManager = ApplicationManager.Instance;
_messageBus = _appManager.GetService<IMessageBus>();
_appManager.CreateConsole(true);
_messageBus.AsObservable<GameRunner.GameStartedMessage>()
.Where(msg => msg.Tile.RenderMode == RenderMode.Scene)
.Take(1)
.Delay(TimeSpan.FromSeconds(2)) // give extra seconds..
.ObserveOnMainThread()
.Subscribe(_ =>
{
var position = transform.position;
var elevation = _appManager.GetService<IElevationProvider>()
.GetElevation(new MapPoint(position.x, position.z));
transform.position = new Vector3(position.x, elevation + 90, position.z);
thirdPersonControll.gravity = _initialGravity;
});
// ASM should be started from non-UI thread
Observable.Start(() => _appManager.RunGame(), Scheduler.ThreadPool);
}
开发者ID:jorik041,项目名称:demo,代码行数:31,代码来源:ActionStreetMapBehaviour.cs
示例3: Start
void Start()
{
// Caching
userDatamanager = UserDataManager.ins;
if (userDatamanager == null)
{
Debug.LogError("No UserDataManager?!");
}
applicationManager = ApplicationManager.ins;
if (applicationManager == null)
{
Debug.LogError("No ApplicationManager?!");
}
courseManager = CourseManager.ins;
if (courseManager == null)
{
Debug.LogError("No CourseManager?!");
}
modalPanel = ModalPanel.ins;
if (modalPanel == null)
{
Debug.LogError("No ModalPanel?!");
}
courseCompletedOKEvent = new UnityAction(_CourseCompleted);
courseViewCompletedOKEvent = new UnityAction(_CourseViewContinue);
courseViewCompletedCancelEvent = new UnityAction(_CourseViewStay);
audioManager = ASAudioManager.ins;
if (audioManager == null)
{
Debug.LogError("No ASAudioManager?!");
}
}
开发者ID:NotYours180,项目名称:Codium,代码行数:33,代码来源:AchievementManager.cs
示例4: OnAppearing
protected override async void OnAppearing()
{
if (applicationManager == null)
{
applicationManager = new ApplicationManager(DependencyService.Get<ITransportResource>(), DependencyService.Get<IDtoSerializer>(), DependencyService.Get<IStorage>(), DependencyService.Get<IDeviceInfo>());
applicationManager.ConnectionManager.ConnectionDropped += () => Navigation.PushAsync(new SplashscreenPage());
}
AuthenticationResponseType autenticacao;
try
{
autenticacao = await applicationManager.AccountManager.ValidateAccount();
}
catch (System.Exception)
{
await DisplayAlert("Aviso!", "Serviço não disponível no momento. Tente novamente mais tarde", "Ok", null);
return;
}
//Se já está autenticado, abre tela principal, senão, envia para tela de login.
if (autenticacao == AuthenticationResponseType.Success)
await Navigation.PushAsync(new HomePage(new HomeViewModel(applicationManager)));
else
await Navigation.PushAsync(new LoginPage(new LoginViewModel(applicationManager)));
base.OnAppearing();
}
开发者ID:alancaetano,项目名称:AgendaOnline,代码行数:27,代码来源:SplashscreenPage.cs
示例5: Awake
/// <summary> Performs framework initialization once, before any Start() is called. </summary>
void Awake()
{
AppManager = ApplicationManager.Instance;
AppManager.InitializeFramework(GetConfigBuilder(), GetBootInitAction());
SetStartGeoCoordinate();
}
开发者ID:yuta0023,项目名称:demo,代码行数:8,代码来源:ActionStreetMapBehaviour.cs
示例6: Start
void Start()
{
if (title == null)
{
Debug.LogError("No title object referenced");
}
if (desc == null)
{
Debug.LogError("No desc object referenced");
}
if (category == null)
{
Debug.LogError("No category object referenced");
}
if (difficulty == null)
{
Debug.LogError("No difficulty object referenced");
}
courseManager = CourseManager.ins;
if (courseManager == null)
{
Debug.LogError("No courseManager?");
}
applicationManager = ApplicationManager.ins;
if (applicationManager == null)
{
Debug.LogError("Panic... No applicaitonManager found.");
}
}
开发者ID:perfectplug,项目名称:Codium,代码行数:30,代码来源:CourseDisplay.cs
示例7: Start
void Start()
{
applicationManager = ApplicationManager.ins;
if (applicationManager == null)
{
Debug.LogError("No ApplicationManager found!");
}
}
开发者ID:NotYours180,项目名称:Codium,代码行数:8,代码来源:AppBarManager.cs
示例8: RegistrationViewModel
public RegistrationViewModel(ApplicationManager appManager)
{
_appManager = appManager;
_countriesRepository = new CountriesRepository();
SelectedCountry = Countries.First();
SelectedSex = Sexes.First();
SelectedAge = Ages.First();
}
开发者ID:alancaetano,项目名称:AgendaOnline,代码行数:9,代码来源:RegistrationViewModel.cs
示例9: FormService
/// <summary>
/// Initializes a new instance of the <see cref="FormService"/> class.
/// </summary>
public FormService()
{
this.applicationManager = Global.DependencyInjectionContainer.Resolve<ApplicationManager>();
this.organisationManager = Global.DependencyInjectionContainer.Resolve<OrganisationManager>();
this.securityGateway = Global.DependencyInjectionContainer.Resolve<ISecurityService>();
if (Global.DependencyInjectionContainer.IsRegistered<IApplicationManagerEventHandler>())
{
Global.DependencyInjectionContainer.Resolve<IApplicationManagerEventHandler>()
.Register(this.applicationManager);
}
}
开发者ID:cgavieta,项目名称:WORKPAC2016-poc,代码行数:14,代码来源:FormService.asmx.cs
示例10: Start
void Start()
{
CameraScene.enabled = true;
_appManager = ApplicationManager.Instance;
OverviewButton.gameObject.SetActive(true);
SceneButton.gameObject.SetActive(false);
OverviewButton.onClick.AsObservable().Subscribe(_ => SwitchSceneMode(true));
SceneButton.onClick.AsObservable().Subscribe(_ => SwitchSceneMode(false));
}
开发者ID:jorik041,项目名称:demo,代码行数:11,代码来源:ViewModeController.cs
示例11: TestInitialize
public void TestInitialize()
{
JsonConvert.DefaultSettings = () => new JsonSerializerSettings
{
Formatting = Formatting.None,
Converters = new JsonConverter[] { new JsonKnownTypeConverter() }
};
var container = new UnityContainer().LoadConfiguration();
container.RegisterInstance<ISymmetricCrypto>(new RijndaelSymmetricCrypto("password", "rgb init vector.", 8, 8, 256, "verysalty", 3));
this.ApplicationManager = container.Resolve<ApplicationManager>();
}
开发者ID:cgavieta,项目名称:WORKPAC2016-poc,代码行数:12,代码来源:ApplicationManagerTests.cs
示例12: ApplicationForm
public ApplicationForm(
ApplicationManager applicationManager,
AppFormContainer mainForm,
System.Windows.Forms.MenuStrip menuStrip
)
{
m_appFormContainer = mainForm;
m_applicationMainForm = new ApplicationMainForm(this, mainForm);
string ext = applicationManager.APP_DATA.SETTINGS.getProjectFileExtension();
m_projectMenuStrip = new ProjectMenuStrip(this, mainForm, menuStrip, ext);
m_progressBar = new Forms.ProgressBarDialog();
m_applicationManager = applicationManager;
}
开发者ID:dgx80,项目名称:csharp-app-lib,代码行数:13,代码来源:ApplicationForm.cs
示例13: EnsureDependencies
public void EnsureDependencies()
{
EnsureConfigurationFilesAreAvailableDuringTest();
AppManager = new ApplicationManager();
AppInit = new ApplicationInitializer();
Dirs = DirHandler.Instance;
Dirs.CurrentDirectory = Environment.CurrentDirectory;
ProxisHome = ProxyHome.Instance;
ProxisHome.StatisticsProxy = AppInit.InitializeStatisticsComponent(AppManager);
}
开发者ID:ClaesRyom,项目名称:CodeAnalyzer,代码行数:13,代码来源:ConfigurationProxyTests.cs
示例14: Index
// GET: Default
public async Task<ActionResult> Index()
{
if (User.Identity.IsAuthenticated)
{
using (ApplicationDBContext db = new ApplicationDBContext())
{
var UM = new ApplicationManager(new UserStore<ApplicationUser>(db));
var user = await UM.FindByNameAsync(User.Identity.Name);
ViewBag.Age = user?.Year;
ViewBag.Sex = user?.Sex;
}
}
return View();
}
开发者ID:Winbringer,项目名称:CSharpBlog,代码行数:15,代码来源:DefaultController.cs
示例15: Main
static void Main(string[] args)
{
//-- An alternative method for catching unhandled exceptions (also rather flakey)..
//AppDomain.CurrentDomain.UnhandledException += new System.UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
//Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Control.CheckForIllegalCrossThreadCalls = true;
Application.DoEvents();
ApplicationManager applicationManager = new ApplicationManager();
applicationManager.Run(args);
}
开发者ID:bberak,项目名称:PokerDotNet,代码行数:14,代码来源:Program.cs
示例16: Main
static void Main(string[] args)
{
var settings = new ApplicationManagerSettings
{
AppDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Versions"),
ApplicationName = "DemoApp",
CompanyName = "Griffin",
PickupPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Pickup")
};
var appManager = new ApplicationManager<MyApplicationInit>(settings);
appManager.Start();
Console.ReadLine();
appManager.Stop();
}
开发者ID:GitItInTheHub,项目名称:Griffin.Framework,代码行数:16,代码来源:Program.cs
示例17: AppSettingsProvider
public AppSettingsProvider(string keySet)
{
if (string.IsNullOrEmpty(keySet))
throw new ArgumentException("Missing KeySet", "keySet");
this.keySet = keySet;
appSettingsMan = new AppSettingsManager2();
appCache = new ApplicationManager<string>(APPCACHE_PREFIX + this.KeySet);
fakeModule = new PigeonCms.Module();
fakeModule.UseLog = Utility.TristateBool.True;
fakeModule.ModuleNamespace = "PigeonCms.Core";
fakeModule.ModuleName = "AppSettingsProvider";
}
开发者ID:liqueflies,项目名称:pigeoncms,代码行数:16,代码来源:AppSettingsProvider.cs
示例18: Initialize_with_command_arg_should_return_null
public void Initialize_with_command_arg_should_return_null()
{
/* Arrange */
var mocks = new TestAssistant().MockAll();
var mgr = new ApplicationManager(mocks.ActionsManager);
A.CallTo(() => mocks.ActionsManager.ExecuteCommandLine(A<string[]>.Ignored)).Returns(true);
/* Act */
var a = mgr.Initialize(mocks.Container, new string[] { "MustHaveAtleastOneArg" });
/* Assert */
a.Should().BeNull();
A.CallTo(() => mocks.ActionsManager.BuildActions(A<IEnumerable<IProvideActions>>.Ignored)).MustNotHaveHappened();
A.CallTo(() => mocks.ActionsManager.ExecuteCommandLine(A<string[]>.Ignored)).MustHaveHappened(Repeated.Exactly.Once);
}
开发者ID:Geminior,项目名称:DeepConfig,代码行数:17,代码来源:ApplicationManagerTests.cs
示例19: Start
void Start()
{
achievementManager = AchievementManager.ins;
if (achievementManager == null)
{
Debug.LogError("No AchievementManager found!");
}
applicationManager = ApplicationManager.ins;
if (applicationManager == null)
{
Debug.LogError("No ApplicationManager found!");
}
if (Application.loadedLevelName == "CourseView")
{
SetupCourseView();
}
}
开发者ID:NotYours180,项目名称:Codium,代码行数:19,代码来源:CourseManager.cs
示例20: Initialize_with_file_arg_should_go_to_request_display_of_config
public void Initialize_with_file_arg_should_go_to_request_display_of_config()
{
/* Arrange */
var mocks = new TestAssistant().MockAll();
var mgr = new ApplicationManager(mocks.ActionsManager);
ConfigRequest msg = null;
A.CallTo(() => mocks.Messenger.Publish(A<object>.Ignored)).Invokes(c => msg = c.Arguments[0] as ConfigRequest);
/* Act */
var a = mgr.Initialize(mocks.Container, new string[] { "SomeFileName" });
a();
/* Assert */
msg.Should().NotBeNull();
msg.RequestedAction.Should().Be(ConfigRequest.Action.Open);
msg.Source.Provider.As<FileConfigProvider>().ConfigFileName.Should().Be("SomeFileName");
A.CallTo(() => mocks.ActionsManager.BuildActions(A<IEnumerable<IProvideActions>>.Ignored)).MustHaveHappened(Repeated.Exactly.Once);
A.CallTo(() => mocks.ActionsManager.ExecuteCommandLine(A<string[]>.Ignored)).MustHaveHappened(Repeated.Exactly.Once);
}
开发者ID:Geminior,项目名称:DeepConfig,代码行数:22,代码来源:ApplicationManagerTests.cs
注:本文中的ApplicationManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论