5
5
// Jb Evain (jbevain@gmail.com)
7
// Copyright (c) 2008 - 2010 Jb Evain
9
9
// Permission is hereby granted, free of charge, to any person obtaining
10
10
// a copy of this software and associated documentation files (the
29
29
namespace Mono.Cecil {
31
public interface IMemberDefinition : IMemberReference, ICustomAttributeProvider {
33
new TypeDefinition DeclaringType { get; set; }
31
public interface IMemberDefinition : ICustomAttributeProvider {
33
string Name { get; set; }
34
string FullName { get; }
34
36
bool IsSpecialName { get; set; }
35
37
bool IsRuntimeSpecialName { get; set; }
39
TypeDefinition DeclaringType { get; set; }
42
static partial class Mixin {
44
public static bool GetAttributes (this uint self, uint attributes)
46
return (self & attributes) != 0;
49
public static uint SetAttributes (this uint self, uint attributes, bool value)
52
return self | attributes;
54
return self & ~attributes;
57
public static bool GetMaskedAttributes (this uint self, uint mask, uint attributes)
59
return (self & mask) == attributes;
62
public static uint SetMaskedAttributes (this uint self, uint mask, uint attributes, bool value)
66
return self | attributes;
69
return self & ~(mask & attributes);
72
public static bool GetAttributes (this ushort self, ushort attributes)
74
return (self & attributes) != 0;
77
public static ushort SetAttributes (this ushort self, ushort attributes, bool value)
80
return (ushort) (self | attributes);
82
return (ushort) (self & ~attributes);
85
public static bool GetMaskedAttributes (this ushort self, ushort mask, uint attributes)
87
return (self & mask) == attributes;
90
public static ushort SetMaskedAttributes (this ushort self, ushort mask, uint attributes, bool value)
93
self = (ushort) (self & ~mask);
94
return (ushort) (self | attributes);
97
return (ushort) (self & ~(mask & attributes));