My favorites | Sign in
Project Logo
       
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using System;
using System.Globalization;
using System.Web;

namespace Facebook.MvcWebControls
{
/// <summary>
///
/// </summary>
/// <typeparam name="TViewData">The type of the view data.</typeparam>
[AspNetHostingPermission(System.Security.Permissions.SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission(System.Security.Permissions.SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class CanvasIFrameViewPage<TViewData> : CanvasIFrameViewPage
{
private TViewData _viewData;

/// <summary>
/// Gets the view data.
/// </summary>
/// <value>The view data.</value>
public new TViewData ViewData
{
get { return _viewData; }
}

/// <summary>
/// Sets the view data.
/// </summary>
/// <param name="viewData">The view data.</param>
protected override void SetViewData(object viewData)
{
if (viewData != null && !(viewData is TViewData))
{
throw new ArgumentException(
String.Format(
CultureInfo.CurrentUICulture,
"The view data passed into the page is of type '{0}' but this page requires view data of type '{1}'.",
viewData.GetType(),
typeof(TViewData)),
"viewData");
}

_viewData = (TViewData)viewData;
base.SetViewData(viewData);
}
}
}
Show details Hide details

Change log

r10 by nberardi on Apr 11, 2008   Diff
added facebook controls for MVC
Go to: 

Older revisions

All revisions of this file

File info

Size: 1366 bytes, 47 lines
Hosted by Google Code