Skip to content

Commit

Permalink
Added TaskGroup property support to BackgroundTaskBuilder API (#4994)
Browse files Browse the repository at this point in the history
Signed-off-by: godlytalias <godlytalias@yahoo.co.in>
  • Loading branch information
godlytalias authored Dec 26, 2024
1 parent c34390b commit b0fdb05
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
10 changes: 10 additions & 0 deletions dev/BackgroundTask/BackgroundTaskBuilder/BackgroundTaskBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ namespace winrt::Microsoft::Windows::ApplicationModel::Background::implementatio
m_name = name;
}

void BackgroundTaskBuilder::TaskGroup(winrt::BackgroundTaskRegistrationGroup TaskGroup)
{
m_builder.TaskGroup(TaskGroup);
}

winrt::BackgroundTaskRegistrationGroup BackgroundTaskBuilder::TaskGroup()
{
return m_builder.TaskGroup();
}

void BackgroundTaskBuilder::SetTrigger(winrt::IBackgroundTrigger trigger)
{
m_builder.SetTrigger(trigger);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ namespace winrt::Microsoft::Windows::ApplicationModel::Background::implementatio
void Name(winrt::hstring Name);
winrt::hstring Name() { return m_name; }

void TaskGroup(winrt::Windows::ApplicationModel::Background::BackgroundTaskRegistrationGroup TaskGroup);
winrt::Windows::ApplicationModel::Background::BackgroundTaskRegistrationGroup TaskGroup();

winrt::Windows::ApplicationModel::Background::BackgroundTaskRegistration Register();
winrt::Windows::ApplicationModel::Background::BackgroundTaskRegistration Register(winrt::hstring taskName);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ namespace Microsoft.Windows.ApplicationModel.Background
);

String Name{ set; get; };
Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup TaskGroup{ set; get; };

[return_name("task")]
Windows.ApplicationModel.Background.BackgroundTaskRegistration Register();
Expand Down
1 change: 1 addition & 0 deletions specs/BackgroundTask/BackgroundTaskBuilder.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ namespace Microsoft.Windows.ApplicationModel.Background
);

String Name{ set; get; };
Windows.ApplicationModel.Background.BackgroundTaskRegistrationGroup TaskGroup { set; get; };

Windows.ApplicationModel.Background.BackgroundTaskRegistration Register(
);
Expand Down

0 comments on commit b0fdb05

Please sign in to comment.