Search Results for

    Show / Hide Table of Contents

    Class ExplicitAttribute

    An attribute that prevents the decorated class from being included in Realm's default schema.

    Inheritance
    Object
    Attribute
    ExplicitAttribute
    Namespace: Realms
    Assembly: Realm.dll
    Syntax
    [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class, AllowMultiple = false)]
    public class ExplicitAttribute : Attribute
    Remarks

    If applied at the assembly level, then all classes in that assembly will be considered explicit and will not be added to the default schema. To include explicit classes in a Realm's schema, you should include them in the ObjectClasses array:

    var config = new RealmConfiguration
    {
        ObjectClasses = new[] { typeof(MyExplicitClass) }
    };
    
    var realm = Realm.GetInstance(config);
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2020 Realm
    Generated by DocFX