public XboxLiveContext(XboxLiveUser user) { #if WINDOWS_UWP IntPtr xboxLiveContext; var xsapiResult = XboxLiveContextCreate(user.PCXboxLiveUser, out xboxLiveContext); if (xsapiResult != XSAPI_RESULT.XSAPI_RESULT_OK) { throw new XboxException(xsapiResult); } XboxLiveContextPtr = xboxLiveContext; this.TitleStorageService = new TitleStorageService(XboxLiveContextPtr); this.PrivacyService = new PrivacyService(XboxLiveContextPtr); #else // TODO MockServices and/or MockHttp this.TitleStorageService = null; this.PrivacyService = null; #endif }
public XboxLiveServices(XboxLiveUser user) { #if UNITY_EDITOR // TODO Implement mock title storage service for unity editor this.TitleStorageService = null; this.PrivacyService = null; #else IntPtr xboxLiveContext; var xsapiResult = XboxLiveContextCreate(user.PCXboxLiveUser, out xboxLiveContext); if (xsapiResult != XSAPI_RESULT.XSAPI_RESULT_OK) { throw new XboxException(xsapiResult); } XboxLiveContextPtr = xboxLiveContext; this.TitleStorageService = new TitleStorageService(XboxLiveContextPtr); this.PrivacyService = new PrivacyService(XboxLiveContextPtr); #endif }
public override void TestInitialize() { base.TestInitialize(); MockXboxLiveData.Load(Environment.CurrentDirectory + "\\TitleStorage\\TitleStorageUT.json"); this.titleStorageService = new TitleStorageService(); }
public override void TestInitialize() { base.TestInitialize(); this.titleStorageService = new TitleStorageService(IntPtr.Zero); }