Beispiel #1
0
        public static ColumnReportElement AutoName(this ColumnReportElement element)
        {
            if (!string.IsNullOrEmpty(element.Properties.SourceExpr))
            {
                element.Name = Regex.Replace(element.Properties.SourceExpr.TrimStart("\"".ToCharArray()), @"\W", @"_");
            }

            return(element);
        }
Beispiel #2
0
        public static IEnumerable<ParameterBase> ToParameters(this ColumnReportElement columnReportElement)
        {
            yield return new SimpleParameter("ID", columnReportElement.ID);
            yield return new SimpleParameter("Name", columnReportElement.Name);

            foreach (var parameter in columnReportElement.AllProperties.Where(p => p.HasValue).SelectMany(p => p.ToParameters()))
            {
                yield return parameter;
            }
        }
 public static Invocation ToInvocation(this ColumnReportElement columnReportElement)
 {
     return(new Invocation("New-CBreezeColumnReportElement", columnReportElement.ToParameters()));
 }