Skip to content

Commit

Permalink
fix passing dataResidencyRegion parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
MikhailSuendukov committed Aug 25, 2023
1 parent df6a8ea commit 7cddb81
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions SDK/AppCenter/Microsoft.AppCenter.Shared.Windows/AppCenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ private Task SetInstanceEnabled(bool value)
// Send started services.
if (_startedServiceNames != null && value)
{
var startServiceLog = new StartServiceLog { Services = _startedServiceNames };
var startServiceLog = new StartServiceLog { Services = _startedServiceNames, dataResidencyRegion = PlatformGetDataResidensyRegion() };
_startedServiceNames = null;
return _channel.EnqueueAsync(startServiceLog);
}
Expand Down Expand Up @@ -476,7 +476,7 @@ internal void StartInstance(params Type[] services)
{
if (InstanceEnabled)
{
_channel.EnqueueAsync(new StartServiceLog { Services = serviceNames }).ConfigureAwait(false);
_channel.EnqueueAsync(new StartServiceLog { Services = serviceNames, dataResidencyRegion = PlatformGetDataResidensyRegion() }).ConfigureAwait(false);
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public Log()
/// </param>
/// <param name="dataResidencyRegion">optional string used for specify data residency region.
/// </param>
public Log(Device device, System.DateTime? timestamp = default(System.DateTime?), System.Guid? sid = default(System.Guid?), string userId = default(string), string dataResidencyRegion = null)
public Log(Device device, System.DateTime? timestamp = default(System.DateTime?), System.Guid? sid = default(System.Guid?), string userId = default(string), string dataResidencyRegion = default(string))
{
Timestamp = timestamp;
Sid = sid;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public StartServiceLog()
/// </param>
/// <param name="services">The list of services of the MobileCenter
/// Start API call.</param>
public StartServiceLog(Device device, DateTime? timestamp = default(DateTime?), Guid? sid = default(Guid?), IList<string> services = default(IList<string>))
: base(device, timestamp, sid)
public StartServiceLog(Device device, DateTime? timestamp = default(DateTime?), Guid? sid = default(Guid?), IList<string> services = default(IList<string>), string dataResidencyRegion = default(string))
: base(device, timestamp, sid, null, dataResidencyRegion)
{
Services = services;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ private void InstanceTrackEvent(string name, IDictionary<string, string> propert
if (ValidateName(ref name, type))
{
properties = PropertyValidator.ValidateProperties(properties, $"{type} '{name}'");
var log = new EventLog(null, Guid.NewGuid(), name, null, null, null, properties);
var log = new EventLog(null, Guid.NewGuid(), name, null, null, null, AppCenter.PlatformGetDataResidensyRegion(), properties);
Channel.EnqueueAsync(log);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public EventLog()
/// <param name="properties">Additional key/value pair parameters.
/// </param>
public EventLog(Device device, System.Guid id, string name, System.DateTime? timestamp = default(System.DateTime?), System.Guid? sid = default(System.Guid?), string userId = default(string), string dataResidencyRegion = default(string), IDictionary<string, string> properties = default(IDictionary<string, string>))
: base(device, timestamp, sid, userId, properties, dataResidencyRegion)
: base(device, timestamp, sid, userId, dataResidencyRegion, properties)
{
Id = id;
Name = name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public PageLog()
/// <param name="properties">Additional key/value pair parameters.
/// </param>
public PageLog(Device device, string name, System.DateTime? timestamp = default(System.DateTime?), System.Guid? sid = default(System.Guid?), string userId = default(string), string dataResidencyRegion = default(string), IDictionary<string, string> properties = default(IDictionary<string, string>))
: base(device, timestamp, sid, userId, properties, dataResidencyRegion)
: base(device, timestamp, sid, userId, dataResidencyRegion, properties)
{
Name = name;
CustomInit();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public HandledErrorLog()
/// <param name="id">Unique identifier for this Error.
/// </param>
public HandledErrorLog(Microsoft.AppCenter.Ingestion.Models.Device device, Exception exception, System.DateTime? timestamp = default(System.DateTime?), System.Guid? sid = default(System.Guid?), string userId = default(string), string dataResidencyRegion = default(string), IDictionary<string, string> properties = default(IDictionary<string, string>), System.Guid? id = default(System.Guid?), IList<Binary> binaries = default(IList<Binary>))
: base(device, timestamp, sid, userId, properties, dataResidencyRegion)
: base(device, timestamp, sid, userId, dataResidencyRegion, properties)
{
Id = id;
Binaries = binaries;
Expand Down

0 comments on commit 7cddb81

Please sign in to comment.