private IEnumerable <CilProperty> GetProperties()
 {
     foreach (var handle in _typeDefinition.GetProperties())
     {
         var property = _readers.MdReader.GetPropertyDefinition(handle);
         int token    = MetadataTokens.GetToken(handle);
         yield return(CilProperty.Create(property, token, ref _readers, this));
     }
 }
Beispiel #2
0
 internal static CilProperty Create(PropertyDefinition propertyDef, int token, ref CilReaders readers, CilTypeDefinition typeDefinition)
 {
     CilProperty property = new CilProperty();
     property._typeDefinition = typeDefinition;
     property._propertyDef = propertyDef;
     property._readers = readers;
     property._isSignatureInitialized = false;
     property._isDefaultValueInitialized = false;
     property._isGetterInitialized = false;
     property._isSetterInitialized = false;
     property._token = token;
     property._accessors = propertyDef.GetAccessors();
     return property;
 }
Beispiel #3
0
        internal static CilProperty Create(PropertyDefinition propertyDef, int token, ref CilReaders readers, CilTypeDefinition typeDefinition)
        {
            CilProperty property = new CilProperty();

            property._typeDefinition            = typeDefinition;
            property._propertyDef               = propertyDef;
            property._readers                   = readers;
            property._isSignatureInitialized    = false;
            property._isDefaultValueInitialized = false;
            property._isGetterInitialized       = false;
            property._isSetterInitialized       = false;
            property._token     = token;
            property._accessors = propertyDef.GetAccessors();
            return(property);
        }
Beispiel #4
0
 public PropertyNode(CilProperty cp)
 {
     _property = cp;
     if (cp.HasGetter)
     {
         _children.Add(new MethodNode(cp.Getter));
     }
     if (cp.HasSetter)
     {
         _children.Add(new MethodNode(cp.Setter));
     }
 }