public Parameter(ActionDrillthrough actionDef, AspNetCore.ReportingServices.ReportIntermediateFormat.ParameterValue parameterDef) { this.m_name = parameterDef.Name; this.m_actionDef = actionDef; this.m_parameterDef = parameterDef; this.m_instance = new ParameterInstance(this); }
public Parameter(ActionDrillthrough actionDef, AspNetCore.ReportingServices.ReportProcessing.ParameterValue parameterDef, ActionItemInstance actionInstance, int index) { this.m_name = parameterDef.Name; this.m_value = new ReportVariantProperty(parameterDef.Value); this.m_omit = new ReportBoolProperty(parameterDef.Omit); this.m_actionDef = actionDef; this.m_instance = new ParameterInstance(actionInstance, index); }
private NameValueCollection ConvertToNameValueCollection(bool forDrillthroughEvent, out bool[] sharedParams) { int count = this.m_list.Count; NameValueCollection nameValueCollection = new NameValueCollection(count); sharedParams = new bool[count]; for (int i = 0; i < count; i++) { Parameter parameter = this.m_list[i]; ParameterInstance instance = parameter.Instance; AspNetCore.ReportingServices.ReportIntermediateFormat.ParameterValue parameterDef = parameter.ParameterDef; object obj = null; if (parameterDef.Value != null && parameterDef.Value.Type == AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.Types.Token) { sharedParams[i] = true; } else { sharedParams[i] = false; } if (!instance.Omit) { obj = instance.Value; if (obj == null) { nameValueCollection.Add(parameter.Name, null); } else { object[] array = obj as object[]; if (array != null) { for (int j = 0; j < array.Length; j++) { nameValueCollection.Add(parameter.Name, this.ConvertValueToString(array[j], forDrillthroughEvent)); } } else { nameValueCollection.Add(parameter.Name, this.ConvertValueToString(obj, forDrillthroughEvent)); } } } } return(nameValueCollection); }
public void ConstructParameterDefinition() { ParameterInstance instance = this.Instance; Global.Tracer.Assert(instance != null); if (instance.Value != null) { this.m_parameterDef.Value = AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateConstExpression((string)instance.Value); } else { this.m_parameterDef.Value = AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression(); } this.m_value = null; if (instance.IsOmitAssined) { this.m_parameterDef.Omit = AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateConstExpression(instance.Omit); } else { this.m_parameterDef.Omit = AspNetCore.ReportingServices.ReportIntermediateFormat.ExpressionInfo.CreateEmptyExpression(); } this.m_omit = null; }
void IPersistable.Serialize(IntermediateFormatWriter writer) { writer.RegisterDeclaration(ActionInstance.m_Declaration); while (writer.NextMember()) { switch (writer.CurrentMember.MemberName) { case MemberName.Label: { string value2 = null; if (this.m_actionDef.Label.IsExpression) { value2 = this.m_label; } writer.Write(value2); break; } case MemberName.BookmarkLink: { string value = null; if (this.m_actionDef.BookmarkLink != null && this.m_actionDef.BookmarkLink.IsExpression) { value = this.m_bookmark; } writer.Write(value); break; } case MemberName.HyperLinkURL: { string value3 = null; if (this.m_actionDef.Hyperlink != null && this.m_actionDef.Hyperlink.IsExpression) { value3 = this.m_hyperlinkText; } writer.Write(value3); break; } case MemberName.DrillthroughReportName: { string value4 = null; if (this.m_actionDef.Drillthrough != null && this.m_actionDef.Drillthrough.ReportName.IsExpression) { value4 = this.m_actionDef.Drillthrough.Instance.ReportName; } writer.Write(value4); break; } case MemberName.DrillthroughParameters: { ParameterInstance[] array = null; if (this.m_actionDef.Drillthrough != null && this.m_actionDef.Drillthrough.Parameters != null) { array = new ParameterInstance[this.m_actionDef.Drillthrough.Parameters.Count]; for (int i = 0; i < array.Length; i++) { array[i] = ((ReportElementCollectionBase <Parameter>) this.m_actionDef.Drillthrough.Parameters)[i].Instance; } } writer.Write((IPersistable[])array); break; } default: Global.Tracer.Assert(false); break; } } }