internal static void SetDataItemLinkProperty(this QueryDataItemLinkProperty property, string propertyValue) { //Dimension Set ID=ValueEntry."Dimension Set ID", // Dimension Code=ItemAnalysisView."Dimension 1 Code" } while (!string.IsNullOrEmpty(propertyValue)) { var field = Parsing.MustMatch(ref propertyValue, @"^([^=]+)=").Groups[1].Value; var referenceTable = Parsing.MustMatch(ref propertyValue, @"^([^\.]+).").Groups[1].Value; var referenceField = Parsing.MustMatch(ref propertyValue, @"^([^,]+),?\s?").Groups[1].Value; property.Value.Add(new QueryDataItemLinkLine(field, referenceTable, referenceField)); } }
public static void Write(this QueryDataItemLinkProperty property, bool isLastProperty, PropertiesStyle style, CSideWriter writer) { writer.Write("{0}=", property.Name); writer.Indent(writer.Column); foreach (var line in property.Value) { var isLastLine = (line == property.Value.Last()); switch (isLastProperty && isLastLine) { case true: writer.Write("{0}={1}.{2} ", line.Field, line.ReferenceTable, line.ReferenceField); break; case false: writer.WriteLine("{0}={1}.{2}{3}", line.Field, line.ReferenceTable, line.ReferenceField, isLastLine ? ";" : ","); break; } } writer.Unindent(); }