Quick Watch on an Orchard.ContentManagement.ContentItem
This is what you’ll see in the top level of the Watch window. I find the yellow ones useful.
NewsItem
- base Duplicates MyContentItem.
- _parts Duplicate Parts.
- ContentManager
- ContentType A string that names the content type. E.g. “NewsItem”
- Id
- Orchard.ContentManagement.IContent.ContentItem Duplicates MyContentItem.
- Parts Contains all the parts that are attached to this ContentType.
- [0]
- …
- PartDefinition ContentPart`1
- …
- [1]
- …
- PartDefinition FieldIndexPart
- …
- [2]
- …
- PartDefinition TitlePart
- …
- [3]
- …
- PartDefinition BodyPart
- …
- [4]
- …
- PartDefinition CommonPart
- …
- [5]
- …
- PartDefinition NewsItem
- …
- [0]
- …
- PartDefinition AutoroutePart
- …
- [0]
- …
- PartDefinition InfosetPart
- …
- Record
- TypeDefinition
- DisplayName
- Name
- Parts
- [0]
- PartDefinition
- Fields Count = 0
- Name TitlePart
- Settings
- [1]
- PartDefinition
- Fields Count = 0
- Name BodyPart
- Settings
- [2]
- PartDefinition
- Fields Count = 0
- Name CommonPart
- Settings
- [3]
- PartDefinition
- Fields Count = 5 (this has fields because the Part has the same name as the Type).
- Name NewsItem
- Settings
- [4]
- PartDefinition
- Fields Count = 0
- Name AutoroutePart
- Settings
- Version
- VersionRecord
- Dynamic View
Questions
- What is the type of the Parts property? It appears to be a List of some sort.
- What is the difference between MyContentItem.Parts and MyContentItem.TypeDefinition.Parts? The former often lists more parts than the latter does.
Resources
http://msdn.microsoft.com/en-us/library/hfw7t1ce%28v=vs.71%29.aspx