You've already forked linux-packaging-mono
Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
parent
a569aebcfd
commit
e79aa3c0ed
@ -0,0 +1,48 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
namespace System.Activities
|
||||
{
|
||||
using System.Runtime.Serialization;
|
||||
using System.Runtime;
|
||||
|
||||
[DataContract]
|
||||
public enum ActivityInstanceState
|
||||
{
|
||||
[EnumMember]
|
||||
Executing,
|
||||
|
||||
[EnumMember]
|
||||
Closed,
|
||||
|
||||
[EnumMember]
|
||||
Canceled,
|
||||
|
||||
[EnumMember]
|
||||
Faulted,
|
||||
|
||||
// If any more states are added, ensure they are also added to ActivityInstanceStateExtension.GetStateName
|
||||
}
|
||||
|
||||
internal static class ActivityInstanceStateExtension
|
||||
{
|
||||
internal static string GetStateName(this ActivityInstanceState state)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
case ActivityInstanceState.Executing:
|
||||
return "Executing";
|
||||
case ActivityInstanceState.Closed:
|
||||
return "Closed";
|
||||
case ActivityInstanceState.Canceled:
|
||||
return "Canceled";
|
||||
case ActivityInstanceState.Faulted:
|
||||
return "Faulted";
|
||||
default:
|
||||
Fx.Assert("Don't understand ActivityInstanceState named " + state.ToString());
|
||||
return state.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user