C# Class Rhino.Serialize.ScriptableOutputStream

Class ScriptableOutputStream is an ObjectOutputStream used to serialize JavaScript objects and functions.
Class ScriptableOutputStream is an ObjectOutputStream used to serialize JavaScript objects and functions. Note that compiled functions currently cannot be serialized, only interpreted functions. The top-level scope containing the object is not written out, but is instead replaced with another top-level object when the ScriptableInputStream reads in this object. Also, object corresponding to names added to the exclude list are not written out but instead are looked up during deserialization. This approach avoids the creation of duplicate copies of standard objects during deserialization.
Inheritance: Sharpen.ObjectOutputStream
显示文件 Open project: hazzik/Rhino.Net Class Usage Examples

Public Methods

Method Description
AddExcludedName ( string name ) : void

Adds a qualified name to the list of objects to be excluded from serialization.

Adds a qualified name to the list of objects to be excluded from serialization. Names excluded from serialization are looked up in the new scope and replaced upon deserialization.

AddOptionalExcludedName ( string name ) : void

Adds a qualified name to the list of object to be excluded from serialization.

Adds a qualified name to the list of object to be excluded from serialization. Names excluded from serialization are looked up in the new scope and replaced upon deserialization.

ExcludeAllIds ( object ids ) : void
ExcludeStandardObjectNames ( ) : void

Adds the names of the standard objects and their prototypes to the list of excluded names.

Adds the names of the standard objects and their prototypes to the list of excluded names.

HasExcludedName ( string name ) : bool

Returns true if the name is excluded from serialization.

Returns true if the name is excluded from serialization.

RemoveExcludedName ( string name ) : void

Removes a name from the list of names to exclude.

Removes a name from the list of names to exclude.

ScriptableOutputStream ( Stream @out, Scriptable scope ) : System

ScriptableOutputStream constructor.

ScriptableOutputStream constructor. Creates a ScriptableOutputStream for use in serializing JavaScript objects. Calls excludeStandardObjectNames.

Protected Methods

Method Description
ReplaceObject ( object obj ) : object

Private Methods

Method Description
LookupQualifiedName ( Scriptable scope, string qualifiedName ) : object

Method Details

AddExcludedName() public method

Adds a qualified name to the list of objects to be excluded from serialization.
Adds a qualified name to the list of objects to be excluded from serialization. Names excluded from serialization are looked up in the new scope and replaced upon deserialization.
/// if the object is not found or is not /// a /// Rhino.Scriptable /// . ///
public AddExcludedName ( string name ) : void
name string /// a fully qualified name (of the form "a.b.c", where /// "a" must be a property of the top-level object) ///
return void

AddOptionalExcludedName() public method

Adds a qualified name to the list of object to be excluded from serialization.
Adds a qualified name to the list of object to be excluded from serialization. Names excluded from serialization are looked up in the new scope and replaced upon deserialization.
/// if the object is not a /// Rhino.Scriptable /// . ///
public AddOptionalExcludedName ( string name ) : void
name string /// a fully qualified name (of the form "a.b.c", where /// "a" must be a property of the top-level object). The object /// need not exist, in which case the name is ignored. ///
return void

ExcludeAllIds() public method

public ExcludeAllIds ( object ids ) : void
ids object
return void

ExcludeStandardObjectNames() public method

Adds the names of the standard objects and their prototypes to the list of excluded names.
Adds the names of the standard objects and their prototypes to the list of excluded names.
public ExcludeStandardObjectNames ( ) : void
return void

HasExcludedName() public method

Returns true if the name is excluded from serialization.
Returns true if the name is excluded from serialization.
public HasExcludedName ( string name ) : bool
name string
return bool

RemoveExcludedName() public method

Removes a name from the list of names to exclude.
Removes a name from the list of names to exclude.
public RemoveExcludedName ( string name ) : void
name string
return void

ReplaceObject() protected method

protected ReplaceObject ( object obj ) : object
obj object
return object

ScriptableOutputStream() public method

ScriptableOutputStream constructor.
ScriptableOutputStream constructor. Creates a ScriptableOutputStream for use in serializing JavaScript objects. Calls excludeStandardObjectNames.
public ScriptableOutputStream ( Stream @out, Scriptable scope ) : System
@out Stream
scope Scriptable the scope containing the object.
return System