| 1640 | } |
| 1641 | |
| 1642 | MProperty::MProperty(MClass* parentClass, const char* name, void* handle, void* getterHandle, void* setterHandle, MMethodAttributes getterAttributes, MMethodAttributes setterAttributes) |
| 1643 | : _parentClass(parentClass) |
| 1644 | , _name(parentClass->GetAssembly()->AllocString(name)) |
| 1645 | , _handle(handle) |
| 1646 | , _hasCachedAttributes(false) |
| 1647 | , _attributes(&parentClass->GetAssembly()->Memory) |
| 1648 | { |
| 1649 | _hasGetMethod = getterHandle != nullptr; |
| 1650 | if (_hasGetMethod) |
| 1651 | _getMethod = parentClass->GetAssembly()->Memory.New<MMethod>(parentClass, GetPropertyMethodName(this, StringAnsiView("get_", 4)), getterHandle, 0, getterAttributes); |
| 1652 | else |
| 1653 | _getMethod = nullptr; |
| 1654 | _hasSetMethod = setterHandle != nullptr; |
| 1655 | if (_hasSetMethod) |
| 1656 | _setMethod = parentClass->GetAssembly()->Memory.New<MMethod>(parentClass, GetPropertyMethodName(this, StringAnsiView("set_", 4)), setterHandle, 1, setterAttributes); |
| 1657 | else |
| 1658 | _setMethod = nullptr; |
| 1659 | } |
| 1660 | |
| 1661 | MProperty::~MProperty() |
| 1662 | { |
nothing calls this directly
no test coverage detected