Show / Hide Table of Contents

    Class WritableArrayAttribute

    Attribute to define a property or method as a writable array. Per MSDN, members should never return arrays because the array contents can be updated, which makes the behavior confusing. However, Lucene's design sometimes relies on other classes to update arrays - both as array fields and as methods that return arrays. So, in these cases we are making an exception to this rule and marking them with WritableArrayAttribute to signify that this is intentional.

    For properties that violate this rule, you should also use the :

    [WritableArray, SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
    Inheritance
    System.Object
    WritableArrayAttribute
    Namespace: Lucene.Net.Support
    Assembly: Lucene.Net.dll
    Syntax
    public class WritableArrayAttribute : Attribute
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)