本文整理汇总了C#中ClassLayout类的典型用法代码示例。如果您正苦于以下问题:C# ClassLayout类的具体用法?C# ClassLayout怎么用?C# ClassLayout使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ClassLayout类属于命名空间,在下文中一共展示了ClassLayout类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateCustomSizeFieldRva
public void CreateCustomSizeFieldRva()
{
const int dataSize = 128;
var assembly = Utilities.CreateTempNetAssembly();
var tableStream = assembly.NetDirectory.MetadataHeader.GetStream<TableStream>();
var typeTable = tableStream.GetTable<TypeDefinition>();
var classLayoutTable = tableStream.GetTable<ClassLayout>();
var importer = new ReferenceImporter(tableStream);
var type = new TypeDefinition(string.Empty, "__StaticArrayInitTypeSize=" + dataSize,
importer.ImportType(typeof(ValueType)));
type.MetadataRow.Column5 = 2; // FieldList
type.MetadataRow.Column6 = 2; // MethodList
typeTable.Add(type);
var layout = new ClassLayout(type, 128, 1);
type.ClassLayout = layout;
classLayoutTable.Add(layout);
TestFieldRva(assembly, new TypeDefOrRefSignature(type),
Enumerable.Repeat((byte)1, dataSize).ToArray(), false);
}
示例2: ClassLayout
protected ClassLayout(ClassLayout.Internal* native, bool isInternalImpl = false)
{
__Instance = new global::System.IntPtr(native);
}
示例3: __CopyValue
private static ClassLayout.Internal* __CopyValue(ClassLayout.Internal native)
{
var ret = Marshal.AllocHGlobal(88);
CppSharp.Parser.AST.ClassLayout.Internal.cctor_2(ret, new global::System.IntPtr(&native));
return (ClassLayout.Internal*) ret;
}
示例4: __CreateInstance
public static ClassLayout __CreateInstance(ClassLayout.Internal native)
{
return new ClassLayout(native);
}
示例5: ClassLayout
protected ClassLayout(ClassLayout.Internal* native, bool skipVTables = false)
{
if (native == null)
return;
__Instance = new global::System.IntPtr(native);
}
示例6: __CreateInstance
public static ClassLayout __CreateInstance(ClassLayout.Internal native, bool skipVTables = false)
{
return new ClassLayout(native, skipVTables);
}
示例7: __CopyValue
private static void* __CopyValue(ClassLayout.__Internal native)
{
var ret = Marshal.AllocHGlobal(72);
global::CppSharp.Parser.AST.ClassLayout.__Internal.cctor_2(ret, new global::System.IntPtr(&native));
return ret.ToPointer();
}
示例8: ClassLayout
internal ClassLayout(ClassLayout.Internal native)
: this(&native)
{
}
示例9: ClassLayout
private ClassLayout(ClassLayout.Internal native)
: this(__CopyValue(native))
{
__ownsNativeInstance = true;
}
示例10: ClassLayout
internal ClassLayout(ClassLayout.Internal native)
: this(__CopyValue(native))
{
}