 GetObjectList error in C# code
GetObjectList error in C# code
Added by Supriya Yenaganti about 6 years ago
Hii everyone,
I am new to c# Visual Studio.I am working on creating custom activity for Uipath studio which needs coding in C#.I am creating an activity for Api calling where the input would be subject and output would be response only .
Code is as follows:
using System;
using System.Activities;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using Redmine.Net.Api;
using Redmine.Net.Api.Types;
using System.Collections.Specialized;
namespace Redmine_Main
{
    public class Class1 : CodeActivity //message box creation
{
         [Category("Input")]
        [RequiredArgument]
        public InArgument<double> Subject { get; set; }
        [Category("Output")]
        public OutArgument<double> Result { get; set; }
        protected override void Execute(CodeActivityContext context)
    {
            var subject = Subject.Get(context);
            string host = "http://localhost/redmine/issues.json";
            string apiKey = "90832fbbd2c709cacd6bf2a4bbbed225c232eba9";                                                                                          
            var manager = new RedmineManager(host, apiKey);
            var parameters = new NameValueCollection { { "status_id", "*" } };
            foreach (var issue in manager.GetObjectList<Issue>(parameters))
        {
                var result = ("#{0}: {1}", issue.Id, issue.Subject);Result.Set(context, result);
            }
            var newIssue = new Issue { Subject = subject, Project = new IdentifiableName { Id = 1 } };
            manager.CreateObject(newIssue);}
    }
}Response is a follows:
Error CS1061
'RedmineManager' does not contain a definition for 'GetObjectList' and no accessible extension method 'GetObjectList' accepting a first argument of type 'RedmineManager' could be found (are you missing a using directive or an assembly reference?)
Redmine Main C:\Users\GSS-13\source\repos\Redmine Main\Class1.cs
36 Active
Error CS0029  Cannot implicitly convert type 'double' to 'string'
Redmine Main C:\Users\GSS-13\source\repos\Redmine Main\Class1.cs
46 Active
Hoping for the response
Thanks and Regards,
Supriya
Replies (1)
     RE: GetObjectList error in C# code
    -
    Added by Ivan Cenov about 6 years ago
    RE: GetObjectList error in C# code
    -
    Added by Ivan Cenov about 6 years ago
  
  It is not the right forum for your question.