Partilhar via


INSearchForMessagesIntent Construtores

Definição

Sobrecargas

INSearchForMessagesIntent()

Construtor padrão, inicializa uma nova instância dessa classe.

INSearchForMessagesIntent(NSCoder)

Um construtor que inicializa o objeto dos dados armazenados no objeto unarchiver.

INSearchForMessagesIntent(NSObjectFlag)

Construtor para chamar classes derivadas para ignorar a inicialização e apenas alocar o objeto.

INSearchForMessagesIntent(IntPtr)

Um construtor usado ao criar representações gerenciadas de objetos não gerenciados; Chamado pelo runtime.

INSearchForMessagesIntent(INPerson[], INPerson[], String[], INMessageAttributeOptions, INDateComponentsRange, String[], String[], INSpeakableString[])

Cria uma nova intenção de pesquisa de mensagem com os detalhes especificados.

INSearchForMessagesIntent(INPerson[], INPerson[], String[], INMessageAttributeOptions, INDateComponentsRange, String[], String[], String[])

Os desenvolvedores não devem usar esse construtor preterido. Os desenvolvedores devem usar '.ctor (INPerson [], INPerson [], string [], INMessageAttributeOptions, INDateComponentsRange, string [], string [], INSpeakableString [])' em vez disso.

INSearchForMessagesIntent(INPerson[], INPerson[], String[], INMessageAttributeOptions, INDateComponentsRange, String[], String[], INSpeakableString[], String[])

INSearchForMessagesIntent()

Construtor padrão, inicializa uma nova instância dessa classe.

[Foundation.Export("init")]
public INSearchForMessagesIntent ();
Atributos

Aplica-se a

INSearchForMessagesIntent(NSCoder)

Um construtor que inicializa o objeto dos dados armazenados no objeto unarchiver.

[Foundation.Export("initWithCoder:")]
[ObjCRuntime.DesignatedInitializer]
public INSearchForMessagesIntent (Foundation.NSCoder coder);
new Intents.INSearchForMessagesIntent : Foundation.NSCoder -> Intents.INSearchForMessagesIntent

Parâmetros

coder
NSCoder

O objeto unarchiver.

Atributos

Comentários

Esse construtor é fornecido para permitir que a classe seja inicializada de um unarchiver (por exemplo, durante a desserialização do NIB). Isso faz parte do NSCoding protocolo.

Se os desenvolvedores quiserem criar uma subclasse desse objeto e continuar a dar suporte à desserialização de um arquivo morto, eles deverão implementar um construtor com uma assinatura idêntica: pegar um único parâmetro do tipo NSCoder e decorá-lo com a declaração de atributo [Export("initWithCoder:"].

O estado desse objeto também pode ser serializado usando o método complementar EncodeTo.

Aplica-se a

INSearchForMessagesIntent(NSObjectFlag)

Construtor para chamar classes derivadas para ignorar a inicialização e apenas alocar o objeto.

protected INSearchForMessagesIntent (Foundation.NSObjectFlag t);
new Intents.INSearchForMessagesIntent : Foundation.NSObjectFlag -> Intents.INSearchForMessagesIntent

Parâmetros

t
NSObjectFlag

Valor sentinela não utilizado, passe NSObjectFlag.Empty.

Comentários

Esse construtor deve ser chamado por classes derivadas quando eles constroem completamente o objeto em código gerenciado e apenas querem que o runtime aloque e inicialize o NSObject. Isso é necessário para implementar o processo de inicialização em duas etapas que o Objective-C usa, a primeira etapa é executar a alocação de objeto, a segunda etapa é inicializar o objeto. Quando os desenvolvedores invocam o construtor que usa o NSObjectFlag.Empty, eles aproveitam um caminho direto que vai até NSObject para apenas alocar a memória do objeto e associar os objetos Objective-C e C#. A inicialização real do objeto cabe ao desenvolvedor.

Normalmente, esse construtor é usado pelo gerador de associação para alocar o objeto, mas impede que a inicialização real ocorra. Depois que a alocação tiver ocorrido, o construtor precisará inicializar o objeto . Com construtores gerados pelo gerador de associação, isso significa que ele invoca manualmente um dos métodos "init" para inicializar o objeto.

É responsabilidade do desenvolvedor inicializar completamente o objeto se ele se encadear usando o caminho NSObjectFlag.Empty.

Em geral, se o construtor do desenvolvedor invocar a implementação base NSObjectFlag.Empty, ele deverá chamar um método de inicialização Objective-C. Se esse não for o caso, os desenvolvedores deverão encadear o construtor apropriado em sua classe.

O valor do argumento é ignorado e apenas garante que o único código executado seja a fase de construção é a alocação NSObject básica e o registro de tipo de runtime. Normalmente, o encadeamento teria esta aparência:

//
// The NSObjectFlag merely allocates the object and registers the
// C# class with the Objective-C runtime if necessary, but no actual
// initXxx method is invoked, that is done later in the constructor
//
// This is taken from Xamarin.iOS's source code:
//
[Export ("initWithFrame:")]
public UIView (System.Drawing.RectangleF frame) : base (NSObjectFlag.Empty)
{
// Invoke the init method now.
	var initWithFrame = new Selector ("initWithFrame:").Handle;
	if (IsDirectBinding)
		Handle = ObjCRuntime.Messaging.IntPtr_objc_msgSend_CGRect (this.Handle, initWithFrame, frame);
	else
		Handle = ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_CGRect (this.SuperHandle, initWithFrame, frame);
}

Aplica-se a

INSearchForMessagesIntent(IntPtr)

Um construtor usado ao criar representações gerenciadas de objetos não gerenciados; Chamado pelo runtime.

protected internal INSearchForMessagesIntent (IntPtr handle);
new Intents.INSearchForMessagesIntent : nativeint -> Intents.INSearchForMessagesIntent

Parâmetros

handle
IntPtr

nativeint

Ponteiro (identificador) para o objeto não gerenciado.

Comentários

Esse construtor é invocado pela infraestrutura de runtime (GetNSObject(IntPtr)) para criar uma nova representação gerenciada para um ponteiro para um objeto Objective-C não gerenciado. Os desenvolvedores não devem invocar esse método diretamente, em vez disso, devem chamar o método GetNSObject, pois isso impedirá que duas instâncias de um objeto gerenciado apontem para o mesmo objeto nativo.

Aplica-se a

INSearchForMessagesIntent(INPerson[], INPerson[], String[], INMessageAttributeOptions, INDateComponentsRange, String[], String[], INSpeakableString[])

Cria uma nova intenção de pesquisa de mensagem com os detalhes especificados.

[Foundation.Export("initWithRecipients:senders:searchTerms:attributes:dateTimeRange:identifiers:notificationIdentifiers:speakableGroupNames:")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.MacOSX, 10, 14, ObjCRuntime.PlatformArchitecture.None, "Use the overload that takes 'conversationIdentifiers' instead.")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.WatchOS, 5, 0, ObjCRuntime.PlatformArchitecture.None, "Use the overload that takes 'conversationIdentifiers' instead.")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 12, 0, ObjCRuntime.PlatformArchitecture.None, "Use the overload that takes 'conversationIdentifiers' instead.")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.WatchOS, 4, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 13, ObjCRuntime.PlatformArchitecture.Arch64, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 11, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public INSearchForMessagesIntent (Intents.INPerson[] recipients, Intents.INPerson[] senders, string[] searchTerms, Intents.INMessageAttributeOptions attributes, Intents.INDateComponentsRange dateTimeRange, string[] identifiers, string[] notificationIdentifiers, Intents.INSpeakableString[] speakableGroupNames);
new Intents.INSearchForMessagesIntent : Intents.INPerson[] * Intents.INPerson[] * string[] * Intents.INMessageAttributeOptions * Intents.INDateComponentsRange * string[] * string[] * Intents.INSpeakableString[] -> Intents.INSearchForMessagesIntent

Parâmetros

recipients
INPerson[]

A ser adicionado.

Esse parâmetro pode ser null.

senders
INPerson[]

A ser adicionado.

Esse parâmetro pode ser null.

searchTerms
String[]

A ser adicionado.

Esse parâmetro pode ser null.

dateTimeRange
INDateComponentsRange

A ser adicionado.

Esse parâmetro pode ser null.

identifiers
String[]

A ser adicionado.

Esse parâmetro pode ser null.

notificationIdentifiers
String[]

A ser adicionado.

Esse parâmetro pode ser null.

speakableGroupNames
INSpeakableString[]

A ser adicionado.

Esse parâmetro pode ser null.

Atributos

Aplica-se a

INSearchForMessagesIntent(INPerson[], INPerson[], String[], INMessageAttributeOptions, INDateComponentsRange, String[], String[], String[])

Os desenvolvedores não devem usar esse construtor preterido. Os desenvolvedores devem usar '.ctor (INPerson [], INPerson [], string [], INMessageAttributeOptions, INDateComponentsRange, string [], string [], INSpeakableString [])' em vez disso.

[Foundation.Export("initWithRecipients:senders:searchTerms:attributes:dateTimeRange:identifiers:notificationIdentifiers:groupNames:")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.MacOSX, 10, 13, ObjCRuntime.PlatformArchitecture.None, "Use '.ctor (INPerson [], INPerson [], string [], INMessageAttributeOptions, INDateComponentsRange, string [], string [], INSpeakableString [])' instead.")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.WatchOS, 4, 0, ObjCRuntime.PlatformArchitecture.None, "Use '.ctor (INPerson [], INPerson [], string [], INMessageAttributeOptions, INDateComponentsRange, string [], string [], INSpeakableString [])' instead.")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 11, 0, ObjCRuntime.PlatformArchitecture.None, "Use '.ctor (INPerson [], INPerson [], string [], INMessageAttributeOptions, INDateComponentsRange, string [], string [], INSpeakableString [])' instead.")]
public INSearchForMessagesIntent (Intents.INPerson[] recipients, Intents.INPerson[] senders, string[] searchTerms, Intents.INMessageAttributeOptions attributes, Intents.INDateComponentsRange dateTimeRange, string[] identifiers, string[] notificationIdentifiers, string[] groupNames);
new Intents.INSearchForMessagesIntent : Intents.INPerson[] * Intents.INPerson[] * string[] * Intents.INMessageAttributeOptions * Intents.INDateComponentsRange * string[] * string[] * string[] -> Intents.INSearchForMessagesIntent

Parâmetros

recipients
INPerson[]

A ser adicionado.

Esse parâmetro pode ser null.

senders
INPerson[]

A ser adicionado.

Esse parâmetro pode ser null.

searchTerms
String[]

A ser adicionado.

Esse parâmetro pode ser null.

dateTimeRange
INDateComponentsRange

A ser adicionado.

Esse parâmetro pode ser null.

identifiers
String[]

A ser adicionado.

Esse parâmetro pode ser null.

notificationIdentifiers
String[]

A ser adicionado.

Esse parâmetro pode ser null.

groupNames
String[]

A ser adicionado.

Esse parâmetro pode ser null.

Atributos

Aplica-se a

INSearchForMessagesIntent(INPerson[], INPerson[], String[], INMessageAttributeOptions, INDateComponentsRange, String[], String[], INSpeakableString[], String[])

[Foundation.Export("initWithRecipients:senders:searchTerms:attributes:dateTimeRange:identifiers:notificationIdentifiers:speakableGroupNames:conversationIdentifiers:")]
[ObjCRuntime.DesignatedInitializer]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.WatchOS, 5, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 14, ObjCRuntime.PlatformArchitecture.Arch64, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 12, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public INSearchForMessagesIntent (Intents.INPerson[] recipients, Intents.INPerson[] senders, string[] searchTerms, Intents.INMessageAttributeOptions attributes, Intents.INDateComponentsRange dateTimeRange, string[] identifiers, string[] notificationIdentifiers, Intents.INSpeakableString[] speakableGroupNames, string[] conversationIdentifiers);
new Intents.INSearchForMessagesIntent : Intents.INPerson[] * Intents.INPerson[] * string[] * Intents.INMessageAttributeOptions * Intents.INDateComponentsRange * string[] * string[] * Intents.INSpeakableString[] * string[] -> Intents.INSearchForMessagesIntent

Parâmetros

recipients
INPerson[]
senders
INPerson[]
searchTerms
String[]
dateTimeRange
INDateComponentsRange
identifiers
String[]
notificationIdentifiers
String[]
speakableGroupNames
INSpeakableString[]
conversationIdentifiers
String[]
Atributos

Aplica-se a