Exemple #1
0
        public static Dataset BuildDataset(Context context, FieldCollection fields, FilledItem filledItem,
                                           InlinePresentationSpec inlinePresentationSpec = null)
        {
            var overlayPresentation = BuildOverlayPresentation(
                filledItem.Name,
                filledItem.Subtitle,
                filledItem.Icon,
                context);

            var inlinePresentation = BuildInlinePresentation(
                inlinePresentationSpec,
                filledItem.Name,
                filledItem.Subtitle,
                filledItem.Icon,
                null,
                context);

            var datasetBuilder = new Dataset.Builder(overlayPresentation);

            if (inlinePresentation != null)
            {
                datasetBuilder.SetInlinePresentation(inlinePresentation);
            }
            if (filledItem.ApplyToFields(fields, datasetBuilder))
            {
                return(datasetBuilder.Build());
            }
            return(null);
        }
Exemple #2
0
        public static Dataset BuildDataset(Context context, FieldCollection fields, FilledItem filledItem)
        {
            var datasetBuilder = new Dataset.Builder(
                BuildListView(filledItem.Name, filledItem.Subtitle, filledItem.Icon, context));

            if (filledItem.ApplyToFields(fields, datasetBuilder))
            {
                return(datasetBuilder.Build());
            }
            return(null);
        }