This project is read-only.

uQuery

 

using uComponents.Core; // uQuery static class methods
using uComponents.Core.uQueryExtensions // Extension methods for Umbraco Node, Media, Member and RelationType objects


uComponents.Core.uQuery
returns method
notes
Node GetRootNode()  
Node GetCurrentNode()  
Node
GetNode(string)  wrapper for null checks - param: nodeId
Node GetNodeByUrl(string)
List<Node> GetNodesByName(string)  
List<Node> GetNodesByCsv(string) get node collection from csv of Ids
List<Node> GetNodesByXPath(string)
get node collectuion from XPath expression (uses Umbraco Xml)
Dictionary<int, string> ToNameIds(List<Node>) extension method on List<Node>
Media GetMedia(string) wrapper for null checks - param: mediaId
List<Media> GetMediaByCsv(string)
get media collection from csv of Ids
List<Media> GetMediaByXPath(string) media collection from XPath expression (uses GetPublishedXml)
Dictionary<int, string> ToNameIds(List<Media>) extension method on List<Media>
Member GetMember(string)
wrapper for null checks - param: memberId
List<Member> GetMembersByCsv(string) get collection of members from csv of Ids
List<Member> GetMembersByXPath(string) members from XPath expression (uses GetPublishedXml)
Dictionary<int, string> ToNameIds(List<Member>) extension method on List<Member>
XmlDocument GetPublishedXml(UmbracoObjectType) XML pulled from cmsContentXml, issue: xml isn't hierarchical
UmbracoObjectType GetUmbracoObjectType(string) returns object type from enum name
UmbracoObjectType GetUmbracoObjectType(Guid) returns object type from it's Guid
UmbracoObjectType GetUmbracoObjectType(int) returns object type from item id in umbracoNode table

uQueryExtensions

umbraco.presentation.nodeFactory.Node
returns  method notes
IEnumerable<Node> GetAncestorNodes() these axis type methods are really useful with LINQ
IEnumerable<Node> GetAncestorOrSelfNodes()
IEnumerable<Node> GetPrecedingSiblingNodes()  
IEnumerable<Node> GetFollowingSiblingNodes()  
IEnumerable<Node> GetSiblingNodes()  
IEnumerable<Node> GetDescendantNodes()
IEnumerable<Node> GetDescendantOrSelfNodes()
IEnumerable<Node> GetChildNodes()  
Node GetChildNodeByName(string)  
T GetProperty<T>(string)
string GetPropertyAsString(string) casting to a type in the getter simplifies lambda syntax when used with LINQ
bool GetPropertyAsBoolean(string) also checks true / false datatype - defaults to false
DateTime GetPropertyAsDateTime(string)
int GetPropertyAsInt(string)
int GetDepth() calculate depth of node based on path csv
Node SetProperty(string, object) returns node so can chain property setters / publish
Node Publish(bool) param true for admin, false for current user

 

umbraco.cms.businesslogic.media.Media
returns method notes
IEnumerable<Media> GetAncestorMedia()  
IEnumerable<Media> GetAncestorOrSelfMedia()
IEnumerable<Media> GetSiblingMedia()  
IEnumerable<Media> GetDescendantMedia()  
IEnumerable<Media> GetDescendantOrSelfMedia()
IEnumerable<Media> GetChildMedia()  
T GetProperty<T>(string)
string GetPropertyAsString(string)
bool GetPropertyAsBoolean(string)
DateTime GetPropertyAsDateTime(string)
int GetPropertyAsInt(string)
int GetDepth() calculate depth of node based on path csv
string GetImageCropperUrl(string, string) for built in Image Cropper - params: propertyAlias, cropName
Media SetProperty(string, object)

 

umbraco.cms.businesslogic.member.Member
returns method notes
T GetProperty<T>(string)
string GetPropertyAsString(string)
bool GetPropertyAsBoolean(string)
DateTime GetPropertyAsDateTime(string)
int GetPropertyAsInt(string)
Member SetProperty(string, object)

 

umbraco.cms.businesslogic.relation.RelationType
returns method notes
UmbracoObjectType GetParentUmbracoObjectType() uses SQL
UmbracoObjectType GetChildUmbracoObjectType() uses SQL
void CreateRelation(int, int) validates ids with umbraco object types defined by the relation type
bool IsRelated(int, int) wrapper on Relation.IsRelated(int, int, relationType)
Relation GetRelation(int, int)
void
DeleteRelation(int, int)
void ClearRelations(int)

 

UmbracoObjectType

enum guid
Unknown
ContentItemType  7A333C54-6F43-40A4-86A2-18688DC7E532
ROOT EA7D8624-4CFE-4578-A871-24AA946BF34D
Document C66BA18E-EAF3-4CFF-8A22-41B16D66A972
Media B796F64C-1F99-4FFB-B886-4BF4BC011A9C
MemberType 9B5416FB-E72F-45A9-A07B-5A9A2709CE43
Template 6FBDE604-4178-42CE-A10B-8A2600A2F07D
MemberGroup 366E63B9-880F-4E13-A61C-98069B029728
ContentItem 10E2B09F-C28B-476D-B77A-AA686435E44A
MediaType 4EA4382B-2F5A-4C2B-9587-AE9B3CF3602E
DocumentType A2CB7800-F571-4787-9638-BC48539A0EFB
RecycleBin 01BB7FF2-24DC-4C0C-95A2-C24EF72BBAC8
Stylesheet 9F68DA4F-A3A8-44C2-8226-DCBD125E4840
Member 39EB0F98-B348-42A1-8662-E7EB18487560
DataType 30A2A501-1978-4DDB-A57B-F7EFED43BA3C

Last edited Dec 12, 2010 at 10:04 PM by Hendy, version 39