public DataObjectWrapper(IDataObject dataObject, IObjectsRepository repository) { if (dataObject == null) { return; } Id = dataObject.Id; ParentId = dataObject.ParentId; Created = dataObject.Created; Attributes = new Dictionary <string, object>(dataObject.Attributes); DisplayName = dataObject.DisplayName; Type = new TypeWrapper(dataObject.Type); Creator = new PersonWrapper(dataObject.Creator); ListViewChildren = new ReadOnlyCollection <Guid>( ChildrenFilters.GetChildrenForListView(dataObject, repository).ToList()); PilotStorageChildren = new ReadOnlyCollection <Guid>( ChildrenFilters.GetChildrenForPilotStorage(dataObject, repository).ToList()); State = dataObject.State; SynchronizationState = dataObject.SynchronizationState; Files = new ReadOnlyCollection <FileWrapper>(dataObject.Files.Select(f => new FileWrapper(f)).ToList()); Access = new ReadOnlyCollection <AccessWrapper>(dataObject.Access2.Select(f => new AccessWrapper(f)).ToList()); IsSecret = dataObject.IsSecret; StateInfo = new ObjectStateInfo(dataObject.ObjectStateInfo); }
public IEnumerable <Guid> ChildrenFilter(IDataObject dataObject) { return(ChildrenFilters.GetChildrenForPilotStorage(dataObject, _repository)); }