| 142 | } |
| 143 | |
| 144 | SharedCacheView::SharedCacheView(const std::string& typeName, BinaryView* data, bool parseOnly) : |
| 145 | BinaryView(typeName, data->GetFile(), data), m_parseOnly(parseOnly) |
| 146 | { |
| 147 | // By default, we will assume the primary file name from the original file path. |
| 148 | // This is subject to be overridden via `LoadMetadata`. |
| 149 | m_primaryFileName = BaseFileName(GetFile()->GetOriginalFilename()); |
| 150 | |
| 151 | // Load up the metadata from the parent view (because our metadata is hilariously not available during view init) |
| 152 | if (const auto metadata = GetParentView()->QueryMetadata(VIEW_METADATA_KEY)) |
| 153 | LoadMetadata(*metadata); |
| 154 | } |
| 155 | |
| 156 | enum DSCPlatform |
| 157 | { |
nothing calls this directly
no test coverage detected