示例#1
0
            /// <summary>
            /// Creates the time series object.
            /// Use CreateTimeSeriesObjectSingleValue to get an object populated with values object
            /// </summary>
            /// <returns></returns>
            public static TimeSeriesResponseType CreateTimeSeriesObject(int numberOfSeries)
            {
                TimeSeriesResponseType result = new TimeSeriesResponseType();

                result.queryInfo                    = new QueryInfoType();
                result.queryInfo.criteria           = new QueryInfoTypeCriteria();
                result.queryInfo.criteria.timeParam = new QueryInfoTypeCriteriaTimeParam();
                result.timeSeries                   = new TimeSeriesType[numberOfSeries];
                for (int i = 0; i < result.timeSeries.Length; i++)
                {
                    result.timeSeries[i] = TimeSeriesObjectSingleValue();
                }
                SiteInfoType site = new SiteInfoType();

                site.siteCode = new SiteInfoTypeSiteCode[1];
                SiteInfoTypeSiteCode siteId = new SiteInfoTypeSiteCode();

                site.siteCode[0] = siteId;
                result.timeSeries[0].sourceInfo = site;
                result.timeSeries[0].variable   = CreateVariableDescriptionType();//new VariablesTypeVariable[1];
                //result.timeseries.variable[0] = new VariableDescriptionType(); // new VariablesTypeVariable();
                //result.timeseries.variable.variableCode = new VariableDescriptionTypeVariableID[1];//added to simplify population
                //result.timeseries.variable.variableCode[0] = new VariableDescriptionTypeVariableID();
                return(result);
            }
示例#2
0
            /// <summary>
            /// Creates the time series object.
            /// Use CreateTimeSeriesObjectSingleValue to get an object populated with values object
            /// </summary>
            /// <returns></returns>
            public static TimeSeriesResponseType CreateTimeSeriesObject()
            {
                TimeSeriesResponseType result = new TimeSeriesResponseType();

                result.queryInfo                    = new QueryInfoType();
                result.queryInfo.criteria           = new QueryInfoTypeCriteria();
                result.queryInfo.criteria.timeParam = new QueryInfoTypeCriteriaTimeParam();
                result.timeSeries                   = new TimeSeriesType();
                SiteInfoType site = new SiteInfoType();

                site.siteCode = new SiteInfoTypeSiteCode[1];
                SiteInfoTypeSiteCode siteId = new SiteInfoTypeSiteCode();

                site.siteCode[0]             = siteId;
                result.timeSeries.sourceInfo = site;
                result.timeSeries.variable   = CreateVariableDescriptionType();//new VariablesTypeVariable[1];
                //result.timeseries.variable[0] = new VariableDescriptionType(); // new VariablesTypeVariable();
                //result.timeseries.variable.variableCode = new VariableDescriptionTypeVariableID[1];//added to simplify population
                //result.timeseries.variable.variableCode[0] = new VariableDescriptionTypeVariableID();
                return(result);
            }
 /// <summary>
 /// Creates the time series object.
 /// Use CreateTimeSeriesObjectSingleValue to get an object populated with values object 
 /// </summary>
 /// <returns></returns>
 public static TimeSeriesResponseType CreateTimeSeriesObject()
 {
     TimeSeriesResponseType result = new TimeSeriesResponseType();
     result.queryInfo = new QueryInfoType();
     result.queryInfo.criteria = new QueryInfoTypeCriteria();
     result.queryInfo.criteria.timeParam = new QueryInfoTypeCriteriaTimeParam();
     result.timeSeries = new TimeSeriesType();
     SiteInfoType site = new SiteInfoType();
     site.siteCode = new SiteInfoTypeSiteCode[1];
     SiteInfoTypeSiteCode siteId = new SiteInfoTypeSiteCode();
     site.siteCode[0] = siteId;
     result.timeSeries.sourceInfo = site;
     result.timeSeries.variable = CreateVariableDescriptionType();//new VariablesTypeVariable[1];
     //result.timeseries.variable[0] = new VariableDescriptionType(); // new VariablesTypeVariable();
     //result.timeseries.variable.variableCode = new VariableDescriptionTypeVariableID[1];//added to simplify population
     //result.timeseries.variable.variableCode[0] = new VariableDescriptionTypeVariableID();
     return result;
 }
 /// <summary>
 /// Creates the time series object.
 /// Use CreateTimeSeriesObjectSingleValue to get an object populated with values object 
 /// </summary>
 /// <returns></returns>
 public static TimeSeriesResponseType CreateTimeSeriesObject(int numberOfSeries)
 {
     TimeSeriesResponseType result = new TimeSeriesResponseType();
     result.queryInfo = new QueryInfoType();
     result.queryInfo.criteria = new QueryInfoTypeCriteria();
     result.queryInfo.criteria.timeParam = new QueryInfoTypeCriteriaTimeParam();
     result.timeSeries = new TimeSeriesType[numberOfSeries];
     for (int i = 0; i < result.timeSeries.Length; i++)
     {
         result.timeSeries[i] = TimeSeriesObjectSingleValue();
     }
     SiteInfoType site = new SiteInfoType();
     site.siteCode = new SiteInfoTypeSiteCode[1];
     SiteInfoTypeSiteCode siteId = new SiteInfoTypeSiteCode();
     site.siteCode[0] = siteId;
     result.timeSeries[0].sourceInfo = site;
     result.timeSeries[0].variable = CreateVariableDescriptionType();//new VariablesTypeVariable[1];
     //result.timeseries.variable[0] = new VariableDescriptionType(); // new VariablesTypeVariable();
     //result.timeseries.variable.variableCode = new VariableDescriptionTypeVariableID[1];//added to simplify population
     //result.timeseries.variable.variableCode[0] = new VariableDescriptionTypeVariableID();
     return result;
 }