示例#1
0
        private XboxLive()
        {
            this.settings = new XboxLiveSettings();

            try
            {
                this.appConfig = XboxLiveAppConfiguration.Instance;
            }
            catch (FileLoadException)
            {
                this.appConfig = null;
            }

#if NETFX_CORE
            string fileName = @"\Microsoft.Xbox.Services.140.UWP.C.dll";
            try
            {
                string path = Directory.GetCurrentDirectory() + fileName;
                xsapiNativeDll = LoadNativeDll(path);

                var intializationResult = this.Invoke <XsapiResult, XBLGlobalInitialize>();
                // TODO handle this better
            }
            catch (Exception)
            {
                throw new XboxException("Failed to load " + fileName);
            }
#endif
        }
示例#2
0
        private XboxLive()
        {
            this.settings = new XboxLiveSettings();

            try
            {
                this.appConfig = XboxLiveAppConfiguration.Instance;
            }
            catch (FileLoadException)
            {
                this.appConfig = null;
            }
        }
示例#3
0
        private XboxLive()
        {
            try
            {
#if WINDOWS_UWP
                var result = XsapiGlobalInitialize();
                if (result != XSAPI_RESULT.XSAPI_RESULT_OK)
                {
                    throw new XboxException(result);
                }
#endif
                // TODO flat C APIs for settings
                //this.Settings = null;
                this.appConfig = XboxLiveAppConfiguration.SingletonInstance;
            }
            catch (FileLoadException)
            {
                this.appConfig = null;
            }
        }
        private XboxLive()
        {
            this.settings = new XboxLiveSettings();

            try
            {
                this.appConfig = XboxLiveAppConfiguration.Instance;
            }
            catch (FileLoadException)
            {
                this.appConfig = null;
            }

#if WINDOWS_UWP
            var result = XBLGlobalInitialize();
            if (result != XSAPI_RESULT.XSAPI_RESULT_OK)
            {
                throw new XboxException(result);
            }
#endif
        }
示例#5
0
 private static XboxLiveAppConfiguration Load()
 {
     return(XboxLiveAppConfiguration.Load(FileName));
 }
示例#6
0
 internal static string GetEndpointForService(string serviceName, XboxLiveAppConfiguration config, string protocol = "https")
 {
     return(String.Format("{0}://{1}{2}.xboxlive.com", protocol, serviceName, config.Environment));
 }