本文整理汇总了C#中Debugger.Value.CopyTo方法的典型用法代码示例。如果您正苦于以下问题:C# Value.CopyTo方法的具体用法?C# Value.CopyTo怎么用?C# Value.CopyTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Debugger.Value
的用法示例。
在下文中一共展示了Value.CopyTo方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetPropertyValue
/// <summary> Set the value of the property using the set accessor </summary>
public static Value SetPropertyValue(Value objectInstance, PropertyInfo propertyInfo, Value[] arguments, Value newValue)
{
CheckObject(objectInstance, propertyInfo);
if (propertyInfo.GetSetMethod() == null) throw new GetValueException("Property does not have a set method");
arguments = arguments ?? new Value[0];
Value[] allParams = new Value[1 + arguments.Length];
allParams[0] = newValue;
arguments.CopyTo(allParams, 1);
return Value.InvokeMethod(objectInstance, (DebugMethodInfo)propertyInfo.GetSetMethod(), allParams);
}
示例2: SetPropertyValue
/// <summary> Set the value of the property using the set accessor </summary>
public static Value SetPropertyValue(Thread evalThread, Value objectInstance, IProperty propertyInfo, Value[] arguments, Value newValue)
{
CheckObject(objectInstance, propertyInfo);
if (!propertyInfo.CanSet) throw new GetValueException("Property does not have a set method");
arguments = arguments ?? new Value[0];
Value[] allParams = new Value[1 + arguments.Length];
allParams[0] = newValue;
arguments.CopyTo(allParams, 1);
return Value.InvokeMethod(evalThread, objectInstance, propertyInfo.Setter, allParams);
}
示例3: SetValue
/// <summary> Set the value of indexer property </summary>
public Value SetValue(Value objectInstance, Value newValue, Value[] parameters)
{
if (setMethod == null) throw new CannotGetValueException("Property does not have a set method");
parameters = parameters ?? new Value[0];
Value[] allParams = new Value[1 + parameters.Length];
allParams[0] = newValue;
parameters.CopyTo(allParams, 1);
return setMethod.Invoke(objectInstance, allParams);
}