DynamicValue 类

 

代表一个动态数据结构,用于支持工作流中的键值对嵌套集。

命名空间:   Microsoft.Activities
程序集:  Microsoft.Activities(Microsoft.Activities.dll 中)

继承层次结构

System.Object
  Microsoft.Activities.DynamicValue

语法

[DefaultMemberAttribute("Item")]
[DataContractAttribute]
public sealed class DynamicValue : ICollection<DynamicValue>, 
    IEnumerable<DynamicValue>, IDictionary<string, DynamicValue>, 
    ICollection<KeyValuePair<string, DynamicValue>>, IEnumerable<KeyValuePair<string, DynamicValue>>, 
    IEnumerable
[DefaultMemberAttribute("Item")]
[DataContractAttribute]
public ref class DynamicValue sealed : ICollection<DynamicValue^>, 
    IEnumerable<DynamicValue^>, IDictionary<String^, DynamicValue^>, 
    ICollection<KeyValuePair<String^, DynamicValue^>>, IEnumerable<KeyValuePair<String^, DynamicValue^>>, 
    IEnumerable
[<Sealed>]
[<DefaultMemberAttribute("Item")>]
[<DataContractAttribute>]
type DynamicValue = 
    class
        interface ICollection<DynamicValue>
        interface IEnumerable<DynamicValue>
        interface IDictionary<string, DynamicValue>
        interface ICollection<KeyValuePair<string, DynamicValue>>
        interface IEnumerable<KeyValuePair<string, DynamicValue>>
        interface IEnumerable
    end
<DefaultMemberAttribute("Item")>
<DataContractAttribute>
Public NotInheritable Class DynamicValue
    Implements ICollection(Of DynamicValue), IEnumerable(Of DynamicValue),
    IDictionary(Of String, DynamicValue), ICollection(Of KeyValuePair(Of String, DynamicValue)),
    IEnumerable(Of KeyValuePair(Of String, DynamicValue)), IEnumerable

构造函数

名称 说明
System_CAPS_pubmethod DynamicValue()

使用默认值初始化 DynamicValue 类的新实例。

System_CAPS_pubmethod DynamicValue(Boolean)

使用布尔值初始化 DynamicValue 类的新实例。

System_CAPS_pubmethod DynamicValue(DateTime)

使用 DateTime 值初始化 DynamicValue 类的新实例。

System_CAPS_pubmethod DynamicValue(Double)

使用 Double 值初始化 DynamicValue 类的新实例。

System_CAPS_pubmethod DynamicValue(Guid)

使用 GUID 值初始化 DynamicValue 类的新实例。

System_CAPS_pubmethod DynamicValue(Int32)

使用 Int32 值初始化 DynamicValue 类的新实例。

System_CAPS_pubmethod DynamicValue(Int64)

使用 Int64 值初始化 DynamicValue 类的新实例。

System_CAPS_pubmethod DynamicValue(String)

使用 String 值初始化 DynamicValue 类的新实例。

System_CAPS_pubmethod DynamicValue(TimeSpan)

使用 TimeSpan 值初始化 DynamicValue 类的新实例。

属性

名称 说明
System_CAPS_pubproperty Count

获取 DynamicValue 中的子项目数。

System_CAPS_pubproperty IsReadOnly

获取一个值,用于指示 DynamicValue 是否为只读。

System_CAPS_pubproperty Item[Int32]

按 ID 获取或设置项目。

System_CAPS_pubproperty Item[String]

按名称获取或设置项目。

System_CAPS_pubproperty Keys

获取动态值的键集合。

System_CAPS_pubproperty Values

获取此实例的值集合。

方法

名称 说明
System_CAPS_pubmethod Add(DynamicValue)

以子项目的形式添加 DynamicValue。

System_CAPS_pubmethod Add(KeyValuePair<String, DynamicValue>)

以子项目的形式添加 DynamicValue。

System_CAPS_pubmethod Add(String, DynamicValue)

添加具有特定键和值的 DynamicValue。

System_CAPS_pubmethod Clear()

清除 DynamicValue。

System_CAPS_pubmethod Contains(DynamicValue)

确定 DynamicValue 是否包含目标项目。

System_CAPS_pubmethod Contains(KeyValuePair<String, DynamicValue>)

确定 DynamicValue 是否包含目标项目。

System_CAPS_pubmethod ContainsKey(String)

指定 DynamicValue 是否包含特定键。

System_CAPS_pubmethod CopyTo(DynamicValue[], Int32)

将 DynamicValue 复制到数组中。

System_CAPS_pubmethod CopyTo(KeyValuePair<String, DynamicValue>[], Int32)

将 DynamicValue 复制到数组中。

System_CAPS_pubmethod Equals(Object)

指定 DynamicValue 对象是否与另一个对象相同。(替代 Object.Equals(Object)。)

System_CAPS_pubmethod GetEnumerator()

获取循环访问 DynamicValue 的枚举器。

System_CAPS_pubmethod GetHashCode()

获取与 DynamicValue 关联的哈希代码。(替代 Object.GetHashCode()。)

System_CAPS_pubmethod GetType()

(从 Object 继承。)

System_CAPS_pubmethodSystem_CAPS_static Parse(String)

将字符串分析成 DynamicValue。

System_CAPS_pubmethod Remove(DynamicValue)

从 DynamicValue 中删除项目。

System_CAPS_pubmethod Remove(KeyValuePair<String, DynamicValue>)

从 DynamicValue 中删除项目。

System_CAPS_pubmethod Remove(String)

使用指定的键从 DynamicValue 中删除一个项目。

System_CAPS_pubmethod ToString()

返回 DynamicValue 的字符串表示形式。(替代 Object.ToString()。)

System_CAPS_pubmethod TryGetValue(String, DynamicValue)

获取与指定的键关联的值。

运算符

名称 说明
System_CAPS_puboperatorSystem_CAPS_static Equality(DynamicValue, DynamicValue)

指定两个 DynamicValue 对象是否相等。

System_CAPS_puboperatorSystem_CAPS_static Implicit(Boolean to DynamicValue)

将布尔值强制转换成 DynamicValue。

System_CAPS_puboperatorSystem_CAPS_static Implicit(DateTime to DynamicValue)

将 DateTime 值强制转换成 DynamicValue。

System_CAPS_puboperatorSystem_CAPS_static Implicit(Double to DynamicValue)

将 Double 值强制转换成 DynamicValue。

System_CAPS_puboperatorSystem_CAPS_static Implicit(DynamicValue to Boolean)

将动态值强制转换成布尔值。

System_CAPS_puboperatorSystem_CAPS_static Implicit(DynamicValue to DateTime)

将动态值转换成 DateTime 值。

System_CAPS_puboperatorSystem_CAPS_static Implicit(DynamicValue to Double)

将动态值转换成 Double 值。

System_CAPS_puboperatorSystem_CAPS_static Implicit(DynamicValue to Guid)

将动态值转换成 Guid 值。

System_CAPS_puboperatorSystem_CAPS_static Implicit(DynamicValue to Int32)

将动态值转换成 Int32 值。

System_CAPS_puboperatorSystem_CAPS_static Implicit(DynamicValue to String)

将动态值转换成 String 值。

System_CAPS_puboperatorSystem_CAPS_static Implicit(DynamicValue to TimeSpan)

将动态值转换成 TimeSpan 值。

System_CAPS_puboperatorSystem_CAPS_static Implicit(Guid to DynamicValue)

将 GUID 值强制转换成 DynamicValue。

System_CAPS_puboperatorSystem_CAPS_static Implicit(Int32 to DynamicValue)

将 Int32 值强制转换成 DynamicValue。

System_CAPS_puboperatorSystem_CAPS_static Implicit(Int64 to DynamicValue)

将 Int64 值转换成动态值。

System_CAPS_puboperatorSystem_CAPS_static Implicit(String to DynamicValue)

将 String 值强制转换成 DynamicValue。

System_CAPS_puboperatorSystem_CAPS_static Implicit(TimeSpan to DynamicValue)

将 TimeSpan 值转换成动态值。

System_CAPS_puboperatorSystem_CAPS_static Inequality(DynamicValue, DynamicValue)

指定两个 DynamicValue 对象是否不相等。

显式接口实现

名称 说明
System_CAPS_pubinterfaceSystem_CAPS_privmethod IEnumerable<KeyValuePair<String, DynamicValue>>.GetEnumerator()

System_CAPS_pubinterfaceSystem_CAPS_privmethod IEnumerable.GetEnumerator()

获取循环访问 DynamicValue 的枚举器。

线程安全

此类型的任何公共静态(Visual Basic 中为 Shared)成员都是线程安全的。但不保证所有实例成员都是线程安全的。

请参阅

Microsoft.Activities 命名空间

返回页首