DataServiceContext.GetReadStream Método
Definição
Obtém dados de propriedade binária para a entidade especificada como um fluxo de dados.Gets binary property data for the specified entity as a data stream.
Sobrecargas
| GetReadStream(Object) |
Obtém dados de propriedade binária para a entidade especificada como um fluxo de dados.Gets binary property data for the specified entity as a data stream. |
| GetReadStream(Object, DataServiceRequestArgs) |
Obtém os dados de propriedade binária para a entidade especificada como um fluxo de dados junto com os cabeçalhos da mensagem especificada.Gets binary property data for the specified entity as a data stream along with the specified message headers. |
| GetReadStream(Object, String) |
Obtém os dados de propriedade binária para a entidade especificada como um fluxo de dados, com o cabeçalho da mensagem Accept.Gets binary property data for the specified entity as a data stream, with the specified Accept message header. |
GetReadStream(Object)
Obtém dados de propriedade binária para a entidade especificada como um fluxo de dados.Gets binary property data for the specified entity as a data stream.
public:
System::Data::Services::Client::DataServiceStreamResponse ^ GetReadStream(System::Object ^ entity);
public System.Data.Services.Client.DataServiceStreamResponse GetReadStream (object entity);
member this.GetReadStream : obj -> System.Data.Services.Client.DataServiceStreamResponse
Public Function GetReadStream (entity As Object) As DataServiceStreamResponse
Parâmetros
- entity
- Object
A entidade que tem a propriedade binária a ser recuperada.The entity that has the binary property to retrieve.
Retornos
Uma instância de DataServiceStreamResponse que representa a resposta.An instance of DataServiceStreamResponse that represents the response.
Exceções
O entity é null.The entity is null.
O entity não é acompanhado por este DataServiceContext.The entity is not tracked by this DataServiceContext.
- ou --or-
A entity está no estado Added.The entity is in the Added state.
- ou --or-
A entity não é uma Entrada de Link de Mídia e não tem uma propriedade binária.The entity is not a Media Link Entry and does not have a binary property.
Comentários
O GetReadStream método, de forma síncrona, solicita um fluxo de dados que contém a propriedade Binary do solicitado entity .The GetReadStream method synchronously requests a data stream that contains the binary property of the requested entity.
No protocolo AtomPub, o entity é uma entrada de link de mídia e a propriedade Binary é o recurso de mídia associado.In the AtomPub protocol, the entity is a Media Link Entry and the binary property is the associated Media Resource.
Aplica-se a
GetReadStream(Object, DataServiceRequestArgs)
Obtém os dados de propriedade binária para a entidade especificada como um fluxo de dados junto com os cabeçalhos da mensagem especificada.Gets binary property data for the specified entity as a data stream along with the specified message headers.
public:
System::Data::Services::Client::DataServiceStreamResponse ^ GetReadStream(System::Object ^ entity, System::Data::Services::Client::DataServiceRequestArgs ^ args);
public System.Data.Services.Client.DataServiceStreamResponse GetReadStream (object entity, System.Data.Services.Client.DataServiceRequestArgs args);
member this.GetReadStream : obj * System.Data.Services.Client.DataServiceRequestArgs -> System.Data.Services.Client.DataServiceStreamResponse
Public Function GetReadStream (entity As Object, args As DataServiceRequestArgs) As DataServiceStreamResponse
Parâmetros
- entity
- Object
A entidade que tem a propriedade binária a ser recuperada.The entity that has the binary property to retrieve.
Instância da classe DataServiceRequestArgs que contém configurações para a mensagem de solicitação HTTP.Instance of DataServiceRequestArgs class that contains settings for the HTTP request message.
Retornos
Uma instância de DataServiceStreamResponse que representa a resposta.An instance of DataServiceStreamResponse that represents the response.
Exceções
O entity não é acompanhado por este DataServiceContext.The entity is not tracked by this DataServiceContext.
- ou --or-
A entity está no estado Added.The entity is in the Added state.
- ou --or-
A entity não é uma Entrada de Link de Mídia e não tem uma propriedade binária.The entity is not a Media Link Entry and does not have a binary property.
Comentários
O GetReadStream método, de forma síncrona, solicita um fluxo de dados que contém a propriedade Binary do solicitado entity .The GetReadStream method synchronously requests a data stream that contains the binary property of the requested entity.
No protocolo AtomPub, o entity é uma entrada de link de mídia e a propriedade Binary é o recurso de mídia associado.In the AtomPub protocol, the entity is a Media Link Entry and the binary property is the associated Media Resource.
Nenhuma validação é executada nos cabeçalhos definidos em args .No validation is performed on the headers that are set in args. Portanto, não altere um cabeçalho HTTP de maneira que altere o significado da solicitação.Therefore, do not change an HTTP header in a way that changes the meaning of the request.
Aplica-se a
GetReadStream(Object, String)
Obtém os dados de propriedade binária para a entidade especificada como um fluxo de dados, com o cabeçalho da mensagem Accept.Gets binary property data for the specified entity as a data stream, with the specified Accept message header.
public:
System::Data::Services::Client::DataServiceStreamResponse ^ GetReadStream(System::Object ^ entity, System::String ^ acceptContentType);
public System.Data.Services.Client.DataServiceStreamResponse GetReadStream (object entity, string acceptContentType);
member this.GetReadStream : obj * string -> System.Data.Services.Client.DataServiceStreamResponse
Public Function GetReadStream (entity As Object, acceptContentType As String) As DataServiceStreamResponse
Parâmetros
- entity
- Object
A entidade que tem a propriedade binária a ser recuperada.The entity that has the binary property to retrieve.
- acceptContentType
- String
O tipo de conteúdo dos dados solicitados do serviço de dados, especificado no cabeçalho Accept.The content type of the data requested from the data service, specified in the Accept header.
Retornos
Uma instância de DataServiceStreamResponse que representa a resposta.An instance of DataServiceStreamResponse that represents the response.
Exceções
entity é null.entity is null.
- ou --or-
acceptContentType é null.acceptContentType is null.
O entity não é acompanhado por este DataServiceContext.The entity is not tracked by this DataServiceContext.
- ou --or-
A entity está no estado Added.The entity is in the Added state.
- ou --or-
A entity não é uma Entrada de Link de Mídia e não tem uma propriedade binária.The entity is not a Media Link Entry and does not have a binary property.
Comentários
O acceptContentType parâmetro deve ser um valor válido para o cabeçalho http Accept.The acceptContentType parameter should be a valid value for the Accept HTTP header.
O GetReadStream método, de forma síncrona, solicita um fluxo de dados que contém a propriedade Binary do solicitado entity .The GetReadStream method synchronously requests a data stream that contains the binary property of the requested entity.
No protocolo AtomPub, o entity é uma entrada de link de mídia e a propriedade Binary é o recurso de mídia associado.In the AtomPub protocol, the entity is a Media Link Entry and the binary property is the associated Media Resource.
Nenhuma validação é executada nos cabeçalhos definidos em acceptContentType .No validation is performed on the headers that are set in acceptContentType. Portanto, não altere esse cabeçalho HTTP de uma maneira que altere o significado da solicitação.Therefore, do not change this HTTP header in a way that changes the meaning of the request.