//---------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------- namespace System.Activities.DurableInstancing { using System; using System.Linq; using System.Runtime; using System.Runtime.Collections; using System.Runtime.DurableInstancing; using System.Xml.Linq; using System.Collections.Generic; using System.Collections.ObjectModel; [Fx.Tag.XamlVisible(false)] public sealed class ActivatableWorkflowsQueryResult : InstanceStoreQueryResult { static readonly ReadOnlyDictionaryInternal emptyDictionary = new ReadOnlyDictionaryInternal(new Dictionary(0)); public ActivatableWorkflowsQueryResult() { ActivationParameters = new List>(0); } public ActivatableWorkflowsQueryResult(IDictionary parameters) { ActivationParameters = new List> { parameters == null ? ActivatableWorkflowsQueryResult.emptyDictionary : new ReadOnlyDictionaryInternal(new Dictionary(parameters)) }; } public ActivatableWorkflowsQueryResult(IEnumerable> parameters) { if (parameters == null) { ActivationParameters = new List>(0); } else { ActivationParameters = new List>(parameters.Select(dictionary => dictionary == null ? ActivatableWorkflowsQueryResult.emptyDictionary : new ReadOnlyDictionaryInternal(new Dictionary(dictionary)))); } } public List> ActivationParameters { get; private set; } } }