コード例 #1
0
        public static OutlineParameter GetOneSimpleParameter(string url, string sessionid)
        {
            CatalogueApi            catalogueApi = new CatalogueApi(url);
            ParameterTypeAliasArray aliases      = catalogueApi.CatalogueParameters(sessionid);
            ParameterTypeAlias      palias       = aliases[0];
            Guid g = Guid.NewGuid();
            //orderNum: 31, productName: "Red Mug", sellerName: "Gift Shop"
            OutlineParameter outlineParameter = new OutlineParameter(Id: null,
                                                                     Name: "amount" + g.ToString().Replace('-', '_'),
                                                                     Path: null,
                                                                     Description: "amount" + g.ToString().Replace('-', '_'),
                                                                     ParameterTypeName: palias.ParameterTypeName,
                                                                     ParameterRoleName: palias.ParameterRoleName,
                                                                     DataTypeName: palias.DataTypeName,
                                                                     DataFormatName: palias.DataFormatName,
                                                                     DataElementPath: null,
                                                                     DisplayUnit: null);

            return(outlineParameter);
        }
コード例 #2
0
        public TestOutcome GetParamAliases()
        {
            TestOutcome outcome = new TestOutcome();

            outcome.moduleName = "Catalog";
            outcome.methodName = "CatalogueParameters";
            try
            {
                CatalogueApi            catalogueApi         = new CatalogueApi(_url);
                ParameterTypeAliasArray parameterTypeAliases = catalogueApi.CatalogueParameters(_session.SessionId);
                foreach (ParameterTypeAlias parameterTypeAlias in parameterTypeAliases)
                {
                    Console.WriteLine(parameterTypeAlias.Path);
                }
                outcome.outcome = "Success";
                return(outcome);
            }
            catch (Exception ex)
            {
                outcome.outcome = ex.Message;
                return(outcome);
            }
        }