Show / Hide Table of Contents

Class Unknown

This type is used during deserialization if an unknown type is encountered.

Inheritance
object
DynamicObject
Unknown
Implements
IDynamicMetaObjectProvider
ISerializable
DynamicObject.GetMetaObject(Expression)
DynamicObject.TryBinaryOperation(BinaryOperationBinder, object, out object)
DynamicObject.TryConvert(ConvertBinder, out object)
DynamicObject.TryCreateInstance(CreateInstanceBinder, object[], out object)
DynamicObject.TryDeleteIndex(DeleteIndexBinder, object[])
DynamicObject.TryDeleteMember(DeleteMemberBinder)
DynamicObject.TryGetIndex(GetIndexBinder, object[], out object)
DynamicObject.TryInvoke(InvokeBinder, object[], out object)
DynamicObject.TryInvokeMember(InvokeMemberBinder, object[], out object)
DynamicObject.TrySetIndex(SetIndexBinder, object[], object)
DynamicObject.TryUnaryOperation(UnaryOperationBinder, out object)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Sartorius.SAF.Serialization
Assembly: Sartorius.SAF.dll
Syntax
[Serializable]
public class Unknown : DynamicObject, IDynamicMetaObjectProvider, ISerializable

Constructors

View Source

Unknown()

Creates a new instance of the Unknown class.

Declaration
public Unknown()
View Source

Unknown(SerializationInfo, StreamingContext)

Initializes a new instance of the Unknown class.

Declaration
protected Unknown(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
SerializationInfo info

The SerializationInfo that holds the serialized object data about the exception being thrown.

StreamingContext context

The StreamingContext that contains contextual information about the source or destination.

Methods

View Source

GetDynamicMemberNames()

Returns the enumeration of all dynamic member names.

Declaration
public override IEnumerable<string> GetDynamicMemberNames()
Returns
Type Description
IEnumerable<string>

A sequence that contains dynamic member names.

Overrides
DynamicObject.GetDynamicMemberNames()
View Source

GetObjectData(SerializationInfo, StreamingContext)

Populates a SerializationInfo with the data needed to serialize the target object.

Declaration
public void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
SerializationInfo info

The SerializationInfo to populate with data.

StreamingContext context

The destination (see StreamingContext) for this serialization.

Exceptions
Type Condition
SecurityException

The caller does not have the required permission.

View Source

TryGetMember(GetMemberBinder, out object)

Provides the implementation for operations that get member values. Classes derived from the DynamicObject class can override this method to specify dynamic behavior for operations such as getting a value for a property.

Declaration
public override bool TryGetMember(GetMemberBinder binder, out object result)
Parameters
Type Name Description
GetMemberBinder binder

Provides information about the object that called the dynamic operation. The binder.Name property provides the name of the member on which the dynamic operation is performed. For example, for the Console.WriteLine(sampleObject.SampleProperty) statement, where sampleObject is an instance of the class derived from the DynamicObject class, binder.Name returns "SampleProperty". The binder.IgnoreCase property specifies whether the member name is case-sensitive.

object result

The result of the get operation. For example, if the method is called for a property, you can assign the property value to result.

Returns
Type Description
bool

true if the operation is successful; otherwise, false. If this method returns false, the run-time binder of the language determines the behavior. (In most cases, a run-time exception is thrown.)

Overrides
DynamicObject.TryGetMember(GetMemberBinder, out object)
View Source

TrySetMember(SetMemberBinder, object)

Provides the implementation for operations that set member values. Classes derived from the DynamicObject class can override this method to specify dynamic behavior for operations such as setting a value for a property.

Declaration
public override bool TrySetMember(SetMemberBinder binder, object value)
Parameters
Type Name Description
SetMemberBinder binder

Provides information about the object that called the dynamic operation. The binder.Name property provides the name of the member to which the value is being assigned. For example, for the statement sampleObject.SampleProperty = "Test", where sampleObject is an instance of the class derived from the DynamicObject class, binder.Name returns "SampleProperty". The binder.IgnoreCase property specifies whether the member name is case-sensitive.

object value

The value to set to the member. For example, for sampleObject.SampleProperty = "Test", where sampleObject is an instance of the class derived from the DynamicObject class, the value is "Test".

Returns
Type Description
bool

true if the operation is successful; otherwise, false. If this method returns false, the run-time binder of the language determines the behavior. (In most cases, a language-specific run-time exception is thrown.)

Overrides
DynamicObject.TrySetMember(SetMemberBinder, object)

Implements

IDynamicMetaObjectProvider
ISerializable

Extension Methods

CollectionExtensions.AddRange<T, TCollection>(TCollection, IEnumerable<T>)
SerializableObjectCloneExtension.Clone<T>(T)
  • View Source
Back to top Generated by DocFX