public ClientObjectPrototype <ItemType> RetrieveItems() { if (this.m_itemQuery == null) { this.m_itemQuery = new ClientObjectPrototype <ItemType>(base.Query, true); } return(this.m_itemQuery); }
public ClientObjectPrototype <PropertyType> RetrieveObject <PropertyType>(string propertyName) { if (this.m_subObjectPrototypes == null) { this.m_subObjectPrototypes = new Dictionary <string, ClientObjectPrototype>(); } ClientObjectPrototype clientObjectPrototype = null; if (this.m_subObjectPrototypes.TryGetValue(propertyName, out clientObjectPrototype)) { return((ClientObjectPrototype <PropertyType>)clientObjectPrototype); } bool flag = false; ClientQueryInternal clientQueryInternal; if (this.m_childItem) { clientQueryInternal = this.m_query.ChildItemQuery.GetSubQuery(propertyName); } else { clientQueryInternal = this.m_query.GetSubQuery(propertyName); } if (clientQueryInternal == null) { clientQueryInternal = new ClientQueryInternal(null, propertyName, true, this.m_query); flag = true; } ClientObjectPrototype <PropertyType> clientObjectPrototype2 = new ClientObjectPrototype <PropertyType>(clientQueryInternal, false); if (flag) { if (this.m_childItem) { this.m_query.ChildItemQuery.SelectSubQuery(clientQueryInternal); } else { this.m_query.SelectSubQuery(clientQueryInternal); } } this.m_subObjectPrototypes[propertyName] = clientObjectPrototype2; return(clientObjectPrototype2); }