/// <summary> /// Froms the token. /// </summary> /// <param name="content">The content.</param> /// <returns>ILinkImpl.</returns> public new static ILinkImpl FromToken(JToken content) { JsonRelationType relationType = GetRelationType(content); ILinkImpl instance; if (relationType.IsWorkItemLink) { //instance = new WorkItemLinkImpl(content); instance = RelatedLinkImpl.FromToken(content); } else if (relationType.Name == "AttachedFile") { instance = new AttachmentImpl(content); } else { instance = new LinkImpl(content); } return(instance); }
/// <summary> /// Froms the token. /// </summary> /// <param name="value">The value.</param> /// <returns>AttachmentImpl.</returns> public new static AttachmentImpl FromToken(JToken value) { var instance = new AttachmentImpl(value); return(instance); }