Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Update Method (Hybrid)

Updated: August 2, 2013

Published: April 2, 2014

Advances the state of all DrawableAd objects managed by the AdComponent.

Namespace: Microsoft.Advertising.Mobile.Xna

Assembly: Microsoft.Advertising.Mobile.Xna (in Microsoft.Advertising.Mobile.Xna.dll)

public void Update (System.TimeSpan elapsedTime)

Name

Description

Type

elapsedTime

A TimeSpan object that specifies the timing state of the app.

TimeSpan

You pass the XNA GameTimerEventArgs.ElapsedTime property into the AdComponent.Update method to update the state of the AdComponent object. Below is an example of an OnUpdate method for a hybrid app that illustrates this.


        // Allows the page to run logic such as updating the world,
        // checking for collisions, gathering input, and playing audio.
        // </summary>
        private void OnUpdate(object sender, GameTimerEventArgs e)
        {
            // update the AdComponent
            AdComponent.Current.Update(e.ElapsedTime);
        }

Exceptions

Exception Type

Condition

InvalidOperationException

The call by the AdGameComponent to the internal LoadContent function failed.

Platforms

Windows Phone 7.x only

Support and Feedback

Get product support or report a bug in the product by visiting the Windows Phone Dev Center support page (scroll down to the section "Microsoft Advertising support").

Send feedback about this documentation to adsfdbk@microsoft.com. There is no product support through this alias. Documentation feedback only.

Community Additions

ADD
Show:
© 2015 Microsoft