本文整理汇总了C#中Value.setValue方法的典型用法代码示例。如果您正苦于以下问题:C# Value.setValue方法的具体用法?C# Value.setValue怎么用?C# Value.setValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Value
的用法示例。
在下文中一共展示了Value.setValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Read
/// <summary>
/// This is used to read the <c>Value</c> which will be used
/// to represent the deserialized object. If there is an annotation
/// present then the value will contain an object instance. If it
/// does not then it is up to the internal strategy to determine
/// what the returned value contains.
/// </summary>
/// <param name="type">
/// this is the type that represents a method or field
/// </param>
/// <param name="node">
/// this is the node representing the XML element
/// </param>
/// <param name="value">
/// this is the value from the internal strategy
/// </param>
/// <returns>
/// the value representing the deserialized value
/// </returns>
public Value Read(Type type, NodeMap<InputNode> node, Value value) {
Converter converter = scanner.GetConverter(type, value);
InputNode parent = node.getNode();
if(converter != null) {
Object data = converter.Read(parent);
if(value != null) {
value.setValue(data);
}
return new Reference(value, data);
}
return value;
}