mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-19 01:31:17 -10:00
Adding reference source for System.Activities System.Activities.DurableInstancing System.Activities.Presentation System.Runtime.DurableInstancing System.Workflow.Activities System.Workflow.ComponentModel System.Workflow.Runtime System.WorkflowServices System.Xaml.Hosting XamlBuildTask
37 lines
1.2 KiB
C#
37 lines
1.2 KiB
C#
//-----------------------------------------------------------------------------
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
//-----------------------------------------------------------------------------
|
|
|
|
namespace System.Activities
|
|
{
|
|
using System;
|
|
using System.ComponentModel;
|
|
|
|
static class BookmarkOptionsHelper
|
|
{
|
|
static bool IsDefined(BookmarkOptions options)
|
|
{
|
|
return options == BookmarkOptions.None || ((options & (BookmarkOptions.MultipleResume | BookmarkOptions.NonBlocking)) == options);
|
|
}
|
|
|
|
public static void Validate(BookmarkOptions options, string argumentName)
|
|
{
|
|
if (!IsDefined(options))
|
|
{
|
|
throw FxTrace.Exception.AsError(
|
|
new InvalidEnumArgumentException(argumentName, (int)options, typeof(BookmarkOptions)));
|
|
}
|
|
}
|
|
|
|
public static bool SupportsMultipleResumes(BookmarkOptions options)
|
|
{
|
|
return (options & BookmarkOptions.MultipleResume) == BookmarkOptions.MultipleResume;
|
|
}
|
|
|
|
public static bool IsNonBlocking(BookmarkOptions options)
|
|
{
|
|
return (options & BookmarkOptions.NonBlocking) == BookmarkOptions.NonBlocking;
|
|
}
|
|
}
|
|
}
|