Mapeamentos do .NET Framework de tipos do Tempo de Execução do Windows

A tabela a seguir lista os mapeamentos que o .NET Framework faz entre os tipos do Tempo de Execução do Windows e tipos do .NET Framework. Em um aplicativo Windows Store gravado com código gerenciado, o IntelliSense mostra o tipo do .NET Framework em vez do tipo do Tempo de Execução do Windows. Por exemplo, se um método do Tempo de Execução do Windows usar um parâmetro do tipo IVector<string>, o IntelliSense mostrará um parâmetro do tipo IList<string>. De forma similar, em um componente do Tempo de Execução do Windows gravado em código gerenciado, é usado o tipo do .NET Framework em assinaturas de membros. Quando a Ferramenta de Exportação de Metadados do Tempo de Execução do Windows (Winmdexp.exe) gera o componente do Tempo de Execução do Windows, o tipo do .NET Framework torna-se o tipo correspondente do Tempo de Execução do Windows.

Os tipos que têm o mesmo nome de namespace e o nome de tipo no Tempo de Execução do Windows e no .NET Framework, na sua maioria, são estruturas (ou tipos associados a estruturas, como enumerações). No Tempo de Execução do Windows, as estruturas não têm membros que não sejam campos e exigem tipos auxiliares, ocultados pelo .NET Framework. As versões do .NET Framework dessas estruturas têm propriedades e métodos que fornecem a funcionalidade dos tipos auxiliares ocultos.

Para obter mais informações sobre a maneira como o .NET Framework usa metadados do Windows para simplificar a programação com o Tempo de Execução do Windows, baixe o CLR e o Tempo de Execução do Windows o white paper do Centro de Desenvolvimento do Windows.

Tabela 1: Os tipos do Tempo de Execução do Windows que mapeiam para o .NET Framework com um nome e/ou um namespace diferentes.

Tipo/namespace do Tempo de Execução do Windows

Tipo/namespace do .NET Framework

Assembly do .NET Framework

AttributeUsageAttribute (Windows.Foundation.Metadata)

AttributeUsageAttribute (System)

System.Runtime.dll

AttributeTargets (Windows.Foundation.Metadata)

AttributeTargets (System)

System.Runtime.dll

DateTime (Windows.Foundation)

DateTimeOffset (System)

System.Runtime.dll

EventHandler<T> (Windows.Foundation)

EventHandler<T> (System)

System.Runtime.dll

EventRegistrationToken (Windows.Foundation)

EventRegistrationToken (System.Runtime.InteropServices.WindowsRuntime)

System.Runtime.InteropServices.WindowsRuntime.dll

HResult (Windows.Foundation)

Exception (System)

System.Runtime.dll

IReference<T> (Windows.Foundation)

Nullable<T> (System)

System.Runtime.dll

TimeSpan (Windows.Foundation)

TimeSpan (System)

System.Runtime.dll

Uri (Windows.Foundation)

Uri (System)

System.Runtime.dll

IClosable (Windows.Foundation)

IDisposable (System)

System.Runtime.dll

IIterable<T> (Windows.Foundation.Collections)

IEnumerable<T> (System.Collections.Generic)

System.Runtime.dll

IVector<T> (Windows.Foundation.Collections)

IList<T> (System.Collections.Generic)

System.Runtime.dll

IVectorView<T> (Windows.Foundation.Collections)

IReadOnlyList<T> (System.Collections.Generic)

System.Runtime.dll

IMap<K,V> (Windows.Foundation.Collections)

IDictionary<TKey,TValue> (System.Collections.Generic)

System.Runtime.dll

IMapView<K,V> (Windows.Foundation.Collections)

IReadOnlyDictionary<TKey,TValue> (System.Collections.Generic)

System.Runtime.dll

IKeyValuePair<K,V> (Windows.Foundation.Collections)

KeyValuePair<TKey,TValue> (System.Collections.Generic)

System.Runtime.dll

IBindableIterable (Windows.UI.Xaml.Interop)

IEnumerable (System.Collections)

System.Runtime.dll

IBindableVector (Windows.UI.Xaml.Interop)

IList (System.Collections)

System.Runtime.dll

INotifyCollectionChanged (Windows.UI.Xaml.Interop)

INotifyCollectionChanged (System.Collections.Specialized)

System.ObjectModel.dll

NotifyCollectionChangedEventHandler (Windows.UI.Xaml.Interop)

NotifyCollectionChangedEventHandler (System.Collections.Specialized)

System.ObjectModel.dll

NotifyCollectionChangedEventArgs (Windows.UI.Xaml.Interop)

NotifyCollectionChangedEventArgs (System.Collections.Specialized)

System.ObjectModel.dll

NotifyCollectionChangedAction (Windows.UI.Xaml.Interop)

NotifyCollectionChangedAction (System.Collections.Specialized)

System.ObjectModel.dll

INotifyPropertyChanged (Windows.UI.Xaml.Data)

INotifyPropertyChanged (System.ComponentModel)

System.ObjectModel.dll

PropertyChangedEventHandler (Windows.UI.Xaml.Data)

PropertyChangedEventHandler (System.ComponentModel)

System.ObjectModel.dll

PropertyChangedEventArgs (Windows.UI.Xaml.Data)

PropertyChangedEventArgs (System.ComponentModel)

System.ObjectModel.dll

TypeName (Windows.UI.Xaml.Interop)

Type (System)

System.Runtime.dll

    

Tabela 2: Os tipos do Tempo de Execução do Windows que mapeiam para o .NET Framework com o mesmo nome e namespace.

Namespace

Tipo

Assembly do .NET Framework

Windows.UI

Color

System.Runtime.WindowsRuntime.dll

Windows.Foundation

Point

System.Runtime.WindowsRuntime.dll

Windows.Foundation

Rect

System.Runtime.WindowsRuntime.dll

Windows.Foundation

Size

System.Runtime.WindowsRuntime.dll

Windows.UI.Xaml.Input

ICommand

System.ObjectModel.dll

Windows.UI.Xaml

CornerRadius

System.Runtime.WindowsRuntime.UI.Xaml.dll

Windows.UI.Xaml

Duration

System.Runtime.WindowsRuntime.UI.Xaml.dll

Windows.UI.Xaml

DurationType

System.Runtime.WindowsRuntime.UI.Xaml.dll

Windows.UI.Xaml

GridLength

System.Runtime.WindowsRuntime.UI.Xaml.dll

Windows.UI.Xaml

GridUnitType

System.Runtime.WindowsRuntime.UI.Xaml.dll

Windows.UI.Xaml

Thickness

System.Runtime.WindowsRuntime.UI.Xaml.dll

Windows.UI.Xaml.Controls.Primitives

GeneratorPosition

System.Runtime.WindowsRuntime.UI.Xaml.dll

Windows.UI.Xaml.Media

Matrix

System.Runtime.WindowsRuntime.UI.Xaml.dll

Windows.UI.Xaml.Media.Animation

KeyTime

System.Runtime.WindowsRuntime.UI.Xaml.dll

Windows.UI.Xaml.Media.Animation

RepeatBehavior

System.Runtime.WindowsRuntime.UI.Xaml.dll

Windows.UI.Xaml.Media.Animation

RepeatBehaviorType

System.Runtime.WindowsRuntime.UI.Xaml.dll

Windows.UI.Xaml.Media.Media3D

Matrix3D

System.Runtime.WindowsRuntime.UI.Xaml.dll

Consulte também

Conceitos

Criando componentes do Tempo de Execução do Windows em C# e Visual Basic