Class PortableObjectDocument
  
  Represents an graph of arbitrary CLR objects as a graph of well known POD-objects which are based on primitive-only types.
This class acts as a Document-Object-Model container that hosts comlex CLR types that may change their structure
but need to be deserialized even if deserialization is partial / requires transform
 
  
  
    Inheritance
    System.Object
    PortableObjectDocument
   
  
    Inherited Members
    
      System.Object.Equals(System.Object)
    
    
      System.Object.Equals(System.Object, System.Object)
    
    
      System.Object.GetHashCode()
    
    
      System.Object.GetType()
    
    
      System.Object.MemberwiseClone()
    
    
      System.Object.ReferenceEquals(System.Object, System.Object)
    
    
      System.Object.ToString()
    
   
  
  Assembly: NFX.dll
  Syntax
  
    [Serializable]
public sealed class PortableObjectDocument
   
  Constructors
  
  
  
  
  PortableObjectDocument(Object, Nullable<DateTime>, String)
  Creates a new instance of object document from the graph of arbitrary CLR objects serializing them into well-known POD object types
 
  
  Declaration
  
    public PortableObjectDocument(object graph, DateTime? creationDate = default (DateTime? ), string notes = null)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Object | 
        graph | 
         | 
      
      
        | System.Nullable<System.DateTime> | 
        creationDate | 
         | 
      
      
        | System.String | 
        notes | 
         | 
      
    
  
  Properties
  
  
  
  
  
  Returns build information for framework that contains the PortableObjectDocuemnt type
 
  
  Declaration
  
    public BuildInformation BuildInformation { get; }
   
  Property Value
  
  
  
  
  CreationDate
  Returns timestamp when this doc was created
 
  
  Declaration
  
    public DateTime CreationDate { get; }
   
  Property Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.DateTime | 
         | 
      
    
  
  
  
  
  
  Returns meta types that this document contains
 
  
  Declaration
  
    public IEnumerable<MetaType> MetaTypes { get; }
   
  Property Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Collections.Generic.IEnumerable<MetaType> | 
         | 
      
    
  
  
  
  
  Notes
  Returns notes supplied when document was created
 
  
  Declaration
  
    public string Notes { get; }
   
  Property Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.String | 
         | 
      
    
  
  
  
  
  Root
  Returns graph root potable object that this document represents, not a native object
 
  
  Declaration
  
    public object Root { get; }
   
  Property Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Object | 
         | 
      
    
  
  
  
  
  
  Returns graph root object meta type index, if root is null them MetaCompositeType(Object) is returned
 
  
  Declaration
  
    public MetaType RootMetaType { get; }
   
  Property Value
  
  
  
  
  
  Returns graph root object meta type index, if root data is null then 0 is returned which is an index of MetaCompositeType(Object) type
 
  
  Declaration
  
    public int RootMetaTypeIndex { get; }
   
  Property Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Int32 | 
         | 
      
    
  
  Methods
  
  
  
  
  
  Obtains new or existing MetaType instance that represents a Type in this document instance.
If this document instance already has this type registered, then existing MetaType instance is returned, otherwise
the new MetaType instance that represents the supplied CLR Type is created and registered under the document-unique index
 
  
  Declaration
  
    public MetaType GetExistingOrNewMetaType(Type type)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Type | 
        type | 
         | 
      
    
  
  Returns
  
  
  
  
  
  Obtains new or existing index of MetaType that represents a Type in this document instance.
If this document instance already has this type registered, then existing index is returned, otherwise
the new MetaType instance that represents the supplied CLR Type is created and registered under the document-unique index
 
  
  Declaration
  
    public int GetExistingOrNewMetaTypeIndex(Type type)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Type | 
        type | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Int32 | 
         | 
      
    
  
  
  
  
  
  Returns MetaType by index
 
  
  Declaration
  
    public MetaType GetMetaTypeFromIndex(int index)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Int32 | 
        index | 
         | 
      
    
  
  Returns
  
  
  
  
  NativeDataToPortableData(Object)
  Transforms a native value, such as object, primitive, struct etc.. into a value that can be stored in the PortableObjectDocument.
The complex types are stored as CompositeData, primitives are stored as-is (boxed)
 
  
  Declaration
  
    public object NativeDataToPortableData(object data)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Object | 
        data | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Object | 
         | 
      
    
  
  
  
  
  PortableDataToNativeData(ReadingStrategy, Object)
  Transforms a portable data value, such as object, primitive, struct etc.. into a CLR
 
  
  Declaration
  
    public object PortableDataToNativeData(ReadingStrategy strategy, object data)
   
  Parameters
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Object | 
         | 
      
    
  
  
  
  
  ToOriginalObject(ReadingStrategy)
  Deserializes PortableObjectDocument into original graph of arbitrary CLR objects trying to preserve/convert as much data as possible
using optionally supplied strategy
 
  
  Declaration
  
    public object ToOriginalObject(ReadingStrategy strategy = null)
   
  Parameters
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Object | 
         | 
      
    
  
  Extension Methods