예제 #1
0
        private IDataObject ConvertEntity(IDataObject enitity)
        {
            var dataObject = model.CreateInstance(model.Types[OutputDataType]);

            dataObject[MpInstanceProperty]     = enitity;
            dataObject[RecursionLevelProperty] = recursionLevel;
            return(dataObject);
        }
예제 #2
0
        private IDataObject CreateStackedSeries(string stackedSeriesType)
        {
            // Create data type for specified stacked series if not exists
            if (model.Types.FirstOrDefault(t => String.Compare(t.Name, stackedSeriesType, StringComparison.InvariantCultureIgnoreCase) == 0) == null)
            {
                AddSeriesTypeToDataModel(stackedSeriesType);
            }

            // Create new specific StackedSeries instance
            var stackedSeries = model.CreateInstance(model.Types[stackedSeriesType]);

            stackedSeries[SeriesDataConstants.ID]         = stackedSeriesType;
            stackedSeries[SeriesDataConstants.Data]       = new ObservableCollection <IDataObject>();
            stackedSeries[SeriesDataConstants.Visibility] = true;

            return(stackedSeries);
        }