private RevisionsPropertyGroup(WikiPageStub page, JArray jrevisions)
 {
     if (jrevisions.Count == 1)
     {
         _Revisions = MediaWikiHelper.RevisionFromJson((JObject)jrevisions.First, page);
     }
     else
     {
         _Revisions = new ReadOnlyCollection <Revision>(jrevisions
                                                        .Select(jr => MediaWikiHelper.RevisionFromJson((JObject)jr, page))
                                                        .ToArray());
     }
 }
Пример #2
0
 /// <inheritdoc />
 protected override Revision ItemFromJson(JToken json, JObject jpage)
 {
     return(MediaWikiHelper.RevisionFromJson((JObject)json, MediaWikiHelper.PageStubFromJson(jpage)));
 }