UWP 앱에서 Windows 런타임 유형의 .NET 매핑
이 문서에서는 관리 코드로 작성된 UWP(유니버설 Windows 플랫폼) 앱에서 .NET이 WinRT(Windows 런타임) 형식과 .NET 형식 간에 만드는 매핑을 나열합니다. 이러한 앱에서 Visual Studio IntelliSense는 WinRT 유형 대신 .NET 유형을 표시합니다. 예를 들어 WinRT 메서드가 IVector<string> 형식의 매개 변수를 사용하는 경우 IntelliSense가 IList<string> 형식의 매개 변수를 표시합니다. 마찬가지로 관리 코드로 작성된 Windows 런타임 구성 요소에서는 멤버 서명에 .NET 형식을 사용합니다. Windows 런타임 메타데이터 내보내기 도구(Winmdexp.exe)가 Windows 런타임 구성 요소를 생성하면 .NET 유형이 해당 WinRT 유형으로 변환됩니다.
WinRT와 .NET 모두에서 네임스페이스 이름과 형식 이름이 동일한 대부분의 형식은 구조(또는 열거형과 같은 구조와 연결된 형식)입니다. WinRT에서 구조체에는 필드 외에 멤버가 없고 .NET이 숨기는 도우미 형식이 필요합니다. 이러한 구조의 .NET 버전에는 숨겨진 도우미 형식의 기능을 제공하는 속성과 메서드가 있습니다.
참고 항목
.NET 5를 대상으로 하고 C#/WinRT를 사용하는 데스크톱 앱의 컨텍스트에서 WinRT와 .NET 유형 간의 매핑 목록은 C#/WinRT에서 WinRT 유형의 .NET 매핑을 참조하세요.
같은 이름 및 네임스페이스로 .NET 형식에 매핑되는 WinRT 형식
.NET 어셈블리 System.ObjectModel.dll에서
네임스페이스 | Type |
---|---|
Windows.UI.Xaml.Input | ICommand |
.NET 어셈블리 System.Runtime.WindowsRuntime.dll에서
네임스페이스 | Type |
---|---|
Windows.Foundation | Point |
Windows.Foundation | Rect |
Windows.Foundation | 크기 |
Windows.UI | Color |
.NET 어셈블리 System.Runtime.WindowsRuntime.UI.Xaml.dll에서
네임스페이스 | Type |
---|---|
Windows.UI.Xaml | CornerRadius |
Windows.UI.Xaml | 기간 |
Windows.UI.Xaml | DurationType |
Windows.UI.Xaml | GridLength |
Windows.UI.Xaml | GridUnitType |
Windows.UI.Xaml | 두께 |
Windows.UI.Xaml.Controls.Primitives | GeneratorPosition |
Windows.UI.Xaml.Media | 행렬 |
Windows.UI.Xaml.Media.Animation | KeyTime |
Windows.UI.Xaml.Media.Animation | RepeatBehavior |
Windows.UI.Xaml.Media.Animation | RepeatBehaviorType |
Windows.UI.Xaml.Media.Media3D | Matrix3D |
다른 이름 및/또는 네임스페이스로 .NET 형식에 매핑되는 WinRT 형식
.NET 어셈블리 System.ObjectModel.dll에서
WinRT 형식/네임스페이스 | .NET 형식/네임스페이스 |
---|---|
INotifyCollectionChanged (Windows.UI.Xaml.Interop) | INotifyCollectionChanged (System.Collections.Specialized) |
NotifyCollectionChangedEventHandler (Windows.UI.Xaml.Interop) | NotifyCollectionChangedEventHandler (System.Collections.Specialized) |
NotifyCollectionChangedEventArgs (Windows.UI.Xaml.Interop) | NotifyCollectionChangedEventArgs (System.Collections.Specialized) |
NotifyCollectionChangedAction (Windows.UI.Xaml.Interop) | NotifyCollectionChangedAction (System.Collections.Specialized) |
INotifyPropertyChanged (Windows.UI.Xaml.Data) | INotifyPropertyChanged (System.ComponentModel) |
PropertyChangedEventHandler (Windows.UI.Xaml.Data) | PropertyChangedEventHandler (System.ComponentModel) |
PropertyChangedEventArgs (Windows.UI.Xaml.Data) | PropertyChangedEventArgs (System.ComponentModel) |
.NET 어셈블리 System.Runtime.dll에서
WinRT 형식/네임스페이스 | .NET 형식/네임스페이스 |
---|---|
AttributeUsageAttribute (Windows.Foundation.Metadata) | AttributeUsageAttribute (System) |
AttributeTargets (Windows.Foundation.Metadata) | AttributeTargets (System) |
DateTime (Windows.Foundation) | DateTimeOffset (System) |
EventHandler<T> (Windows.Foundation) | EventHandler<T> (System) |
HResult (Windows.Foundation) | Exception (System) |
IReference<T> (Windows.Foundation) | Nullable<T> (System) |
TimeSpan (Windows.Foundation) | TimeSpan (System) |
Uri (Windows.Foundation) | Uri (System) |
IClosable (Windows.Foundation) | IDisposable (System) |
IIterable<T> (Windows.Foundation.Collections) | IEnumerable<T> (System.Collections.Generic) |
IVector<T> (Windows.Foundation.Collections) | IList<T> (System.Collections.Generic) |
IVectorView<T> (Windows.Foundation.Collections) | IReadOnlyList<T> (System.Collections.Generic) |
IMap<K,V> (Windows.Foundation.Collections) | IDictionary<TKey,TValue> (System.Collections.Generic) |
IMapView<K,V> (Windows.Foundation.Collections) | IReadOnlyDictionary<TKey,TValue> (System.Collections.Generic) |
IKeyValuePair<K,V> (Windows.Foundation.Collections) | KeyValuePair<TKey,TValue> (System.Collections.Generic) |
IBindableIterable (Windows.UI.Xaml.Interop) | IEnumerable (System.Collections) |
IBindableVector (Windows.UI.Xaml.Interop) | IList (System.Collections) |
TypeName (Windows.UI.Xaml.Interop) | Type (System) |
.NET 어셈블리 System.Runtime.InteropServices.WindowsRuntime.dll에서
WinRT 형식/네임스페이스 | .NET 형식/네임스페이스 |
---|---|
EventRegistrationToken (Windows.Foundation) | EventRegistrationToken (System.Runtime.InteropServices.WindowsRuntime) |
관련 항목
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기