ContentShape

Topics: Writing modules
Dec 25, 2013 at 12:14 PM
Hi,

I am using VisualStudio 2013. I am using contentshape in display method of driver class. My VS 2013 showing ContentShapeResult as deprecated. Please let me know what is new way of returning shapes from display method of drive class.

Thanks
Raffi
Coordinator
Jan 5, 2014 at 5:04 AM
Where is it telling you that it is deprecated?
Jan 9, 2014 at 9:37 AM
The Intellisense in VisualStudio 2013, showed ContentShape as deprecated. When i rechecked again it is not showing ContentShape as deprecated anymore.
Apr 18, 2014 at 6:53 AM
I'm also getting the same deprecated intellisense for ContentShape in VS 2012. I'm using the source of Orchard 1.8. Is this something to be worried?
Jan 9, 2015 at 7:37 AM
can some one replay on this please??

I'm also getting [deprecated] message.
Developer
Jan 9, 2015 at 11:18 AM
Edited Jan 9, 2015 at 11:20 AM
If you are referring to the ContentShape method overload that takes a single IShape argument, then yes, that one is obsolete and will eventually be removed:
[Obsolete("Provided while transitioning to factory variations")]
ContentShapeResult ContentShape(IShape shape);
You should instead use one of the other two overloads:
ContentShapeResult ContentShape(string shapeType, Func<dynamic> factory);
ContentShapeResult ContentShape(string shapeType, Func<dynamic, dynamic> factory);