Class NonSerializable<TValue>
Represents a non-serializable value that implements the IPropertyBagValue interface.
public sealed class NonSerializable<TValue> : IPropertyBagValue, IEquatable<IPropertyBagValue>
Type Parameters
TValue
- Inheritance
-
NonSerializable<TValue>
- Implements
- Inherited Members
Remarks
This class is used to store any value that should be excluded from being serialized during the PropertyBag<TValue> serialization process. Its main purpose is to transfer data among different objects that do not need this data to be serialized.
Constructors
NonSerializable(TValue)
Represents a non-serializable value that implements the IPropertyBagValue interface.
public NonSerializable(TValue value)
Parameters
value
TValue
Remarks
This class is used to store any value that should be excluded from being serialized during the PropertyBag<TValue> serialization process. Its main purpose is to transfer data among different objects that do not need this data to be serialized.
Properties
Value
Gets the value of the non-serializable property bag value.
public TValue Value { get; init; }
Property Value
- TValue
The value of the non-serializable property bag value.
Methods
Equals(object?)
Determines whether the current Error object is equal to a specified object.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
- bool
true if the current object and obj are both Error objects and have the same value; otherwise, false.
Equals(IPropertyBagValue?)
Determines whether the current NonSerializable object is equal to another NonSerializable object.
public bool Equals(IPropertyBagValue? other)
Parameters
other
IPropertyBagValueThe NonSerializable object to compare with the current object.
Returns
- bool
true
if the current object and other have the same value; otherwise,false
.
GetHashCode()
Returns the hash code for the current Error object.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer hash code.