CSLA.NET 5.4.2
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

override void OnCreate (Bundle bundle)
 Event that occurs when the activity is created. More...
 
byte[] SerilizeModelForParameter ()
 Serializes the ViewModel's model property using the SerializationFormatterFactory.GetFormatter(). More...
 
byte[] SerilizeModelForParameter (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.

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 68 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 38 of file ActivityBase.cs.

◆ SerilizeModelForParameter() [1/2]

byte[] Csla.Axml.ActivityBase< T, Z >.SerilizeModelForParameter ( )
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 48 of file ActivityBase.cs.

◆ SerilizeModelForParameter() [2/2]

byte[] Csla.Axml.ActivityBase< T, Z >.SerilizeModelForParameter ( 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 58 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 32 of file ActivityBase.cs.

◆ viewModel

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

A reference to the view model.

Definition at line 27 of file ActivityBase.cs.