다음을 통해 공유


AnalyticsInfo.GetSystemPropertiesAsync(IIterable<String>) 메서드

정의

요청된 시스템 특성을 비동기적으로 검색합니다.

public:
 static IAsyncOperation<IMapView<Platform::String ^, Platform::String ^> ^> ^ GetSystemPropertiesAsync(IIterable<Platform::String ^> ^ attributeNames);
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<IMapView<winrt::hstring, winrt::hstring const&>> GetSystemPropertiesAsync(IIterable<winrt::hstring> const& attributeNames);
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<IReadOnlyDictionary<string,string>> GetSystemPropertiesAsync(IEnumerable<string> attributeNames);
function getSystemPropertiesAsync(attributeNames)
Public Shared Function GetSystemPropertiesAsync (attributeNames As IEnumerable(Of String)) As IAsyncOperation(Of IReadOnlyDictionary(Of String, String))

매개 변수

attributeNames

IIterable<String>

IEnumerable<String>

IIterable<Platform::String>

IIterable<winrt::hstring>

검색할 시스템 특성을 포함하는 문자열의 IIterable 목록입니다.

반환

IAsyncOperation<IMapView<String,String>>

IAsyncOperation<IReadOnlyDictionary<String,String>>

IAsyncOperation<IMapView<Platform::String,Platform::String>>

IAsyncOperation<IMapView<winrt::hstring,winrt::hstring>>

작업이 완료되었음을 나타내고 요청된 특성이 키/값 쌍인 IMapView 개체를 포함하는 IAsyncOperation 개체를 반환합니다.

특성

Windows 요구 사항

디바이스 패밀리
Windows 10, version 1803 (10.0.17134.0에서 도입되었습니다.)
API contract
Windows.Foundation.UniversalApiContract (v6.0에서 도입되었습니다.)

예제

using Windows.System.Profile;

// ...

var attrNames = new List<string>({"DeviceFamily", "OSVersionFull", "FlightRing"});
var attrData = AnalyticsInfo.GetSystemPropertiesAsync(attrNames).AsTask().GetAwaiter().GetResult();

// The map can be serialized and sent to a backend service for analytics or targeting 
foreach (KeyValuePair<string, string> attr in attrData) 
{ 
    Console.WriteLine($"{attr.Key}={attr.Value}");
}

설명

attributeNames 매개 변수에 대해 지원되는 값은 무한할 수 있습니다. 에 연결하고 임의 값을 노출할 수 있는 많은 공급자가 있습니다. 지원될 가능성이 높은 몇 가지 알려진 특성이 있습니다. 대부분의 경우 대/소문자를 구분합니다.

  • AppVer
  • DeviceFamily
  • FlightRing
  • OSVersionFull

이 방법의 의도는 분석에만 이 정보를 사용하고 클라이언트의 특정 값에 의존하지 않는 것입니다. 이러한 값에 대한 지원은 시간이 지남에 따라 변경됩니다.

적용 대상