Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added TaskGroup property support to BackgroundTaskBuilder API #4994

Merged
merged 1 commit into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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; };
godlytalias marked this conversation as resolved.
Show resolved Hide resolved

[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; };
godlytalias marked this conversation as resolved.
Show resolved Hide resolved

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