youtrack sharp DeserializationException

时间:2012-06-17 12:17:05

标签: c# youtrack

我正在尝试编写一个cutomer门户,使用YourackSharp包装器来跟踪你的跟踪。

该项目的bugtracker存在一个错误:

http://youtrack.codebetter.com/issue/YTSRP-27?projectKey=YTSRP - 但似乎此代码已回滚。

重新启用代码后。我收到以下错误。

将System.Collections.Generic.List`1 [[System.Object,mscorlib,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089]]转换为YouTrackSharp.Issues.IssueStack跟踪时出错:

at JsonFx.Serialization.DataReader`1.ReadSingle(ITextTokenizer`1 tokenizer, IEnumerable`1 tokens, Type targetType)
at JsonFx.Serialization.DataReader`1.Read(String input, Type targetType)
at JsonFx.Serialization.DataReader`1.Read[TResult](String input)
at EasyHttp.Codecs.DefaultDecoder.DecodeToStatic[T](String input, String contentType)
at EasyHttp.Http.HttpResponse.StaticBody[T]()
at YouTrackSharp.Infrastructure.Connection.Get[T](String command)
at YouTrackSharp.Issues.IssueManagement.GetAllIssuesForProject(String projectIdentifier, Int32 max, Int32 start)
at TasksProxy.YouTrackServer.GetProjectIssues(IProxyProject project) in C:\Code\RadicalGeekMVC\TasksProxy\YouTrackServerConnection.cs:line 74
at RadicalGeek.Models.Project.GetTasks() in C:\Code\RadicalGeekMVC\RadicalGeek\Models\Project.cs:line 51
at ASP._Page_Views_Portal_Index_cshtml.Execute() in c:\Code\RadicalGeekMVC\RadicalGeek\Views\Portal\Index.cshtml:line 152
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
at System.Web.WebPages.StartPage.RunPage()
at System.Web.WebPages.StartPage.ExecutePageHierarchy()
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
at System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance)
at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer)
at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)

此错误在连接类的第103行引发。

var staticBody = httpRequest.Get(_uriConstructor.ConstructBaseUri(command))。StaticBody();方法如下所示:

`        public T Get<T>(string command)
    {
    var httpRequest = CreateHttpRequest();     
    try
    {              
    var staticBody = httpRequest.Get(_uriConstructor.ConstructBaseUri(command)).StaticBody<T>();
    HttpStatusCode = httpRequest.Response.StatusCode;             
    return staticBody;
    }
    catch (HttpException httpException)
    {
    if (httpException.StatusCode == HttpStatusCode.Forbidden)
    {
    throw new InvalidRequestException(Language.Connection_Get_Insufficient_rights);
    }
    throw;
    }
    }`

如果有人可以就此提供任何帮助,因为我真的需要访问项目的自定义字段。

我所代表的代码更改可以看作是在此更改集中回滚的更改:

https://github.com/JetBrains/YouTrackSharp/commit/fc488364b0787deae82d9b0fd3891e21be23bb10

谢谢。

1 个答案:

答案 0 :(得分:0)

由于我们已经通过电子邮件进行了跟进,让我们将其保留在那里。我不经常登录Stackoverflow(完全可以说),很抱歉没有注意到这一点。