// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; using System.ComponentModel; namespace CommunityToolkit.Mvvm.ComponentModel; /// /// An attribute that indicates that a given type should have all the members from /// generated into it, as well as the and /// interfaces. This can be useful when you want the same functionality from into a class /// that already inherits from another one (since C# doesn't support multiple inheritance). This attribute will trigger /// the source generator to just create the same APIs directly into the decorated class. /// /// This attribute can be used as follows: /// /// [ObservableObject] /// partial class MyViewModel : SomeOtherClass /// { /// // Other members here... /// } /// /// /// And with this, the same APIs from will be available on this type as well. /// [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] public sealed class ObservableObjectAttribute : Attribute { }