C# Class System.ComponentModel.Design.Serialization.ContextStack

Datei anzeigen Open project: dotnet/corefx Class Usage Examples

Public Methods

Method Description
Append ( object context ) : void

Appends an object to the end of the stack, rather than pushing it onto the top of the stack. This method allows a serializer to communicate with other serializers by adding contextual data that does not have to be popped in order. There is no way to remove an object that was appended to the end of the stack without popping all other objects.

Pop ( ) : object

Pops the current object off of the stack, returning its value.

Push ( object context ) : void

Pushes the given object onto the stack.

this ( Type type ) : object

Retrieves the first object on the stack that inherits from or implements the given type, or null if no object on the stack implements the type.

this ( int level ) : object

Retrieves the object on the stack at the given level, or null if no object exists at that level.

Method Details

Append() public method

Appends an object to the end of the stack, rather than pushing it onto the top of the stack. This method allows a serializer to communicate with other serializers by adding contextual data that does not have to be popped in order. There is no way to remove an object that was appended to the end of the stack without popping all other objects.
public Append ( object context ) : void
context object
return void

Pop() public method

Pops the current object off of the stack, returning its value.
public Pop ( ) : object
return object

Push() public method

Pushes the given object onto the stack.
public Push ( object context ) : void
context object
return void

this() public method

Retrieves the first object on the stack that inherits from or implements the given type, or null if no object on the stack implements the type.
public this ( Type type ) : object
type Type
return object

this() public method

Retrieves the object on the stack at the given level, or null if no object exists at that level.
public this ( int level ) : object
level int
return object