private IEnumerable <T> Enumerate(string parentItemName) { List <T> list = new List <T>(); var relativePath = rootPathInStorage; if (!string.IsNullOrEmpty(parentItemName)) { parentItemName = FullNameHelper.ToPathName(parentItemName); relativePath = Path.Combine(rootPathInStorage, parentItemName); } foreach (var item in isolatedStorage.GetDirectoryNames(relativePath)) { var itemFullName = item; if (!string.IsNullOrEmpty(parentItemName)) { itemFullName = Path.Combine(parentItemName, item); } if (IsValidDataItem(Path.Combine(rootPathInStorage, itemFullName))) { var o = _initialize(itemFullName); //get object o = Get(o); if (o != null) { list.Add(o); } } } return(list); }
protected virtual string GetItemPath(T o) { return(Path.Combine(rootPathInStorage, FullNameHelper.ToPathName(o.UUID))); }