protected void ValidateType <T>(List <string> validationMessages, Item RelativeFixedPathItem) where T : IItemWrapper { if (!typeof(T).IsAssignableFrom(ItemWrapper.CreateTypedWrapper(RelativeFixedPathItem).GetType())) { validationMessages.Add(string.Format("The item {0} was expected to be a {1}, but it was a {2}", RelativeFixedPathItem.Paths.FullPath, typeof(T).Name, RelativeFixedPathItem.TemplateName)); } }