Use GetDescriptor commands in TemplateResource classes .