Not available for Offline object
m ((username removed) (log details removed): Moving to Documentation namespace)
(Automatically adding template at the end of the page.)
 
Line 9: Line 9:
The this.ServiceProvider() shortcut is an extension method from the namespace Eco.ObjectRepresentation.
The this.ServiceProvider() shortcut is an extension method from the namespace Eco.ObjectRepresentation.
[[Category:C-Sharp]]
[[Category:C-Sharp]]
{{Edited|July|12|2024}}

Latest revision as of 15:38, 10 February 2024

If you get this error, working in CodeDress or the Framework in general, you have created an object without specifying which eco-space it belongs to.

Change your object constructor to look like this:

Class1 newObject = new Class1(this.AsIObject().ServiceProvider)

this.AsIObject().ServiceProvider is the crucial part.

The IEcoServiceProvider is available from all IObjects. All objects of model classes have an AsIObject() method. You can find the service provider there: this.AsIObject().ServiceProvider.

The this.ServiceProvider() shortcut is an extension method from the namespace Eco.ObjectRepresentation.

This page was edited 97 days ago on 02/10/2024. What links here