本文整理汇总了C#中IEditableRoot.LoadValueByPropertyName方法的典型用法代码示例。如果您正苦于以下问题:C# IEditableRoot.LoadValueByPropertyName方法的具体用法?C# IEditableRoot.LoadValueByPropertyName怎么用?C# IEditableRoot.LoadValueByPropertyName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IEditableRoot
的用法示例。
在下文中一共展示了IEditableRoot.LoadValueByPropertyName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetChartDescriptor
private static ChartPanel GetChartDescriptor(IEditableRoot instance, string exprFieldName, string spcFieldName, ChartTypesEnum chartType, int subgroupSize, int dataPoints = 0)
{
ChartPanel chartDescriptor = null;
MobileDictionary<string, ChartPanel> dict = null;
if (!exprFieldName.Contains("_Rule"))
{
dict = instance.GetValueByPropertyName("ChartDescriptorExp") as MobileDictionary<string, ChartPanel>;
if (dict != null)
dict.TryGetValue(string.Format("{0}{1}", exprFieldName, spcFieldName), out chartDescriptor);
else
dict = new MobileDictionary<string, ChartPanel>();
}
if (chartDescriptor == null)
{
chartDescriptor = SpcManager.CreateChartDescriptor(chartType);
chartDescriptor.DataPoints = dataPoints;
chartDescriptor.SubgroupSize = subgroupSize;
chartDescriptor = MethodCaller.CallFactoryMethod(instance.GetType(), "GetSampleDataForSPC", spcFieldName, instance, chartType, chartDescriptor, true) as ChartPanel;
if (!exprFieldName.Contains("_Rule"))
{
ChartPanel chartPanel;
if (dict.TryGetValue(string.Format("{0}{1}", exprFieldName, spcFieldName), out chartPanel))
dict[string.Format("{0}{1}", exprFieldName, spcFieldName)] = chartDescriptor;
else
dict.Add(string.Format("{0}{1}", exprFieldName, spcFieldName), chartDescriptor);
instance.LoadValueByPropertyName("ChartDescriptorExp", dict);
}
}
else
{
chartDescriptor.DataPoints = dataPoints;
chartDescriptor.SubgroupSize = subgroupSize;
chartDescriptor = MethodCaller.CallFactoryMethod(instance.GetType(), "GetSampleDataForSPC", spcFieldName, instance, chartType, chartDescriptor, true) as ChartPanel;
}
return chartDescriptor;
}
示例2: GetChartDescriptorAsync
private static Task<ChartPanel> GetChartDescriptorAsync(IEditableRoot instance, string exprFieldName, string spcFieldName, ChartTypesEnum chartType, int subgroupSize, int dataPoints = 0)
{
ChartPanel chartDescriptor = null;
var dict = instance.GetValueByPropertyName("ChartDescriptorExp") as MobileDictionary<string, ChartPanel>;
if (dict != null)
dict.TryGetValue(string.Format("{0}{1}", exprFieldName, spcFieldName), out chartDescriptor);
else
dict = new MobileDictionary<string, ChartPanel>();
if (chartDescriptor == null)
{
return SpcManager.CreateChartDescriptorAsync(chartType)
.ContinueWith(async task =>
{
if (task.Result != null)
{
chartDescriptor = task.Result;
chartDescriptor.DataPoints = dataPoints;
chartDescriptor.SubgroupSize = subgroupSize;
var getDataTask = MethodCaller.CallFactoryMethod(
instance.GetType(), "GetSampleDataForSPCAsync", instance, spcFieldName, chartType, chartDescriptor, true) as Task<ChartPanel>;
chartDescriptor = await getDataTask;
ChartPanel chartPanel;
if (dict.TryGetValue(string.Format("{0}{1}", exprFieldName, spcFieldName), out chartPanel))
dict[string.Format("{0}{1}", exprFieldName, spcFieldName)] = chartDescriptor;
else
dict.Add(string.Format("{0}{1}", exprFieldName, spcFieldName), chartDescriptor);
instance.LoadValueByPropertyName("ChartDescriptorExp", dict);
return chartDescriptor;
}
return task.Result;
}
, CancellationToken.None, TaskContinuationOptions.NotOnFaulted, TaskScheduler.FromCurrentSynchronizationContext()).Unwrap();
}
chartDescriptor.DataPoints = dataPoints;
chartDescriptor.SubgroupSize = subgroupSize;
var getSamplesTask = MethodCaller.CallFactoryMethod(
instance.GetType(), "GetSampleDataForSPCAsync", instance, spcFieldName, chartType, chartDescriptor, true) as Task<ChartPanel>;
return getSamplesTask;
}