The PowerShell code to instantiate an object is something like this:
$rm = new-object coreservice.RenderMode
the default value of RenderMode is Publish:
PS > $rm
Publish
listing its members gives:
Name MemberType Definition
---- ---------- ----------
CompareTo Method int CompareTo(System.Object target)
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
GetTypeCode Method System.TypeCode GetTypeCode()
ToString Method string ToString(), string ToString(string format, System.IFormatProvider provider), string To...
value__ Property System.Int32 value__ {get;set;}
How to change its value to e.g. PreviewDynamic?
I am confused by cryptic PowerShell code like this:
$renderInstruction = new-object coreservice.RenderInstructionData -property @{RenderMode = [coreservice.RenderMode]::previewdynamic}
and the Tridion API docs saying that:
public enum RenderMode
with member PreviewDynamic
and the RenderInstructionData class with its property: RenderMode.
How to glue the .NET classes/members/properties together with a PowerShell syntax?