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 System.Diagnostics.CodeAnalysis.SuppressMessageAttribute:
[WritableArray, SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
Inheritance
System.Object
System.Attribute
WritableArrayAttribute
Inherited Members
System.Attribute.Equals(System.Object)
System.Attribute.GetHashCode()
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Lucene.Net.Support
Assembly: Lucene.Net.dll
Syntax
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, AllowMultiple = false)]
public class WritableArrayAttribute : Attribute