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,33 @@
|
||||
namespace System.Workflow.ComponentModel
|
||||
{
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Specialized;
|
||||
using System.Collections.Generic;
|
||||
using System.CodeDom;
|
||||
using System.Workflow.ComponentModel.Design;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
|
||||
internal static class InternalHelpers
|
||||
{
|
||||
// Should only be called for BuiltIn activities
|
||||
internal static string GenerateQualifiedNameForLockedActivity(Activity activity, string id)
|
||||
{
|
||||
System.Text.StringBuilder sbQId = new System.Text.StringBuilder();
|
||||
|
||||
// Walk up the parent chain to find the custom activity that contains this built-in activity
|
||||
// and prepend the ID of the custom activity to the front of the qualified ID of this activity.
|
||||
Debug.Assert(activity.Parent != null, "If this is a built-in activity, its parent should never be null.");
|
||||
string newID = (string.IsNullOrEmpty(id)) ? activity.Name : id;
|
||||
CompositeActivity customActivity = Helpers.GetDeclaringActivity(activity);
|
||||
if (customActivity != null)
|
||||
//
|
||||
sbQId.Append(customActivity.QualifiedName).Append(".").Append(newID);
|
||||
else
|
||||
sbQId.Append(newID);
|
||||
|
||||
return sbQId.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user