共用方式為


JsonElement 類別

定義

從 Json 來源具現化的 RootElement。

public class JsonElement : MonoTouch.Dialog.RootElement
type JsonElement = class
    inherit RootElement
繼承
JsonElement

備註

JsonElement 是 RootElement 的子應用程式,可擴充 RootElement,以從本機或遠端 URL 載入巢狀子系的內容。

JsonElement 是以兩種形式具現化的 RootElement。 一個版本會建立一個 RootElement,以視需要載入內容,這些是使用 JsonElement 建構函式所建立,其結尾會採用額外的引數,URL 以從下列位置載入內容:

var je = new JsonElement ("Dynamic Data", "https://tirania.org/tmp/demo.json");

另一種表單會從本機檔案或您已剖析的現有 System.Json.JsonObject 建立資料:


var je = JsonElement.FromFile ("json.sample");

using (var reader = File.OpenRead ("json.sample"))
    return JsonElement.FromJson (JsonObject.Load (reader) as JsonObject, arg);

如需標記的詳細資訊,請參閱 MonoTouch.Dialog 隨附的 README.markdown。

建構函式

JsonElement(String, Group, String)

從指定 URL 的 Json 檔案內容建立 RootElement 及其巢狀內容。

JsonElement(String, Int32, Int32, String)

從指定 URL 的 Json 檔案內容建立 RootElement 及其巢狀內容。

JsonElement(String, String)

從指定 URL 的 Json 檔案內容建立 RootElement 及其巢狀內容。

欄位

Caption

要顯示這個指定專案的標題

(繼承來源 Element)
createOnSelected

點選 RootElement 時叫用的委派。

(繼承來源 RootElement)
NeedColorUpdate

設定為指示 DialogViewController 在實作 IColorizeBackground 的儲存格上呼叫 WillDisplay 方法。

(繼承來源 RootElement)
Parent

容器物件的控制碼。

(繼承來源 Element)
TableView

正在呈現目前 RootElement 的 UITableView。

(繼承來源 RootElement)
UnevenRows

報告資料列是否具有相同的大小。

(繼承來源 RootElement)
Url

選取專案時要載入的 URL。

屬性

CellKey

覆寫 GetCell 方法的子類別也應該覆寫這個方法

(繼承來源 Element)
Count

此 RootElement 中的區段數目。

(繼承來源 RootElement)
DateKind

從 Json 來源具現化的 RootElement。

IndexPath

傳回指定專案的 IndexPath。 這只適用于分葉元素,如果元素尚未附加,則不適用於的 Toplevel RootElement 或 Section。

(繼承來源 Element)
Item[Int32]

傳回位於指定索引處的 區段。

(繼承來源 RootElement)
Item[String]

從 Json 字典查閱特定元素,其 「id」 屬性設定為與索引鍵相同的值

RadioSelected

整個根目錄中目前選取的 Radio 專案。

(繼承來源 RootElement)

方法

Add(IEnumerable<Section>)

將 IEnumerable 中的所有區段新增至這個根項目。

(繼承來源 RootElement)
Add(Section)

將新的區段新增至此 RootElement

(繼承來源 RootElement)
Clear()

從這個 RootElement 移除所有區段。

(繼承來源 RootElement)
Deselected(DialogViewController, UITableView, NSIndexPath)

從 Json 來源具現化的 RootElement。

(繼承來源 Element)
Dispose()

從 Json 來源具現化的 RootElement。

(繼承來源 Element)
Dispose(Boolean)

釋放此 RootElement 及其子系所持有的資源。

(繼承來源 RootElement)
FromFile(String, Object)

從指定路徑的 Json 檔案內容建立 RootElement 及其巢狀內容。

FromFile(String)

從指定路徑的 Json 檔案內容建立 RootElement 及其巢狀內容。

FromJson(JsonElement, JsonObject, Object)

從 Json 物件的內容建立 RootElement 及其巢狀內容。

FromJson(JsonObject, Object)

從 Json 物件的內容建立 RootElement 及其巢狀內容。

FromJson(JsonObject)

從 Json 物件的內容建立 RootElement 及其巢狀內容。

GetActiveCell()

從 Json 來源具現化的 RootElement。

(繼承來源 Element)
GetCell(UITableView)

從 Json 來源具現化的 RootElement。

GetContainerTableView()

從 Json 來源具現化的 RootElement。

(繼承來源 Element)
GetImmediateRootElement()

如果附加儲存格將會傳回立即的 RootElement

(繼承來源 Element)
Insert(Int32, Section)

將新的區段插入 RootElement

(繼承來源 RootElement)
Insert(Int32, UITableViewRowAnimation, Section[])

從 Json 來源具現化的 RootElement。

(繼承來源 RootElement)
MakeViewController()

從 Json 來源具現化的 RootElement。

(繼承來源 RootElement)
Matches(String)

叫用以判斷儲存格是否符合指定文字的方法,絕不會使用 Null 值或空字串叫用。

(繼承來源 Element)
Prepare()

從 Json 來源具現化的 RootElement。

(繼承來源 RootElement)
PrepareDialogViewController(UIViewController)

從 Json 來源具現化的 RootElement。

(繼承來源 RootElement)
Reload(Element, UITableViewRowAnimation)

從 Json 來源具現化的 RootElement。

(繼承來源 RootElement)
Reload(Section, UITableViewRowAnimation)

從 Json 來源具現化的 RootElement。

(繼承來源 RootElement)
Remove(Section, UITableViewRowAnimation)

從 Json 來源具現化的 RootElement。

(繼承來源 RootElement)
Remove(Section)

使用預設動畫,從這個 RootElement 移除指定的區段。

(繼承來源 RootElement)
RemoveAt(Int32, UITableViewRowAnimation)

從 Json 來源具現化的 RootElement。

(繼承來源 RootElement)
RemoveAt(Int32)

使用預設動畫,移除位於指定位置的區段。

(繼承來源 RootElement)
Selected(DialogViewController, UITableView, NSIndexPath)

從 Json 來源具現化的 RootElement。

Summary()

傳回這個 物件所代表值的摘要,適合以具有子物件之 RootElement 的結果呈現。

(繼承來源 Element)

明確介面實作

IEnumerable.GetEnumerator()

傳回 RootElement 中所有區段的列舉值。

(繼承來源 RootElement)
IEnumerable<Section>.GetEnumerator()

傳回這個 RootElement 中所有區段的列舉值。

(繼承來源 RootElement)

適用於