Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public IEnumerable <Guid> ChildrenFilter(IDataObject dataObject)
 {
     return(ChildrenFilters.GetChildrenForPilotStorage(dataObject, _repository));
 }
Ejemplo n.º 3
0
 public IEnumerable <Guid> ChildrenFilter(IDataObject dataObject)
 {
     return(ChildrenFilters.GetChildrenForListView(dataObject, _repository));
 }