PInvokeInfo
namespace Mono.Cecil
{
public sealed class PInvokeInfo
{
private ushort attributes;
private string entry_point;
private ModuleReference module;
public PInvokeAttributes Attributes {
get {
return (PInvokeAttributes)attributes;
}
set {
attributes = (ushort)value;
}
}
public string EntryPoint {
get {
return entry_point;
}
set {
entry_point = value;
}
}
public ModuleReference Module {
get {
return module;
}
set {
module = value;
}
}
public bool IsNoMangle {
get {
return attributes.GetAttributes(1);
}
set {
attributes = attributes.SetAttributes(1, value);
}
}
public bool IsCharSetNotSpec {
get {
return attributes.GetMaskedAttributes(6, 0);
}
set {
attributes = attributes.SetMaskedAttributes(6, 0, value);
}
}
public bool IsCharSetAnsi {
get {
return attributes.GetMaskedAttributes(6, 2);
}
set {
attributes = attributes.SetMaskedAttributes(6, 2, value);
}
}
public bool IsCharSetUnicode {
get {
return attributes.GetMaskedAttributes(6, 4);
}
set {
attributes = attributes.SetMaskedAttributes(6, 4, value);
}
}
public bool IsCharSetAuto {
get {
return attributes.GetMaskedAttributes(6, 6);
}
set {
attributes = attributes.SetMaskedAttributes(6, 6, value);
}
}
public bool SupportsLastError {
get {
return attributes.GetAttributes(64);
}
set {
attributes = attributes.SetAttributes(64, value);
}
}
public bool IsCallConvWinapi {
get {
return attributes.GetMaskedAttributes(1792, 256);
}
set {
attributes = attributes.SetMaskedAttributes(1792, 256, value);
}
}
public bool IsCallConvCdecl {
get {
return attributes.GetMaskedAttributes(1792, 512);
}
set {
attributes = attributes.SetMaskedAttributes(1792, 512, value);
}
}
public bool IsCallConvStdCall {
get {
return attributes.GetMaskedAttributes(1792, 768);
}
set {
attributes = attributes.SetMaskedAttributes(1792, 768, value);
}
}
public bool IsCallConvThiscall {
get {
return attributes.GetMaskedAttributes(1792, 1024);
}
set {
attributes = attributes.SetMaskedAttributes(1792, 1024, value);
}
}
public bool IsCallConvFastcall {
get {
return attributes.GetMaskedAttributes(1792, 1280);
}
set {
attributes = attributes.SetMaskedAttributes(1792, 1280, value);
}
}
public bool IsBestFitEnabled {
get {
return attributes.GetMaskedAttributes(48, 16);
}
set {
attributes = attributes.SetMaskedAttributes(48, 16, value);
}
}
public bool IsBestFitDisabled {
get {
return attributes.GetMaskedAttributes(48, 32);
}
set {
attributes = attributes.SetMaskedAttributes(48, 32, value);
}
}
public bool IsThrowOnUnmappableCharEnabled {
get {
return attributes.GetMaskedAttributes(12288, 4096);
}
set {
attributes = attributes.SetMaskedAttributes(12288, 4096, value);
}
}
public bool IsThrowOnUnmappableCharDisabled {
get {
return attributes.GetMaskedAttributes(12288, 8192);
}
set {
attributes = attributes.SetMaskedAttributes(12288, 8192, value);
}
}
public PInvokeInfo(PInvokeAttributes attributes, string entryPoint, ModuleReference module)
{
this.attributes = (ushort)attributes;
entry_point = entryPoint;
this.module = module;
}
}
}