7 [AttributeUsage(AttributeTargets.Property)]
10 private readonly
object _knownDefault;
11 private readonly
bool _hasKnownDefault;
24 throw new NotSupportedException(
25 "This attribute has no known default value that applies to all objects.");
40 _knownDefault = defaultValue;
41 _hasKnownDefault =
true;
49 _hasKnownDefault = hasKnownDefault;
58 return _hasKnownDefault;
67 throw new NotSupportedException(
"This attribute has no known default value.");
Indicates that the property, if left null, will have a default value generated and filled in by the s...
ServerHasDefault(bool hasKnownDefault)
Constructor that allows the derived class to specify whether it supplies a known default value for al...
virtual object GetDefaultValue(object owner)
Returns the expected default value for the property based on the owner.
ServerHasDefault(object defaultValue)
Attribute indicates that if left null, the server will supply the specified default value for this pr...
virtual object DefaultValue
Indicates whether this attribute specifies an expected default value that the server is known to retu...
virtual bool HasKnownDefault
Indicates whether this attribute specifies an expected default value that the server is known to retu...
virtual bool HasDefaultValue(object owner)
Returns whether there exists an expected default value for the property based on the specified owner.
ServerHasDefault()
Attribute indicates that if left null, the server will supply a default value for this property (the ...