Exemple #1
0
        public PileDefinition ReadPileDefinition(object sourceDescriptor)
        {
            PileDefinition        pileDefinition        = null;
            PileSourceCheckResult pileSourceCheckResult = PileSource.CheckPileSource(sourceDescriptor);

            if (pileSourceCheckResult == PileSourceCheckResult.PileSourceOK)
            {
                pileDefinition = PileSource.ReadPileDefinition(sourceDescriptor);
            }

            return(pileDefinition);
        }
Exemple #2
0
        public bool WriteTiles(PileDefinition pileDefinition, object sourceDescriptor, object targetDescriptor, int pileId, int mediaItemGroupId, bool addTileIdAsPrefix)
        {
            // TODO: Cleanup pilecreation result enum (split) and don't reuse pileCreationResult
            PileSourceCheckResult pileSourceCheckResult = PileSource.CheckPileSource(sourceDescriptor);
            PileCreationResult    pileCreationResult    = PileCreationTarget.CheckPileCreationTarget(targetDescriptor);

            if (pileSourceCheckResult == PileSourceCheckResult.PileSourceOK && pileCreationResult == PileCreationResult.Ok)
            { // TODO: properly handle and return each result
                pileCreationResult = WriteValidationTiles(sourceDescriptor, targetDescriptor, pileDefinition, pileId, mediaItemGroupId, addTileIdAsPrefix);
                pileCreationResult = WriteExampleTiles(sourceDescriptor, targetDescriptor, pileDefinition, pileId, mediaItemGroupId, addTileIdAsPrefix);
                pileCreationResult = WriteExpertTiles(sourceDescriptor, targetDescriptor, pileDefinition, pileId, mediaItemGroupId, addTileIdAsPrefix);
            }

            return(pileCreationResult == PileCreationResult.Ok);
        }