public function writeTopLevelBagObject(QueryResult & $BagValue, $propertyName, ResourceType & $resourceType)
    {
        $result = $BagValue->results;

        $propertyContent = new ODataPropertyContent();
        $odataProperty = new ODataProperty();
        $odataProperty->name = $propertyName;
        $odataProperty->typeName = 'Collection(' . $resourceType->getFullName() . ')';
        $odataProperty->value = $this->writeBagValue($resourceType, $result);

        $propertyContent->properties[$propertyName] = $odataProperty;
        return $propertyContent;
    }
public function writeTopLevelBagObject(QueryResult & $BagValue, $propertyName, ResourceType & $resourceType)
    {
        $result = $BagValue->results;

        $propertyContent = new ODataPropertyContent();
        $odataProperty = new ODataProperty();
        $odataProperty->name = $propertyName;
        $odataProperty->typeName = 'Collection(' . $resourceType->getFullName() . ')';
        $odataProperty->value = $this->writeBagValue($resourceType, $result);

        $propertyContent->properties[$propertyName] = $odataProperty;
        return $propertyContent;
    }
public function writeTopLevelBagObject ( QueryResult & $ BagValue , $ propertyName , ResourceType & $ resourceType ) { $ result = $ BagValue -> results ; $ propertyContent = new ODataPropertyContent ( ) ; $ odataProperty = new ODataProperty ( ) ; $ odataProperty -> name = $ propertyName ; $ odataProperty -> typeName = 'Collection(' . $ resourceType -> getFullName ( ) . ')' ; $ odataProperty -> value = $ this -> writeBagValue ( $ resourceType , $ result ) ; $ propertyContent -> properties [ $ propertyName ] = $ odataProperty ; return $ propertyContent ; }
Write top level bag resource.

@param QueryResult  &$BagValue     The bag object to be
written
@param string       $propertyName  The name of the
bag property
@param ResourceType &$resourceType Describes the type of
bag object

@return ODataPropertyContent
Write top level bag resource .