Edit

Overview of the SharePoint mobile object model

Important

The APIs and technologies described in this article are legacy SharePoint Server capabilities intended for historical reference only.

  • Windows Phone 7.5 is no longer supported.
  • Silverlight is deprecated and unsupported in modern browsers.
  • SharePoint Online doesn't support these mobile object model APIs.
  • Modern SharePoint development uses Microsoft Graph, SharePoint REST APIs, SPFx, and Power Platform solutions instead.

Learn about the new public classes in the SharePoint server object model and Silverlight client object model that are used to develop integrated solutions for SharePoint and Windows Phone 7.5.

Client object model for mobile Silverlight

All classes in this section are in the Microsoft.SharePoint.Client namespace. In addition to the APIs in this section, most of the classes and members in the section Server Object Model for SharePoint Mobility are also callable in the client object model. For classes that begin with "SP", the client object model name has the "SP" removed. In other cases, the client object model name is specified. Member names are the same in the client object model except where specified otherwise.

Important

JSLink based customizations (client-side rendering) aren't supported in modern experiences. This includes modern lists and libraries, including JSLink support in the list view web parts of the modern pages. Client-side rendering is supported in the classic experiences in SharePoint Online or in on-premises.

AlternateUrl class

Represents an alternative URL for a web application and the zone to which it applies.

public class AlternateUrl

Properties

Uri (read-only)

Gets the URI of the alternate URL.

public String Uri

UrlZone (read-only)

Gets the zone of the alternate URL.

public UrlZone UrlZone

The UrlZone class is the client object model version of the SPUrlZone class in the server object model. For more information about it, see the SharePoint 2010 Software Development Kit (SDK).

AuthenticationCompletedEventArgs class

Provides data about an AuthenticationCompleted event.

public sealed class AuthenticationCompletedEventArgs : AsyncCompletedEventArgs

Constructors

Initializes a new instance of the AuthenticationCompletedEventArgs class.

public AuthenticationCompletedEventArgs(Exception error, bool canceled, HttpStatusCode userState)

Parameters

  • error is the Exception object if there was an exception thrown in the authentication attempt.
  • canceled is true if the authentication attempt was canceled before it could succeed or fail.
  • userState is the HttpStatusCode returned by the server.

Properties

HttpStatusCode (read-only)

Gets the status returned by the server after an authentication attempt.

public HttpStatusCode HttpStatusCode

AuthenticationStatus enum

Specifies the current state of an authentication attempt.

  • NotStarted
  • InProgress
  • CompletedSuccess
  • CompletedException

Authenticator class

Provides methods for authenticating a user on a SharePoint website.

public class Authenticator : ICredentials

Constructors

Initializes a new instance of the class.

public Authenticator()

public Authenticator(Uri uagServerUrl)

Parameters uagServerUrl is the absolute URL of a United Access Gateway (UAG) server.

public Authenticator(string userName, string password)

Parameters userName is the name for the credentials. password is the password for the credentials.

public Authenticator(string userName, string password, string domain)

Parameters userName is the name for the credentials. password is the password for the credentials. domain is the name of the domain or computer where the credentials are verified, typically the domain of the current user.

public Authenticator(string userName, string password, Uri uagServerUrl)

Parameters userName is the name for the credentials. password is the password for the credentials. uagServerUrl is the absolute URL of a United Access Gateway (UAG) server.

public Authenticator(string userName, string password, string domain, Uri uagServerUrl)

Parameters userName is the name for the credentials. password is the password for the credentials. domain is the name of the domain or computer where the credentials are verified, typically the domain of the current user. uagServerUrl is the absolute URL of a United Access Gateway (UAG) server.

Methods

ClearAllApplicationSettings Clears all cookies, credentials, and UAG settings from the cache.

public static void ClearAllApplicationSettings()

ClearAllCookies Clears all stored cookies and sets the Status property of all Authenticator objects to NotStarted.

public static void ClearAllCookies()

ClearAllCredentials Clears all credentials from the cache and sets the Status property of all Authenticator objects to NotStarted.

public static void ClearAllCredentials()

GetCredential Gets a credential object for the specified uri and authentication type.

public NetworkCredential GetCredential(Uri uri, string authType)

Parameters

  • uri is the URI, including port, for which the client is providing authentication.
  • authType is the type of authentication requested.

This method is only used for anonymous authentication. If authType isn't "Basic", an empty object is returned. For more information about the NetworkCredential class, see NetworkCredential Class. IsRequestUnauthorized Returns true if the authorization request failed because of an invalid cookie or credentials.

public static bool IsRequestUnauthorized(ClientRequestFailedEventArgs failedEventArgs)

Properties

AllowSmartRouting Gets or sets an indicator of whether smart routing is enabled.

public bool AllowSmartRouting

When smart routing is enabled, the Authenticator object tries to connect to the server that's running SharePoint and the UAG server and uses whichever responds first as its communication channel. If there's no UAG server, this property is ignored. The default is true. If set to false, the UAG server is always used.

AuthenticatorMode

Gets or sets the authentication mode.

public ClientAuthenticationMode AuthenticationMode

For more information about the ClientAuthenticationMode enum, see later in this document.

CookieCachingEnabled Gets or sets an indicator of whether cookies are cached.

public bool CookieCachingEnabled

If you enable caching of cookies, consider that the cookies expire at some point. If they're expired when ExecuteQueryAsync is called, then it fails and the callback for failure runs. Accordingly, if you set this property to true, you must add code to the callback for failure that clears the cache if this happens. Here's an example, where execQueryArgs is of the type ClientRequestFailedEventArgs passed in the failure callback of ExecuteQueryAsync.

if (Authenticator.IsRequestUnauthorized(execQueryArgs))
{
    (sender as Authenticator).ClearCookies();
}

CredentialCachingEnabled Gets or sets an indicator of whether credentials are cached.

public bool CredentialCachingEnabled

Domain Gets or sets the domain or computer for the credential, usually this is the domain of the current user.

public string Domain

When this property is set to a new value, the Status property is set to NotStarted.

NavigateBackAfterAuthentication Gets or sets an indicator of whether the user should be navigated back to the previous page from the sign-in page.

public bool NavigateBackAfterAuthentication

Password Gets or sets the password for the credential.

public string Password

When this property is set to a new value, the Status property is set to NotStarted.

PromptOnFailure

Gets or sets an indicator of whether the user should be prompted to enter a name and password if initial authentication fails.

public bool PromptOnFailure

Status (read-only) Gets the status of the attempt to authenticate.

public AuthenticationStatus Status

See earlier in this document for information about the AuthenticationStatus class.

UagServerUrl

Gets or sets the URL of the UAG server.

public Uri UagServerUrl

UserName

Gets or sets the user name for the credential.

public string UserName

When this property is set to a new value, the Status property is set to NotStarted.

Events

AuthenticationCompleted

Raised when the authentication attempt is completed, regardless of whether it succeeded.

public event EventHandler<AuthenticationCompletedEventArgs> AuthenticationCompleted;

ClientAuthenticationMode enum

Specifies an authentication mode for an Authenticator object. This is an existing enum to which a new value, BrowserBasedAuthentication has been added.

Type Description
FormsAuthentication Represents forms-based authentication mode
Anonymous Represents anonymous access mode
BrowserBasedAuthentication Represents Microsoft Office Forms Based Authentication (MSOFBA) mode

ODataAuthenticator class

Provides methods for authenticating a user on a SharePoint website.

public class ODataAuthenticator : Authenticator

Constructors

The constructors are identical to the parent class constructors. For more information, see Authenticator Class earlier in this document.

Methods

Authenticate Authenticates a user to the specified website.

public new void Authenticate(Uri serverUrl)

The new keyword is used because the parent class has an internal method of the same name.

Properties

CookieContainer (read-only) Gets a container with the cookies for requests to the website.

public new CookieContainer CookieContainer

The new keyword is used because the parent class has an internal method of the same name.

ResolvedUrl (read-only)

Gets the URL that is used for communication to the server that's running SharePoint when an ODataAuthenticator is being used. This may be the URL published on the UAG server or, if the AllowSmartRouting property is true, this may be the SharePoint intranet URL if it's reached first when the Authenticate method is called.

public Uri ResolvedUrl

ServerSettings class

Provides a method for getting the Alternate URLs of the web application that contains a website.

public static class ServerSettings

Methods

GetAlternateUrls Gets the alternate URLs of the specified website.

public static ClientObjectList<AlternateUrl> GetAlternateUrls(ClientRuntimeContext context)

Parameters context is the object that represents the current client context. See earlier in this document for information about the AlternateUrl class.

Server object model for SharePoint mobility

All classes in this section are in the Microsoft.SharePoint namespace. Except where specified, these are all available also in the client object model. For classes that begin with "SP", the client object model name has the "SP" removed. In other cases, the client object model name is specified. Member names are the same in the client object model except where specified otherwise.

GeolocationFieldControl class

(Not available in client object model.)

Governs the rendering of SPFieldGeolocation fields. An object of this type is used as the value of the FieldRenderingControl property of a SPFieldGeolocation object.

public class GeolocationFieldControl : BaseFieldControl

With this class, note also that there are two rendering templates, one for Display mode and one for New and Edit mode. They're defined in the file %SHAREPOINTROOT%\TEMPLATE\ControlTemplates\DefaultTemplates.ascx.

Fields

The following are used to render the field in the New and Edit modes.

protected TextBox m_latitudeBox;
protected TextBox m_longitudeBox;
protected Label m_longitudeLabel;
protected Label m_latitudeLabel;

Methods

No non-derived public properties are introduced with this class. There are standard overrides of some derived methods as indicated in the following table.

Method This override???
CreateChildControls Creates the child controls including a JavaScript map control for Display mode.
Focus Gives focus to the longitude textbox child control.
OnPreRender Calls the base method.
Validate Validates the latitude and longitude values that appear in the user interface (UI). This doesn't validate the Longitude and Latitude properties of the underlying SPFieldGeolocatonValue object, which will differ if the user has changed one or more of these values in the UI and not yet saved the changes.

Properties

No non-derived public properties are introduced with this class. There are standard overrides of some derived properties as indicated in the following table.

Property This override...
CssClass Behaves just like the parent implementation.
DefaultTemplateName Returns "GeolocationField"
DisplayTemplateName Returns "GeolocationDisplayField"
Value Gets or sets the value that is rendered by using a SPFieldGeolocationValue object.

SPFieldGeolocation class

Represents a field (column) that holds a location on the globe defined by longitude, latitude, and possibly altitude.

public class SPFieldGeolocation : SPField

With this class, the Geolocation field type is defined in % SHAREPOINTROOT%\TEMPLATE\XML\fldtypes.xml.

Constructors (overloaded)

Initializes a new instance of the SPFieldGeolocation class.

public SPFieldGeolocation(SPFieldCollection fields, string fieldName)
public SPFieldGeolocation(SPFieldCollection fields, string fieldName, string displayName)

Parameters

  • fields is the collection of field types to which the new field type object is added.
  • fieldName is an internal name of the new field type.
  • displayName is a friendly name of the new field type.

Methods

GetFieldValueForClientRender Gets the value of the field so that it can be rendered on the client.

public override object GetFieldValueForClientRender(SPItem item, SPControlMode mode)

Parameters

  • item is the current list item.
  • mode is the current rendering mode such as New, Edit, or Display.

GetJsonClientFormFieldSchema Gets the field schema as JavaScript Object Notation (JSON).

public override Dictionary<string, object> GetJsonClientFormFieldSchema(SPControlMode mode)

Parameters mode is the current rendering mode such as New, Edit, or Display.

ValidateAndParseValue Verifies that the specified list item isn't null and then verifies that the string is structured in compliance with Open Geospatial Consortium (OGC) standards and returns it as an object that's castable to the SPFieldGeolocationValue type.

public override object ValidateAndParseValue(SPListItem item, string value)

Parameters

  • item is a list item that is to be updated with the value.
  • value is a string representation of a geolocation value.

The following methods are standard overrides of inherited methods that were in SharePoint 2010. The specific information for this class is in the following table.

Method This override...
GetFieldValue(String s) Returns the specified value as an Object that's castable to SPFieldGeolocationValue.
GetFieldValueAsText(Object o) Wraps GetValidatedString.
GetValidatedString(Object o) Verifies that the specified value is structured in compliance with Open Geospatial Consortium (OGC) standards and returns it as a string.

Properties

JSLink Gets or sets the name of the JavaScript file that renders the fields of the SPFieldGeolocation type.

Warning

JSLink customization is deprecated and isn't supported in modern SharePoint experiences. Use SharePoint Framework (SPFx) field customizers or column formatting instead.

The JSLink property is also not supported on Survey or Events lists.

public override string JSLink

The default value is "clienttemplates.js|Geolocationfieldtemplate.js|sp.map.js".

FieldRenderingMobileWebControl Gets the SPMobileGeolocationField object that renders the field.

public override SPMobileBaseFieldControl FieldRenderingMobileControl

This property replaces the obsolete FieldRenderingMobileControl. The other properties are standard overrides of inherited properties that were in SharePoint 2010. The specific information for this class is in the following table.

Property The override...
FieldValueType Returns typeof(SPFieldGeolocationValue).
FieldRenderingControl Returns a GeolocationFieldControl object.
Filterable Returns false.
Sortable Returns false.
[Obsolete]
FieldRenderingMobileControl
Returns a SPMobileGeolocationField object.

SPFieldGeolocationValue class

Represents a location on the globe defined by longitude, latitude, and possibly altitude too.

public class SPFieldGeolocationValue : SPFieldGeographyValue

Constructors (overloaded)

Initializes a new instance of the SPFieldGeolocationValue class.

public SPFieldGeolocationValue()
public SPFieldGeolocationValue(string fieldValue)
public SPFieldGeolocationValue(double latitude, double longitude)
public SPFieldGeolocationValue(double latitude, double longitude, double altitude, double measure)

Parameters

  • fieldValue is a string in one of the following Well-Known Text (WKT) formats:
    • "Point(longitude_ latitude)", where longitude and latitude are strings of one or more numerals, optionally including one period (which is interpreted as a decimal point) and optionally beginning with a hyphen (which is interpreted as a negative sign).
    • "Point(longitude_ latitude altitude measure)", where longitude, latitude, altitude, and measure are strings of one or more numerals, optionally including one period (which is interpreted as a decimal point) and optionally beginning with a hyphen (which is interpreted as a negative sign).
  • latitude is the latitude and must be between -90.0 and 90.0.
  • longitude is the longitude and must be between -180.0 and 180.0.
  • altitude is the altitude.
  • measure is an alternate designation of the point. See the Measure property later in this section for more information.

Methods

ToString This override returns one of the following, depending on whether the Altitude or Measure properties have been assigned a non-null value.

  • If neither Altitude nor Measure have been assigned a non-null value:

    "Point(longitude_ latitude)", where longitude and latitude are strings of one or more numerals, optionally including one period (which is interpreted as a decimal point) and optionally beginning with a hyphen (which is interpreted as a negative sign).

  • Otherwise (at least one of Altitude or Measure have been assigned a non-null value):

    "Point(longitude latitude altitude measure)", where longitude, latitude, altitude, and measure are strings of one or more numerals, optionally including one period (which is interpreted as a decimal point) and optionally beginning with a hyphen (which is interpreted as a negative sign). If either Altitude or Measure hasn't been assigned a non-null value, it's reported as "0" in the value of the WellKnownText property. The converse doesn't hold: if either Altitude or Measure is reported as 0, that might be because it was never assigned a non-null value, but it might be because it was assigned 0.

public override string ToString()

ToWellKnownText WrapsToString.

public string ToWellKnownText()

Properties

Altitude

Gets or sets the altitude of the location. Use of this property is optional and the assumed unit-of-measure (for example, meters) and zero-point (for example, sea level or center-of-the-earth) is user defined.

public double Altitude

Latitude

Gets or sets the latitude of the location.

public double Latitude

The value must be between -90.0 and 90.0.

Longitude Gets or sets the longitude of the location.

public double Longitude

The value must be between -180.0 and 180.0.

Measure

Gets or sets a user-defined alternate designation of the location point. For example, if the point is along a highway with milestone markers, this property could be used to hold the number of the milestone that's nearest to the point. If the point is in a public camping area with numbered campsites, this property could be used to hold the number of the nearest campsite. The semantics of the property are entirely user-determined and its use is optional.

public double Measure

SPFieldType enum

A new value has been added to this enum:

Geolocation

SPPhoneNotificationContent class

A base class for classes that represent the content of a phone notification. Derived classes must declare one or more fields or properties to hold the content and must implement the PreparePayload method to transform the content into a byte array.

public abstract class SPPhoneNotificationContent

Methods

PreparePayload

When implemented in a derived class, transforms the content into a Byte array that is sent over the wire to the notification service. There's no default implementation so a derived class must implement this method.

protected internal abstract byte[] PreparePayload();

Properties

NotificationType (read-only)

Gets the type of notification (for example, tile or toast) for which the content is intended.

public SPPhoneNotificationType NotificationType

For information about the SPPhoneNotificationType, see later in this document.

SubscriberType (read-only)

Gets the type of the subscriber's device, for example, a Windows Phone.

public SPPhoneNotificationSubscriberType SubscriberType

For information about the SPPhoneNotificationSubscriberType, see later in this document.

SPPhoneNotificationResponse class

Represents the outcome of an attempt to send a notification.

public class SPPhoneNotificationResponse

Methods

Create Creates an SPPhoneNotificationResponse object.

public static SPPhoneNotificationResponse
Create(SPPhoneNotificationSubscriberType subscriberType,
SPPhoneNotificationType notificationType, HttpWebResponse response)

Parameters

  • subscriberType is the device, such as Windows Phone 7.5.
  • notificationType is the type of notification, such as toast or tile.
  • response is the HTTP response object that was generated by the server.

For more information about SPPhoneNotificationSubscriberType and SPPhoneNotificationType, see later in this document.

Properties

NotificationType (read-only)

Gets the type of notification (for example, toast or tile).

public SPPhoneNotificationType NotificationType

For information about the SPPhoneNotificationType, see later in this document.

ServiceToken (read-only) Gets the token of the notification service that was used in the notification.

public string ServiceToken

StatusCode (read-only) Gets the HTTP status code. A string version of aHttpStatusCode value.

public string StatusCode

SubscriberType Gets or sets the type of device to which the notification was sent.

public SPPhoneNotificationSubscriberType SubscriberType

For information about the SPPhoneNotificationSubscriberType, see later in this document. TimeStamp (read-only) The UTC time of the notification.

public DateTime Timestamp

SPPhoneNotificationSubscriber class

A base class for classes that represent a subscriber to notifications issued by a server-side SharePoint application.

public abstract class SPPhoneNotificationSubscriber

Methods

Notify Sends the specified notification content to the subscriber with error checking.

public SPPhoneNotificationResponse Notify(SPPhoneNotificationContent notificationContent)

Parameters notificationContent is information about the event that triggered the notification. This method can't be overridden. It wraps the abstract NotifyInternal method and ensures that certain error checking is done when NotifyInternal is called. For more information about the SPPhoneNotificationContent and SPPhoneNotificationResponse classes, see earlier in this document.

NotifyInternal When overridden in a derived class, sends the specified notification content to the subscriber.

protected abstract SPPhoneNotificationResponse NotifyInternal(SPPhoneNotificationContent notificationContent);

Parameters notificationContent is information about the event that triggered the notification.

For more information about the SPPhoneNotificationContent and SPPhoneNotificationResponse classes, see earlier in this document.

ToString Returns selected properties of the object as a string.

public override string ToString()

The default implementation includes the ParentWeb, ApplicationTag, and DeviceAppInstanceId properties.

Update

Saves a (possibly changed) SPPhoneNotificationSubscriber object to the website's Subscriber Store.

public void Update()

ValidateSubscriberProperties When implemented in a derived class, validates selected properties of the object.

protected abstract void ValidateSubscriberProperties();

Properties

CustomArgs

Gets or sets a custom arguments string that represents the state of the notifications subscription. This string could be used by the application logic to differentiate between its notification subscribers for different kinds of notifications.

public string CustomArgs

DeviceAppInstanceId (read-only) Gets an ID for the specific instance of the application on the phone or other mobile device.

public Guid DeviceAppInstanceId

LastModifiedTimeStamp (read-only) Gets the date and time when the subscriber was last modified.

public DateTime LastModifiedTimeStamp

RegistrationTimeStamp (read-only) Gets the date and time when the subscriber registered for notifications.

public DateTime RegistrationTimeStamp

ServiceToken Gets or sets delivery channel information that is needed by a notification service, such as channel URI.

public string ServiceToken

SubscriberType (read-only) Gets the type of the device, such as Windows Phone 7.

public SPPhoneNotificationSubscriberType SubscriberType

For information about the SPPhoneNotificationSubscriberType class, see later in this document.

User (read-only) Gets the user who registered for notifications.

public SPUser User

SPPhoneNotificationSubscriberCollection class

A collection of notification subscribers. The collection object takes Int32 indexers.

public sealed class SPPhoneNotificationSubscriberCollection : SPBaseCollection

Properties

Count

Gets the number of items in the collection.

public override int Count

SPPhoneNotificationSubscriberType enum

Specifies a type of device that can receive notifications.

Notification Device
WP7 Windows Phone 7.5
Custom Any device other than Windows Phone 7.5

SPPhoneNotificationType enum

Specifies the type of notification.

-None -Tile -Toast -Raw

SPWeb class

The following members have been added to this class.

Methods

DoesPhoneNotificationSubscriberExist Gets a value that indicates whether the current user is a subscriber for the specified instance of the specified app.

public bool DoesPhoneNotificationSubscriberExist(Guid deviceAppInstanceId)

GetPhoneNotificationSubscriber Gets a notification subscriber with the specified application and phone IDs from the website's notification Subscription Store list.

public SPPhoneNotificationSubscriber GetPhoneNotificationSubscriber(Guid deviceAppInstanceId)

Parameters deviceAppInstanceId is an ID for the instance of the application on a specific phone or device. For information about the SPPhoneNotificationSubscriber class see earlier in this document.

GetPhoneNotificationSubscribers (overloaded) Gets a collection of notification subscribers from the website's notification Subscription Store list, optionally filtering on the ID of the phone applications and possibly also on one of the following: the user or some custom arguments.

public SPPhoneNotificationSubscriberCollection GetPhoneNotificationSubscribers(string customArgs)

Note

Client object model name is GetPhoneNotificationSubscribersByArgs.

public SPPhoneNotificationSubscriberCollection GetPhoneNotificationSubscribers(string user)

Note

Client object model name is GetPhoneNotificationSubscribersByUser.

Parameters

  • customArgs are additional custom information that some notification-enabled applications may use.
  • user is the user who registered for the notifications.

For information about the SPPhoneNotificationSubscriberCollection class see earlier in this document.

RegisterPhoneNotificationSubscriber Registers a phone app on a phone to receive notifications.

public SPPhoneNotificationSubscriber RegisterPhoneNotificationSubscriber(SPPhoneNotificationSubscriberType subscriberType, Guid deviceAppInstanceId, string serviceToken)

Parameters

  • subscriberType is the device type, such as Windows Phone 7.
  • deviceAppInstanceId is an ID for the instance of the app on a specific phone or device.
  • serviceToken is the token that is used by the notification service that sends notifications to the subscriber.

For information about SPPhoneNotificationSubscriberType, see earlier in this document.

UnregisterPhoneNotificationSubscriber Unregisters a phone app on a phone from receiving notifications.

public void UnregisterPhoneNotificationSubscriber(Guid deviceAppInstanceId)

Parameters deviceAppInstanceId is an ID for the instance of the app on a specific phone or device.

Properties

PhoneNotificationSubscribers (read-only) Gets a collection of all the phone notification subscribers in the website's Subscriber Store.

public SPPhoneNotificationSubscriberCollection PhoneNotificationSubscribers

For information about the SPPhoneNotificationSubscriberCollection class, see earlier in this document.

WP7NotificationTileContent class

Represents the content of a tile notification.

public sealed class WP7NotificationTileContent : SPPhoneNotificationContent

Constructors

Initializes a new instance of the WP7NotificationTileContent class.

public WP7NotificationTileContent()

Methods

PreparePayload Transforms the content into a Byte array that is sent over the wire to the notification service.

protected internal override byte[] PreparePayload();

Properties

Count Gets or sets the count of the notification. Must be from -1 to 99 inclusive.

public int Count

Setting the property to -1 won't change the count over the tile.

Title Gets or sets the title of the tile notification.

public string Title

BackgroundImagePath Gets or sets the path to the tile's background image.

public string BackgroundImagePath

BackBackgroundImagePath Gets or sets the background image of the back side of a flipping tile.

public string BackBackgroundImagePath

BackContent Gets or sets the content of the back side of a flipping tile.

public string BackContent

BackTitle Gets or sets of the title that appears on the back side of a flipping tile.

public string BackTitle

TileId Gets or sets the ID of the tile.

public string TileId

WP7NotificationToastContent class

Represents the content of a toast notification.

public sealed class WP7NotificationToastContent : SPPhoneNotificationContent

Constructors

Initializes a new instance of the WP7NotificationToastContent class.

public WP7NotificationToastContent()

Methods

PreparePayload Transforms the content into a Byte array that is sent over the wire to the notification service.

protected internal override byte[] PreparePayload();

Properties

Message Gets or sets the message of the toast notification.

public string Message

Title Gets or sets the title of the toast notification.

public string Title

Param Gets or sets custom settings data that is passed to the receiving application if the user responds to the toast notification.

public string Param

This property can be used to pass information to the receiving application such as a URL or a set of name-value pairs.

WP7NotificationRawContent class

Represents the content of a raw notification.

public sealed class WP7NotificationRawContent : SPPhoneNotificationContent

Constructors

Initializes a new instance of the WP7NotificationRawContent class.

public WP7NotificationRawContent()

Methods

PreparePayload Transforms the content into a Byte array that is sent over the wire to the notification service.

protected internal override byte[] PreparePayload();

Properties

Message Gets or sets the message of the raw notification.

public string Message

WP7PhoneNotificationResponse class

Represents the outcome of an attempt to send a notification to a Windows Phone 7 subscriber.

public WP7PhoneNotificationResponse(SPPhoneNotificationType notificationType, HttpWebResponse response)

Parameters

  • notificationType is the type of notification, such as toast or tile.
  • response is the HTTP response object that was generated by the server.

For more information about SPPhoneNotificationType, see earlier in this document.

Properties

NotificationStatus (read-only) Gets the notification status, for example, success or failure.

public string NotificationStatus

DeviceConnectionStatus (read-only) Gets the status of the device at the time of the notification.

public string DeviceConnectionStatus

SubscriptionStatus (read-only) The subscription status of the device at the time of the notification.

public string SubscriptionStatus

MessageId (read-only) Gets the ID of the message that was sent in the notification.

public string MessageId

See also