CSLA.NET 6.0.0
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
Csla.Axml.ActivityBase< T, Z > Class Template Reference

CSLA helper to be used in place of the normal Xamarin Android activity that contains a reference to a CSLA ViewModel and a BindingManager. More...

Inheritance diagram for Csla.Axml.ActivityBase< T, Z >:

Protected Member Functions

 ActivityBase (ApplicationContext applicationContext)
 Creates an instance of the type. More...
 
override void OnCreate (Bundle bundle)
 Event that occurs when the activity is created. More...
 
byte[] SerializeModelForParameter ()
 Serializes the ViewModel's model property using the SerializationFormatterFactory.GetFormatter(). More...
 
byte[] SerializeModelForParameter (object model)
 Serialized the provided model using the SerializationFormatterFactory.GetFormatter(). More...
 
object DeserializeFromParameter (byte[] parameter)
 Takes a byte array and uses the MobileFormatter to reconstitute it into a model reference. More...
 

Protected Attributes

viewModel = null
 A reference to the view model. More...
 
BindingManager Bindings = null
 The BindingManager for this Activity. More...
 

Detailed Description

CSLA helper to be used in place of the normal Xamarin Android activity that contains a reference to a CSLA ViewModel and a BindingManager.

Template Parameters
TA type that inherits from the ViewModel.
ZThe type that is defined as used by T.
Type Constraints
T :ViewModel<Z> 

Definition at line 22 of file ActivityBase.cs.

Constructor & Destructor Documentation

◆ ActivityBase()

Csla.Axml.ActivityBase< T, Z >.ActivityBase ( ApplicationContext  applicationContext)
protected

Creates an instance of the type.

Parameters
applicationContext

Definition at line 30 of file ActivityBase.cs.

Member Function Documentation

◆ DeserializeFromParameter()

object Csla.Axml.ActivityBase< T, Z >.DeserializeFromParameter ( byte[]  parameter)
protected

Takes a byte array and uses the MobileFormatter to reconstitute it into a model reference.

Parameters
parameterAn array of bytes to deserialized.
Returns
A reference to the deserialized object. An exception will be thrown if the supplied byte array is not valid for deserializaiton.

Definition at line 79 of file ActivityBase.cs.

◆ OnCreate()

override void Csla.Axml.ActivityBase< T, Z >.OnCreate ( Bundle  bundle)
protected

Event that occurs when the activity is created.

Parameters
bundleInformation about the activities creation.

Definition at line 49 of file ActivityBase.cs.

◆ SerializeModelForParameter() [1/2]

byte[] Csla.Axml.ActivityBase< T, Z >.SerializeModelForParameter ( )
protected

Serializes the ViewModel's model property using the SerializationFormatterFactory.GetFormatter().

Used to serialize and transfer models between activities.

Returns
An array of bytes that contains the serialized model.

Definition at line 59 of file ActivityBase.cs.

◆ SerializeModelForParameter() [2/2]

byte[] Csla.Axml.ActivityBase< T, Z >.SerializeModelForParameter ( object  model)
protected

Serialized the provided model using the SerializationFormatterFactory.GetFormatter().

Used to serialize and transfer models between activities.

Parameters
modelA reference to the model to serialize.
Returns
An array of bytes that contains the serialized model.

Definition at line 69 of file ActivityBase.cs.

Member Data Documentation

◆ Bindings

BindingManager Csla.Axml.ActivityBase< T, Z >.Bindings = null
protected

The BindingManager for this Activity.

Definition at line 43 of file ActivityBase.cs.

◆ viewModel

T Csla.Axml.ActivityBase< T, Z >.viewModel = null
protected

A reference to the view model.

Definition at line 38 of file ActivityBase.cs.