there is no an analog for SPWorkflowTask.GetExtendedPropertiesAsHashtable method in CSOM
, but it could be implemented (Reflector to the rescue).
How to gets a hash table that represents the task’s extended properties collection via SharePoint Managed CSOM
/// <summary>
/// Gets a hash table that represents the task’s extended properties collection
/// </summary>
/// <param name="task"></param>
/// <returns></returns>
public static Hashtable GetExtendedPropertiesAsHashtable(ListItem task)
{
if (task == null)
{
throw new ArgumentNullException();
}
Hashtable properties = new Hashtable();
string extProperties = (string)task["ExtendedProperties"];
if (!string.IsNullOrEmpty(extProperties))
{
var reader = new XmlTextReader(new StringReader("<Root " + extProperties + " />"))
{
WhitespaceHandling = WhitespaceHandling.Significant
};
reader.MoveToContent();
if (!reader.HasAttributes)
{
return properties;
}
while (reader.MoveToNextAttribute())
{
string propName = reader.Name.Substring(4);
properties[propName] = reader.Value;
}
}
return properties;
}