|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web.Ria.Data;
using System.Windows.Ria.Data;
using BASample.Data.DomainService;
namespace BASample.Silverlight
{
/// <summary>
/// Context for the RIA application.
/// </summary>
/// <remarks>
/// This context extends the base to make application services and types available
/// for consumption from code and xaml.
/// </remarks>
public sealed partial class RiaContext : System.Windows.Ria.RiaContextBase
{
#region Extensibility Method Definitions
/// <summary>
/// This method is invoked from the constructor once initialization is complete and
/// can be used for further object setup.
/// </summary>
partial void OnCreated();
#endregion
/// <summary>
/// Initializes a new instance of the RiaContext class.
/// </summary>
public RiaContext()
{
this.OnCreated();
}
/// <summary>
/// Gets the context that is registered as a lifetime object with the current application.
/// </summary>
/// <exception cref="InvalidOperationException"> is thrown if there is no current application,
/// no contexts have been added, or more than one context has been added.
/// </exception>
/// <seealso cref="Application.ApplicationLifetimeObjects"/>
public new static RiaContext Current
{
get
{
return ((RiaContext)(System.Windows.Ria.RiaContextBase.Current));
}
}
/// <summary>
/// Gets a user representing the authenticated identity.
/// </summary>
public new UserIdentity User
{
get
{
return (UserIdentity)base.User;
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Max currently is a senior developer at software company.
He lives with his wife Tatiana and son Zakhar (4 yrs) in Minsk, Belarus, but they dream to live in New Zealand.