MdmAlert Classe
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Fornisce funzionalità per configurare i dati inviati al server di gestione dei dispositivi mobili.
public ref class MdmAlert sealed
/// [Windows.Foundation.Metadata.Activatable(262144, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 262144)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class MdmAlert final
/// [Windows.Foundation.Metadata.Activatable(262144, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 262144)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
class MdmAlert final
[Windows.Foundation.Metadata.Activatable(262144, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 262144)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class MdmAlert
[Windows.Foundation.Metadata.Activatable(262144, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 262144)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
public sealed class MdmAlert
function MdmAlert()
Public NotInheritable Class MdmAlert
- Ereditarietà
- Attributi
Requisiti Windows
Famiglia di dispositivi |
Windows 10 Creators Update (è stato introdotto in 10.0.15063.0)
|
API contract |
Windows.Foundation.UniversalApiContract (è stato introdotto in v4.0)
|
Esempio
void MultipleMdmAlerts()
{
Log::Comment(WEX::Common::String().Format(L"Attempt to start syncing with two Alerts..."));
Log::Comment(WEX::Common::String().Format(L"Fill in all members of first alert."));
Windows::Management::MdmAlert myAlert;
// This format is mandated by the OMA-DM standards for alerts.
myAlert.Type(L"Reversed-Domain-Name:org.domain.samplealert");
myAlert.Format(Windows::Management::MdmAlertDataType::String);
myAlert.Data(L"alert-specific content.");
myAlert.Mark(Windows::Management::MdmAlertMark::Critical);
// Source and Target URIs are relative to the device, and typically in the MDM namespace.
// Here, they indicate that an app was installed at "InstallSample", and the resulting
// inventory location of the app is at "Results".
myAlert.Source(L"./Vendor/MSFT/AppManagement/InstallSample");
myAlert.Target(L"./Vendor/MSFT/AppManagement/Results");
Windows::Management::MdmAlert myAlertNext;
myAlertNext.Type(L"Reversed-Domain-Name:org.domain.nextalert");
std::vector<Windows::Management::MdmAlert> alertList;
alertList.push_back(myAlert);
alertList.push_back(myAlertNext);
}
void MultipleMdmAlerts()
{
Log::Comment(WEX::Common::String().Format(L"Attempt to start syncing with two Alerts..."));
Log::Comment(WEX::Common::String().Format(L"Fill in all members of first alert."));
Windows::Management::MdmAlert^ myAlert = ref new Windows::Management::MdmAlert();
// This format is mandated by the OMA-DM standards for alerts.
myAlert->Type = ref new Platform::String(L"Reversed-Domain-Name:org.domain.samplealert");
myAlert->Format = Windows::Management::MdmAlertDataType::String;
myAlert->Data = ref new Platform::String(L"alert-specific content.");
myAlert->Mark = Windows::Management::MdmAlertMark::Critical;
// Source and Target URIs are relative to the device and typically in the MDM namespace.
// Here, they indicate that an app was installed at "InstallSample" and the resulting
// inventory location of the app is at "Results".
myAlert->Source = ref new Platform::String(L"./Vendor/MSFT/AppManagement/InstallSample");
myAlert->Target = ref new Platform::String(L"./Vendor/MSFT/AppManagement/Results");
Windows::Management::MdmAlert^ myAlertNext = ref new Windows::Management::MdmAlert();
myAlertNext->Type = ref new Platform::String(L"Reversed-Domain-Name:org.domain.nextalert");
Windows::Foundation::Collections::IVector<MdmAlert^>^ alertList = ref new Platform::Collections::Vector<MdmAlert^>();
alertList->Append(myAlert);
alertList->Append(myAlertNext);
}
Commenti
Esistono due usi di MdmAlert:
- Prima di avviare mdmSession: creare un avviso e personalizzare i parametri di avviso.
- Dopo aver avviato mdmSession: eseguire una query sulla sessione per i risultati dell'avviso, incluso lo stato inviato dal server per l'avviso.
Nota: l'avviso generico (1226) è più comune.
Costruttori
MdmAlert() |
Avviso MDM con campi dati personalizzati. |
Proprietà
Data |
Dati MDM personalizzati inviati al server. |
Format |
Formato dati dell'avviso MDM. |
Mark |
Priorità o criticità dell'avviso. |
Source |
Percorso URI locale all'origine dell'avviso. |
Status |
Codice di stato di sola lettura inviato dal server in risposta all'avviso. |
Target |
Percorso URI locale alla posizione di inventario dell'applicazione. |
Type |
Tipo dell'avviso. Questo è anche l'ID avviso. |