本文整理汇总了C#中ISymUnmanagedVariable.GetSignature方法的典型用法代码示例。如果您正苦于以下问题:C# ISymUnmanagedVariable.GetSignature方法的具体用法?C# ISymUnmanagedVariable.GetSignature怎么用?C# ISymUnmanagedVariable.GetSignature使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISymUnmanagedVariable
的用法示例。
在下文中一共展示了ISymUnmanagedVariable.GetSignature方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ValidateVariable
public static void ValidateVariable(ISymUnmanagedVariable variable, string name, int slot, LocalVariableAttributes attributes, byte[] signature)
{
int length, length2;
// name:
Assert.Equal(HResult.S_OK, variable.GetName(0, out length, null));
Assert.Equal(name.Length + 1, length);
var actualName = new char[length];
Assert.Equal(HResult.S_OK, variable.GetName(length, out length2, actualName));
Assert.Equal(length, length2);
Assert.Equal(name + "\0", new string(actualName));
int value;
Assert.Equal(HResult.S_OK, variable.GetAddressField1(out value));
Assert.Equal(slot, value);
Assert.Equal(HResult.E_NOTIMPL, variable.GetAddressField2(out value));
Assert.Equal(HResult.E_NOTIMPL, variable.GetAddressField3(out value));
Assert.Equal(HResult.E_NOTIMPL, variable.GetStartOffset(out value));
Assert.Equal(HResult.E_NOTIMPL, variable.GetEndOffset(out value));
Assert.Equal(HResult.S_OK, variable.GetAttributes(out value));
Assert.Equal(attributes, (LocalVariableAttributes)value);
Assert.Equal(HResult.S_OK, variable.GetAddressKind(out value));
Assert.Equal(1, value);
Assert.Equal(HResult.S_OK, variable.GetSignature(0, out length, null));
var actualSignature = new byte[length];
Assert.Equal(HResult.S_OK, variable.GetSignature(length, out length2, actualSignature));
Assert.Equal(length, length2);
AssertEx.Equal(signature, actualSignature);
}