public static string GetSampleFolderInRelativeSolution(this SampleModel model)
{
switch (model.Type)
{
case SampleModel.SampleType.API:
return string.Format(
"..\\..\\..\\src\\desktop\\ArcGISRuntime.Desktop.Samples\\{0}\\{1}\\{2}",
model.SampleFolder.Parent.Parent.Name,
model.SampleFolder.Parent.Name,
model.SampleFolder.Name);
case SampleModel.SampleType.Workflow:
case SampleModel.SampleType.Tutorial:
return string.Format(
"..\\..\\..\\src\\desktop\\ArcGISRuntime.Desktop.Samples\\{0}\\{1}",
model.SampleFolder.Parent.Name,
model.SampleFolder.Name);
default:
throw new NotSupportedException("Sample type isn't supported.");
}
}
}