Esempio n. 1
0
 private string GetItemJsonBlock(FilingHistoryItem item)
 {
     return($@"{{
                  ""annotations"" : [
                    {string.Join(",", item.Annotations.Select(GetAnnotationJsonBlock))}
                  ],
                  ""associated_filings"" : [
                    {string.Join(",", item.AssociatedFilings.Select(GetAssociatedFilingJsonBlock))}
                  ],
                  ""barcode"" : ""{item.Barcode}"",
                  ""category"" : ""{item.Category}"",
                  ""date"" : ""{item.DateOfProcessing.ToString("yyyy-MM-dd")}"",
                  ""description"" : ""{item.Description}"",
                  ""description_values"" : {{
                     {string.Join(",", item.DescriptionValues.Select(GetDictionaryJsonBlock))}
                  }},
                  ""links"" : {{
                     ""document_metadata"" : ""{item.Links.DocumentMetaData}"",
                     ""self"" : ""{item.Links.Self}""
                  }},
                  ""pages"" : ""{item.PageCount}"",
                  ""paper_filed"" : ""{item.PaperFiled}"",
                  ""resolutions"" : [
                    {string.Join(",", item.Resolutions.Select(GetResolutionJsonBlock))}
                  ],
                  ""subcategory"" : ""{item.Subcategory}"",
                  ""transaction_id"" : ""{item.TransactionId}"",
                  ""type"" : ""{item.FilingType}""
               }}");
 }
 private string GetItemJsonBlock(FilingHistoryItem item)
 {
     return $@"{{
                  ""annotations"" : [
                    {string.Join(",", item.Annotations.Select(GetAnnotationJsonBlock))}
                  ],
                  ""associated_filings"" : [
                    {string.Join(",", item.AssociatedFilings.Select(GetAssociatedFilingJsonBlock))}
                  ],
                  ""barcode"" : ""{item.Barcode}"",
                  ""category"" : ""{item.Category}"",
                  ""date"" : ""{item.DateOfProcessing.ToString("yyyy-MM-dd")}"",
                  ""description"" : ""{item.Description}"",
                  ""description_values"" : {{
                     {string.Join(",", item.DescriptionValues.Select(GetDictionaryJsonBlock))}
                  }},
                  ""links"" : {{
                     ""document_metadata"" : ""{item.Links.DocumentMetaData}"",
                     ""self"" : ""{item.Links.Self}""
                  }},
                  ""pages"" : ""{item.PageCount}"",
                  ""paper_filed"" : ""{item.PaperFiled}"",
                  ""resolutions"" : [
                    {string.Join(",", item.Resolutions.Select(GetResolutionJsonBlock))}
                  ],
                  ""subcategory"" : ""{item.Subcategory}"",
                  ""transaction_id"" : ""{item.TransactionId}"",
                  ""type"" : ""{item.FilingType}""
               }}";
 }
 public static string CreateOne(FilingHistoryItem item)
 {
     return(GetItemJsonBlock(item));
 }