IChannel Interfaccia
Definizione
Definisce l'interfaccia di base che tutti gli oggetti canale devono implementare.Defines the basic interface that all channel objects must implement. Richiede che implementino l'interfaccia della macchina a stati condivisa da tutti gli oggetti di comunicazione e che implementino un metodo per recuperare oggetti dallo stack dei canali.It requires that they implement the state machine interface shared by all communication objects and that they implement a method to retrieve objects from the channel stack.
public interface class IChannel : System::ServiceModel::ICommunicationObject
public interface IChannel : System.ServiceModel.ICommunicationObject
type IChannel = interface
interface ICommunicationObject
Public Interface IChannel
Implements ICommunicationObject
- Derivato
- Implementazioni
Commenti
Importante
La chiamata a metodi da classi che implementano questa interfaccia con dati non attendibili costituisce un rischio per la sicurezza.Calling methods from classes that implement this interface with untrusted data is a security risk. Chiamare i metodi da classi che implementano questa interfaccia solo con dati attendibili.Call the methods from classes that implement this interface only with trusted data. Per altre informazioni, vedere Data Validation (Convalida dei dati).For more information, see Data Validation.
I canali devono soddisfare il contratto di una macchina a stati come definito dall'interfaccia ICommunicationObject.Channels must satisfy the contract of a state machine as defined by the ICommunicationObject interface.
L'interfaccia IChannel aggiunge il metodoThe IChannel interface adds the
GetPropertyMetodo per l' ICommunicationObject interfaccia.GetProperty method to the ICommunicationObject interface. Questo metodo fornisce un meccanismo per il recupero di proprietà dallo stack dei canali indipendentemente dal punto dello stack in cui risiedono.This method provides a mechanism for retrieving properties from the channel stack regardless of where in the stack those properties live. Il termine "proprietà" nel nome del metodo si riferisce alle informazioni che appartengono a uno dei canali dello stack.The term "property" in the method name refers to a piece of information that belongs to one of the channels in the stack. Il tipo CLR per quella proprietà è determinato da T
.The CLR type for that property is determined by T
. Questo metodo di recupero è utilizzato anche nelle channel factory e nei listener del canale.This method of retrieval is also used on channel factories and channel listeners.
IChannel
viene ereditato da ogni interfaccia del canale associata ai modelli di scambio dei messaggi di base:IChannel
is inherited by each of the channel interfaces associated with the basic message-exchange patterns:
IInputChannel per la ricezione dei messaggi.IInputChannel for receiving messages.
IOutputChannelper l'invio di messaggi.IOutputChannel for sending messages.
IRequestChannelper l'invio di una richiesta.IRequestChannel for sending a request.
IReplyChannel per l'invio di una risposta.IReplyChannel for sending a reply.
IDuplexChannelper la messaggistica bidirezionale.IDuplexChannel for bi-directional messaging.
Proprietà
State |
Ottiene lo stato corrente dell'oggetto orientato alla comunicazione.Gets the current state of the communication-oriented object. (Ereditato da ICommunicationObject) |
Metodi
Abort() |
Comporta la transizione immediata di un oggetto di comunicazione dallo stato corrente allo stato di chiusura.Causes a communication object to transition immediately from its current state into the closed state. (Ereditato da ICommunicationObject) |
BeginClose(AsyncCallback, Object) |
Consente di iniziare un'operazione asincrona finalizzata a chiudere un oggetto di comunicazione.Begins an asynchronous operation to close a communication object. (Ereditato da ICommunicationObject) |
BeginClose(TimeSpan, AsyncCallback, Object) |
Consente di iniziare un'operazione asincrona finalizzata a chiudere un oggetto di comunicazione entro un determinato intervallo di tempo.Begins an asynchronous operation to close a communication object with a specified timeout. (Ereditato da ICommunicationObject) |
BeginOpen(AsyncCallback, Object) |
Consente di iniziare un'operazione asincrona finalizzata ad aprire un oggetto di comunicazione.Begins an asynchronous operation to open a communication object. (Ereditato da ICommunicationObject) |
BeginOpen(TimeSpan, AsyncCallback, Object) |
Consente di iniziare un'operazione asincrona finalizzata ad aprire un oggetto di comunicazione entro un determinato intervallo di tempo.Begins an asynchronous operation to open a communication object within a specified interval of time. (Ereditato da ICommunicationObject) |
Close() |
Comporta la transizione di un oggetto di comunicazione dallo stato corrente allo stato di chiusura.Causes a communication object to transition from its current state into the closed state. (Ereditato da ICommunicationObject) |
Close(TimeSpan) |
Comporta la transizione di un oggetto di comunicazione dallo stato corrente allo stato di chiusura.Causes a communication object to transition from its current state into the closed state. (Ereditato da ICommunicationObject) |
EndClose(IAsyncResult) |
Consente di completare un'operazione asincrona finalizzata a chiudere un oggetto di comunicazione.Completes an asynchronous operation to close a communication object. (Ereditato da ICommunicationObject) |
EndOpen(IAsyncResult) |
Consente di completare un'operazione asincrona finalizzata ad aprire un oggetto di comunicazione.Completes an asynchronous operation to open a communication object. (Ereditato da ICommunicationObject) |
GetProperty<T>() |
Se presente, restituisce un oggetto tipizzato richiesto dal livello appropriato nello stack dei canali.Returns a typed object requested, if present, from the appropriate layer in the channel stack. |
Open() |
Comporta la transizione di un oggetto di comunicazione dallo stato di creazione allo stato di apertura.Causes a communication object to transition from the created state into the opened state. (Ereditato da ICommunicationObject) |
Open(TimeSpan) |
Comporta la transizione di un oggetto di comunicazione dallo stato di creazione allo stato di apertura entro un determinato intervallo di tempo.Causes a communication object to transition from the created state into the opened state within a specified interval of time. (Ereditato da ICommunicationObject) |
Eventi
Closed |
Si verifica quando l'oggetto di comunicazione completa la transizione dallo stato di pre-chiusura allo stato di chiusura.Occurs when the communication object completes its transition from the closing state into the closed state. (Ereditato da ICommunicationObject) |
Closing |
Si verifica quando l'oggetto di comunicazione passa per la prima volta allo stato di pre-chiusura.Occurs when the communication object first enters the closing state. (Ereditato da ICommunicationObject) |
Faulted |
Si verifica quando l'oggetto di comunicazione passa per la prima volta allo stato di errore.Occurs when the communication object first enters the faulted state. (Ereditato da ICommunicationObject) |
Opened |
Si verifica quando l'oggetto di comunicazione completa la transizione dallo stato di pre-apertura allo stato di apertura.Occurs when the communication object completes its transition from the opening state into the opened state. (Ereditato da ICommunicationObject) |
Opening |
Si verifica quando l'oggetto di comunicazione passa per la prima volta allo stato di pre-apertura.Occurs when the communication object first enters the opening state. (Ereditato da ICommunicationObject) |