| 100 | } |
| 101 | |
| 102 | ProfilingDynamicGuid TimelineUtilityMethods::CreateNamedTypedEntity(const std::string& name, const std::string& type) |
| 103 | { |
| 104 | // Check that the entity name is valid |
| 105 | if (name.empty()) |
| 106 | { |
| 107 | throw arm::pipe::InvalidArgumentException("Invalid entity name, the entity name cannot be empty"); |
| 108 | } |
| 109 | |
| 110 | // Check that the entity type is valid |
| 111 | if (type.empty()) |
| 112 | { |
| 113 | throw arm::pipe::InvalidArgumentException("Invalid entity type, the entity type cannot be empty"); |
| 114 | } |
| 115 | |
| 116 | // Generate dynamic GUID of the entity |
| 117 | ProfilingDynamicGuid entityGuid = IProfilingService::GetNextGuid(); |
| 118 | |
| 119 | CreateNamedTypedEntity(entityGuid, name, type); |
| 120 | |
| 121 | return entityGuid; |
| 122 | } |
| 123 | |
| 124 | void TimelineUtilityMethods::CreateNamedTypedEntity(ProfilingGuid entityGuid, |
| 125 | const std::string& name, |
no test coverage detected