Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Method: TElement FormatWithType(TElement, string, bool)

  • Declared in: RT.Serialization.IClassifyFormat<TElement>
  • Interface method
  • Abstract

Declaration

public TElement FormatWithType(
    TElement element,
    string type,
    bool isFullType
)

Summary

Converts an existing element (which may represent, for example, an object, list or dictionary) into one that additionally knows its type.

Parameters

TElementelement The original element to be converted.
stringtype A string that identifies the type of the object.
boolisFullType A value indicating whether this is a fully-qualified type name or not.

Returns

A representation of the original element, which additionally encodes the type.

Remarks

The returned element should be recognized by IClassifyFormat<TElement>.GetType(TElement, out bool) as well as all the other methods that would have also recognized the original element.