PrepAway - Latest Free Exam Questions & Answers

Author: admin

Which code segment should you use?

You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.
The service will contain an enumeration named OrderState.
The OrderState enumeration will contain the following four values: Processing, Cancelled, Confirmed, Closed.
The client application must be able to set the state of an Order entity to only the following two values: Cancelled, Closed.
You need to create the data contract for OrderState.
Which code segment should you use?

Which code fragment should you insert at line 03?

You are creating a Windows Communication Foundation client application by using Microsoft .NET Framework 3.5.
The client application consumes the Web Services Enhancements (WSE) 3.0 Web service.
The Web service uses standard WSE 3.0 to transfer binary data to the client application.
The client application uses the following binding configuration.
(Line numbers are included for reference only.)

01 <customBinding>
02 <binding name="custom" >
03
04 <httpTransport maxBufferSize="700000" 04 maxreceivedMessageSize="700000" />
05 </binding>
06 </customBinding>

You need to ensure that the client application receives binary data from the WSE 3.0 Web service.
Which code fragment should you insert at line 03?

Which code fragment should you insert at line 05?

You are creating a client application by using Microsoft .NET Framework 3.5.
You use Windows Communication Foundation (WCF) to create the application
The client application uses a Personal Information Card to provide
authentication information to the WCF server.
You write the following code fragment.
(Line numbers are included for reference only.)

01 <wsFederationHttpBinding>
02 <binding name="requireCardSpace">
03 <security mode="MyMessage">
04 <message>
05
06 </message>
07 </security>
06 </binding>
09 </wsFederationHttpBinding>

You need to ensure that one of the claims in the Personal Information Card contains an e-mail address.
Which code fragment should you insert at line 05?

Which two actions should you perform?

You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
You plan to use the application to preview video files. You write the following XAML code fragment.

01 <Window x:Class="myClass" xmlns= "http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="myWindow" Height="300" Width="300">
02 <StackPanel Background="Black">
03
04 <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
05 <Button Name="btnPlay" Margin="10" Content="Play" />
06 </StackPanel>
07
08 </StackPanel>
09 </Window>

You need to ensure that the application plays only the first 10 seconds of a video that you want to preview.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

Which code segment should you insert at line 08?

You are creating a Windows Presentation Foundation (WPF) application by using Microsoft .NET Framework 3.5.
The application contains a window that programatically displays an image. The window contains a Grid control named theGrid. You write the following code segment.
(Line numbers are included for reference only.)

01 Image theImage = new Image();
02 theImage.Width = 200;
03 BitmapImage theBitmapImage = new BitmapImage();
04 theBitmapImage.BeginInit();
05 theBitmapImage.UriSource = new Uri("imageToDisplay.jpg");
06 theBitmapImage.DecodePixelWidth = 200;
07 theBitmapImage.EndInit();
08
09 theGrid.Children.Add(theImage);

You need to crop an elliptical region of the image such that the ellipse is centered at the location X=75 and Y=50.
Which code segment should you insert at line 08?

Which code segment should you insert at line 04?

You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
The application has a window that programatically displays an image. The window contains a grid named theGrid. The window displays images in their actual size. You want the images to be 200 pixels wide. You write the following code segment.

01 Image theImage = new Image();
02 theImage.Width = 200;
03 BitmapImage theBitmapImage = new BitmapImage();
04
05 theImage.Source = theBitmapImage;
06 theGrid.Children.Add(theImage);

You need to ensure that the application meets the following requirements:

* The window uses the least amount of memory to display the image.
* The image is not skewed.

Which code segment should you insert at line 04?