mirror of
https://github.com/ZuneDev/ZuneShell.dll.git
synced 2026-07-27 13:11:51 -07:00
Minor CommunityCommerce fixes
This commit is contained in:
@@ -23,7 +23,7 @@ namespace Microsoft.Zune.Service
|
||||
}
|
||||
}
|
||||
|
||||
public static CultureInfo Culture { get; private set; }
|
||||
public static CultureInfo Culture { get; private set; } = CultureInfo.CurrentCulture;
|
||||
|
||||
public static bool IsSignedIn => Escargot.HasToken && MemberInfo != null;
|
||||
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
#if OPENZUNE
|
||||
|
||||
using System.IO;
|
||||
using System.Net.Http;
|
||||
using System.Xml.Serialization;
|
||||
using Zune.Xml.Commerce;
|
||||
using ZuneUI;
|
||||
|
||||
namespace Microsoft.Zune.Service
|
||||
@@ -19,8 +16,9 @@ namespace Microsoft.Zune.Service
|
||||
|
||||
try
|
||||
{
|
||||
HttpRequestMessage request = new(HttpMethod.Post, "https://commerce.zunes.me/v5.0/en-US/account/signin");
|
||||
request.Headers.UserAgent.ParseAdd("Zune/5.0");
|
||||
string url = Service2.Instance.GetEndPointUri(EServiceEndpointId.SEID_Commerce) + $"/account/signin";
|
||||
HttpRequestMessage request = new(HttpMethod.Post, url);
|
||||
request.Headers.UserAgent.ParseAdd(CommunityService.AppUserAgent);
|
||||
|
||||
var contentStream = GetSignInRequestBody();
|
||||
request.Content = new StreamContent(contentStream);
|
||||
|
||||
@@ -12,6 +12,9 @@ namespace Microsoft.Zune.Service
|
||||
{
|
||||
private bool disposedValue;
|
||||
|
||||
public static string AppUserAgent { get; set; }
|
||||
public static string ApiVerionStr { get; set; }
|
||||
|
||||
public EListType ContentTypeToListType(EContentType contentType)
|
||||
{
|
||||
switch (contentType)
|
||||
@@ -411,7 +414,16 @@ namespace Microsoft.Zune.Service
|
||||
public bool LaunchBrowserForExternalUrl(string strUrl, EPassportPolicyId ePassportPolicy)
|
||||
=> Service.Instance.LaunchBrowserForExternalUrl(strUrl, ePassportPolicy);
|
||||
|
||||
public int Phase3Initialize() => Service.Instance.Phase3Initialize();
|
||||
public int Phase3Initialize()
|
||||
{
|
||||
var name = System.Reflection.Assembly.GetEntryAssembly()?.GetName();
|
||||
if (ApiVerionStr == null)
|
||||
ApiVerionStr = name?.Version?.ToString(2);
|
||||
if (AppUserAgent == null)
|
||||
AppUserAgent = $"{name?.Name}/{ApiVerionStr}";
|
||||
|
||||
return Service.Instance.Phase3Initialize();
|
||||
}
|
||||
|
||||
public bool PostAppReview(Guid mediaId, string title, string comment, int rating, AsyncCompleteHandler callback)
|
||||
=> Service.Instance.PostAppReview(mediaId, title, comment, rating, callback);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Platform Condition=" '$(Platform)' == '' ">x64</Platform>
|
||||
<OutputType>Library</OutputType>
|
||||
<AssemblyName>ZuneImpl</AssemblyName>
|
||||
<ApplicationVersion>4.7.0.0</ApplicationVersion>
|
||||
<ApplicationVersion>4.8.0.0</ApplicationVersion>
|
||||
|
||||
<TargetFrameworks>net35;net40;net6.0</TargetFrameworks>
|
||||
<Platforms>x64;x86</Platforms>
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace Microsoft.Zune.Shell
|
||||
else
|
||||
{
|
||||
SingletonModelItem<WindowSnapSimulator>.Instance.Phase3Init();
|
||||
Service.Phase3Initialize();
|
||||
Service2.Phase3Initialize();
|
||||
SignIn.Instance.Phase3Init();
|
||||
MetadataNotifications.Instance.Phase2Init();
|
||||
SingletonModelItem<UIDeviceList>.Instance.Phase2Init();
|
||||
|
||||
Reference in New Issue
Block a user