private function getOperationContext($table, Entity $entity, $type)
    {
        switch ($type) {
            case BatchOperationType::INSERT_ENTITY_OPERATION:
                return $this->constructInsertEntityContext($table, $entity, null);

            case BatchOperationType::UPDATE_ENTITY_OPERATION:
                return $this->constructPutOrMergeEntityContext(
                    $table,
                    $entity,
                    Resources::HTTP_PUT,
                    true,
                    null
                );

            case BatchOperationType::MERGE_ENTITY_OPERATION:
                return $this->constructPutOrMergeEntityContext(
                    $table,
                    $entity,
                    Resources::HTTP_MERGE,
                    true,
                    null
                );

            case BatchOperationType::INSERT_REPLACE_ENTITY_OPERATION:
                return $this->constructPutOrMergeEntityContext(
                    $table,
                    $entity,
                    Resources::HTTP_PUT,
                    false,
                    null
                );

            case BatchOperationType::INSERT_MERGE_ENTITY_OPERATION:
                return $this->constructPutOrMergeEntityContext(
                    $table,
                    $entity,
                    Resources::HTTP_MERGE,
                    false,
                    null
                );

            default:
                throw new \InvalidArgumentException();
        }
    }
private function getOperationContext($table, Entity $entity, $type)
    {
        switch ($type) {
            case BatchOperationType::INSERT_ENTITY_OPERATION:
                return $this->constructInsertEntityContext($table, $entity, null);

            case BatchOperationType::UPDATE_ENTITY_OPERATION:
                return $this->constructPutOrMergeEntityContext(
                    $table,
                    $entity,
                    Resources::HTTP_PUT,
                    true,
                    null
                );

            case BatchOperationType::MERGE_ENTITY_OPERATION:
                return $this->constructPutOrMergeEntityContext(
                    $table,
                    $entity,
                    Resources::HTTP_MERGE,
                    true,
                    null
                );

            case BatchOperationType::INSERT_REPLACE_ENTITY_OPERATION:
                return $this->constructPutOrMergeEntityContext(
                    $table,
                    $entity,
                    Resources::HTTP_PUT,
                    false,
                    null
                );

            case BatchOperationType::INSERT_MERGE_ENTITY_OPERATION:
                return $this->constructPutOrMergeEntityContext(
                    $table,
                    $entity,
                    Resources::HTTP_MERGE,
                    false,
                    null
                );

            default:
                throw new \InvalidArgumentException();
        }
    }
private function getOperationContext ( $ table , Entity $ entity , $ type ) { switch ( $ type ) { case BatchOperationType :: INSERT_ENTITY_OPERATION : return $ this -> constructInsertEntityContext ( $ table , $ entity , null ) ; case BatchOperationType :: UPDATE_ENTITY_OPERATION : return $ this -> constructPutOrMergeEntityContext ( $ table , $ entity , Resources :: HTTP_PUT , true , null ) ; case BatchOperationType :: MERGE_ENTITY_OPERATION : return $ this -> constructPutOrMergeEntityContext ( $ table , $ entity , Resources :: HTTP_MERGE , true , null ) ; case BatchOperationType :: INSERT_REPLACE_ENTITY_OPERATION : return $ this -> constructPutOrMergeEntityContext ( $ table , $ entity , Resources :: HTTP_PUT , false , null ) ; case BatchOperationType :: INSERT_MERGE_ENTITY_OPERATION : return $ this -> constructPutOrMergeEntityContext ( $ table , $ entity , Resources :: HTTP_MERGE , false , null ) ; default : throw new \ InvalidArgumentException ( ) ; } }
Creates operation context for the API.

@param string $table  The table name.
@param Entity $entity The entity object.
@param string $type   The API type.

@return \MicrosoftAzure\Storage\Common\Internal\Http\HttpCallContext

@throws \InvalidArgumentException
Creates operation context for the API .