Поделиться через


AspNetDevelopmentServer Class

Represents the settings for an instance of the ASP.NET Development Server. More than one instance may occur during a test.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.TestTools.Common.AspNetDevelopmentServer

Namespace:  Microsoft.VisualStudio.TestTools.Common
Assembly:  Microsoft.VisualStudio.QualityTools.Common (in Microsoft.VisualStudio.QualityTools.Common.dll)

Syntax

'Declaration
<SerializableAttribute> _
Public Class AspNetDevelopmentServer _
    Implements IXmlTestStore
[SerializableAttribute]
public class AspNetDevelopmentServer : IXmlTestStore
[SerializableAttribute]
public ref class AspNetDevelopmentServer : IXmlTestStore
[<SerializableAttribute>]
type AspNetDevelopmentServer =  
    class
        interface IXmlTestStore
    end
public class AspNetDevelopmentServer implements IXmlTestStore

The AspNetDevelopmentServer type exposes the following members.

Constructors

  Name Description
Public method AspNetDevelopmentServer Initializes an instance of the AspNetDevelopmentServer() class by using the provided name, Web application path, and root name of the Web application.

Top

Properties

  Name Description
Public property Name Gets the name of this instance of ASP.NET Development Server.
Public property PathToWebApp Gets the full path of the Web application that is being tested.
Public property WebAppRoot Gets the name of the root for the Web application that is being tested.

Top

Methods

  Name Description
Public method Equals Returns a value that indicates whether the current instance of AspNetDevelopmentServer object is equal to the provided instance of the AspNetDevelopmentServer object. (Overrides Object.Equals(Object).)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Returns the hash code of the ID of the AspNetDevelopmentServer instance. (Overrides Object.GetHashCode().)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method Load Loads the class from the provided XML element.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Save Saves the ASP.NET Development Environment settings that this class represents.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Remarks

Use this class to develop tests that you intend to run in the ASP.NET host. This class differs from the following classes, although their names are similar:

  • AspNetDevelopmentServerAttribute specifies the settings that must be used for ASP.NET Development Server for the test. This class is used primarily for Web service unit tests.

  • AspNetDevelopmentServerHostAttribute specifies the settings to use when an ASP.NET Development Server is the host server for the test. This class is used for ASP.NET unit tests.

You can use the Save method to persist this object and the Load method to load it from storage.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.TestTools.Common Namespace

AspNetDevelopmentServerAttribute

AspNetDevelopmentServerHostAttribute

Load

Load