You've already forked linux-packaging-mono
Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
parent
a569aebcfd
commit
e79aa3c0ed
@@ -0,0 +1,84 @@
|
||||
|
||||
namespace System.ComponentModel {
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Security.Permissions;
|
||||
|
||||
/// <devdoc>
|
||||
/// Specifies that a object has no sub properties that are editable.
|
||||
/// </devdoc>
|
||||
[AttributeUsage(AttributeTargets.All)]
|
||||
public sealed class ImmutableObjectAttribute : Attribute {
|
||||
|
||||
/// <devdoc>
|
||||
/// Specifies that a object has no sub properties that are editable.
|
||||
///
|
||||
/// This is usually used in the properties window to determine if an expandable object
|
||||
/// should be rendered as read-only.
|
||||
/// </devdoc>
|
||||
public static readonly ImmutableObjectAttribute Yes = new ImmutableObjectAttribute(true);
|
||||
|
||||
/// <devdoc>
|
||||
/// Specifies that a object has at least one editable sub-property.
|
||||
///
|
||||
/// This is usually used in the properties window to determine if an expandable object
|
||||
/// should be rendered as read-only.
|
||||
/// </devdoc>
|
||||
public static readonly ImmutableObjectAttribute No = new ImmutableObjectAttribute(false);
|
||||
|
||||
|
||||
/// <devdoc>
|
||||
/// Defaults to ImmutableObjectAttribute.No
|
||||
/// </devdoc>
|
||||
public static readonly ImmutableObjectAttribute Default = No;
|
||||
|
||||
private bool immutable = true;
|
||||
|
||||
/// <devdoc>
|
||||
/// Constructs an ImmutableObjectAttribute object.
|
||||
///
|
||||
/// </devdoc>
|
||||
public ImmutableObjectAttribute(bool immutable) {
|
||||
this.immutable = immutable;
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>[To be supplied.]</para>
|
||||
/// </devdoc>
|
||||
public bool Immutable {
|
||||
get {
|
||||
return immutable;
|
||||
}
|
||||
}
|
||||
|
||||
/// <internalonly/>
|
||||
/// <devdoc>
|
||||
/// </devdoc>
|
||||
public override bool Equals(object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
|
||||
ImmutableObjectAttribute other = obj as ImmutableObjectAttribute;
|
||||
return other != null && other.Immutable == this.immutable;
|
||||
}
|
||||
|
||||
/// <devdoc>
|
||||
/// <para>
|
||||
/// Returns the hashcode for this object.
|
||||
/// </para>
|
||||
/// </devdoc>
|
||||
public override int GetHashCode() {
|
||||
return base.GetHashCode();
|
||||
}
|
||||
|
||||
/// <internalonly/>
|
||||
/// <devdoc>
|
||||
/// </devdoc>
|
||||
public override bool IsDefaultAttribute() {
|
||||
return (this.Equals(Default));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user