本文整理汇总了C#中Newtonsoft.Value方法的典型用法代码示例。如果您正苦于以下问题:C# Newtonsoft.Value方法的具体用法?C# Newtonsoft.Value怎么用?C# Newtonsoft.Value使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Newtonsoft
的用法示例。
在下文中一共展示了Newtonsoft.Value方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetFormulariumById
public Newtonsoft.Json.Linq.JObject GetFormulariumById(Newtonsoft.Json.Linq.JObject request)
{
Formularium formularium = Formularium.GetFormularium(request.Value<int>("id"));
Newtonsoft.Json.JsonSerializer ser = new JsonSerializer();
Newtonsoft.Json.Linq.JObject json = Newtonsoft.Json.Linq.JObject.FromObject(formularium, ser);
return json;
}
示例2: Session
public Session(Newtonsoft.Json.Linq.JToken token, Spakll.CodeMash.Data.Technology technology)
{
this.Abstract = token.Value<string>("Abstract");
this.Description = this.Abstract;
this.Difficulty = token.Value<string>("Difficulty");
this.EventType = token.Value<string>("EventType");
this.SessionLookupId = token.Value<string>("SessionLookupId");
this.SpeakerName = token.Value<string>("SpeakerName");
this.SpeakerURI = token.Value<string>("SpeakerURI");
this.Start = token.Value<DateTime?>("Start");
this.Subtitle = this.SpeakerName;
this.Technology = technology;
this.Title = token.Value<string>("Title");
this.UniqueId = this.URI = token.Value<string>("URI");
}
示例3: OnPut
public override void OnPut(string key, Newtonsoft.Json.Linq.JObject document, Newtonsoft.Json.Linq.JObject metadata, Raven.Http.TransactionInformation transactionInformation)
{
if (AuditContext.IsInAuditContext)
return;
using (AuditContext.Enter())
{
if (metadata.Value<string>("Raven-Entity-Name") == "People")
{
if (metadata["CreatedByPersonId"] == null)
{
metadata["CreatedByPersonId"] = CurrentOperationContext.Headers.Value["CurrentUserPersonId"];
metadata["CreatedDate"] = new DateTime(2011,02,19,15,00,00);
}
else
{
metadata["LastUpdatedPersonId"] = CurrentOperationContext.Headers.Value["CurrentUserPersonId"];
metadata["LastUpdatedDate"] = new DateTime(2011, 02, 19, 15, 00, 00);
}
}
}
}
示例4: GetProductList
public ActionResult GetProductList(Newtonsoft.Json.Linq.JObject paging)
{
int start = Int32.Parse(paging.Value<string>("start"));
int limit = Int32.Parse(paging.Value<string>("limit"));
string filter = paging.Value<string>("filter");
ProductInfoList list = ProductInfoList.GetProductInfoList(start, limit);
// temporary limit, have to inmplement a paging mechanism.
return this.Direct(new { totalCount = list.TotalCount, records = list });
}